Minimal PyTorch implementation of YOLOv3

Overview

PyTorch-YOLOv3

A minimal PyTorch implementation of YOLOv3, with support for training, inference and evaluation.

Ubuntu CI PyPI pyversions PyPI license

Installation

Installing from source

For normal training and evaluation we recommend installing the package from source using a poetry virtual enviroment.

git clone https://github.com/eriklindernoren/PyTorch-YOLOv3
cd PyTorch-YOLOv3/
pip3 install poetry --user
poetry install

You need to join the virtual enviroment by runing poetry shell in this directory before running any of the following commands without the poetry run prefix. Also have a look at the other installing method, if you want to use the commands everywhere without opening a poetry-shell.

Download pretrained weights

./weights/download_weights.sh

Download COCO

./data/get_coco_dataset.sh

Install via pip

This installation method is recommended, if you want to use this package as a dependency in another python project. This method only includes the code, is less isolated and may conflict with other packages. Weights and the COCO dataset need to be downloaded as stated above. See API for further information regarding the packages API. It also enables the CLI tools yolo-detect, yolo-train, and yolo-test everywhere without any additional commands.

pip3 install pytorchyolo --user

Test

Evaluates the model on COCO test dataset. To download this dataset as well as weights, see above.

poetry run yolo-test --weights weights/yolov3.weights
Model mAP (min. 50 IoU)
YOLOv3 608 (paper) 57.9
YOLOv3 608 (this impl.) 57.3
YOLOv3 416 (paper) 55.3
YOLOv3 416 (this impl.) 55.5

Inference

Uses pretrained weights to make predictions on images. Below table displays the inference times when using as inputs images scaled to 256x256. The ResNet backbone measurements are taken from the YOLOv3 paper. The Darknet-53 measurement marked shows the inference time of this implementation on my 1080ti card.

Backbone GPU FPS
ResNet-101 Titan X 53
ResNet-152 Titan X 37
Darknet-53 (paper) Titan X 76
Darknet-53 (this impl.) 1080ti 74
poetry run yolo-detect --images data/samples/

Train

For argument descriptions have a lock at poetry run yolo-train --help

Example (COCO)

To train on COCO using a Darknet-53 backend pretrained on ImageNet run:

poetry run yolo-train --data config/coco.data  --pretrained_weights weights/darknet53.conv.74

Tensorboard

Track training progress in Tensorboard:

poetry run tensorboard --logdir='logs' --port=6006

Storing the logs on a slow drive possibly leads to a significant training speed decrease.

You can adjust the log directory using --logdir when running tensorboard and yolo-train.

Train on Custom Dataset

Custom model

Run the commands below to create a custom model definition, replacing with the number of classes in your dataset.

./config/create_custom_model.sh <num-classes>  # Will create custom model 'yolov3-custom.cfg'

Classes

Add class names to data/custom/classes.names. This file should have one row per class name.

Image Folder

Move the images of your dataset to data/custom/images/.

Annotation Folder

Move your annotations to data/custom/labels/. The dataloader expects that the annotation file corresponding to the image data/custom/images/train.jpg has the path data/custom/labels/train.txt. Each row in the annotation file should define one bounding box, using the syntax label_idx x_center y_center width height. The coordinates should be scaled [0, 1], and the label_idx should be zero-indexed and correspond to the row number of the class name in data/custom/classes.names.

Define Train and Validation Sets

In data/custom/train.txt and data/custom/valid.txt, add paths to images that will be used as train and validation data respectively.

Train

To train on the custom dataset run:

poetry run yolo-train --model config/yolov3-custom.cfg --data config/custom.data

Add --pretrained_weights weights/darknet53.conv.74 to train using a backend pretrained on ImageNet.

API

You are able to import the modules of this repo in your own project if you install the pip package pytorchyolo.

An example prediction call from a simple OpenCV python script would look like this:

import cv2
from pytorchyolo import detect, models

# Load the YOLO model
model = models.load_model(
  "/yolov3.cfg", 
  "/yolov3.weights")

# Load the image as an numpy array
img = cv2.imread("")

# Runs the YOLO model on the image 
boxes = detect.detect_image(model, img)

print(boxes)

For more advanced usage look at the method's doc strings.

Credit

YOLOv3: An Incremental Improvement

Joseph Redmon, Ali Farhadi

Abstract
We present some updates to YOLO! We made a bunch of little design changes to make it better. We also trained this new network that’s pretty swell. It’s a little bigger than last time but more accurate. It’s still fast though, don’t worry. At 320 × 320 YOLOv3 runs in 22 ms at 28.2 mAP, as accurate as SSD but three times faster. When we look at the old .5 IOU mAP detection metric YOLOv3 is quite good. It achieves 57.9 AP50 in 51 ms on a Titan X, compared to 57.5 AP50 in 198 ms by RetinaNet, similar performance but 3.8× faster. As always, all the code is online at https://pjreddie.com/yolo/.

[Paper] [Project Webpage] [Authors' Implementation]

@article{yolov3,
  title={YOLOv3: An Incremental Improvement},
  author={Redmon, Joseph and Farhadi, Ali},
  journal = {arXiv},
  year={2018}
}
Comments
  • RuntimeError: CUDA error: device-side assert triggered

    RuntimeError: CUDA error: device-side assert triggered

    I use the code to train on my custom dataset. All input images size are 608 x 608, and there are 20 classes, each image has only a bounding box. I follow the structions to custom model and dataset. And I meet a training error, RuntimeError: CUDA error: device-side assert triggered. The error occurs uncertainly, for example, in Epoch 2 Batch 1200, or in Epoch 3 Batch 2000, while the previous epoch can finish training fluently. Following pictures are the detailed error. error It seems that it occurs in build_targets function in model.py, the build_target function is in the utils/utils.py. This error is so difficult to debug!

    opened by JisongXie 41
  • training doesn't converge

    training doesn't converge

    Hi,

    I used COCO to train the code on Tesla V100 on Ubuntu. All the parameters are not changed(i.e. the same as those in the code on github).

    I trained more than 100 epochs, the AP is around 28%, and the loss is around 5.

    I convert the pth model to onnx and plot the network which is the same as that plotted from cfg file. This means that the network is correct, but it doesn't converge.

    Is there any ideas to trace the problem?


    The issue is similar as #489

    the epoch 0/50, the training is continued after more than 100 epochs:

    ---- [Epoch 0/50, Batch 686/15278] ---- +------------+--------------+--------------+--------------+ | Metrics | YOLO Layer 0 | YOLO Layer 1 | YOLO Layer 2 | +------------+--------------+--------------+--------------+ | grid_size | 15 | 30 | 60 | | loss | 0.933914 | 1.042986 | 0.841405 | | x | 0.026712 | 0.023458 | 0.035226 | | y | 0.018076 | 0.014557 | 0.036573 | | w | 0.090962 | 0.039141 | 0.035578 | | h | 0.050231 | 0.027877 | 0.021490 | | conf | 0.724891 | 0.915479 | 0.689265 | | cls | 0.023042 | 0.022475 | 0.023273 | | cls_acc | 65.31% | 64.15% | 60.38% | | recall50 | 0.551020 | 0.528302 | 0.509434 | | recall75 | 0.530612 | 0.509434 | 0.509434 | | precision | 0.586957 | 0.417910 | 0.164634 | | conf_obj | 0.805160 | 0.732810 | 0.785851 | | conf_noobj | 0.002448 | 0.002504 | 0.002176 | +------------+--------------+--------------+--------------+ Total loss 2.818305015563965 ---- ETA 1:31:33.039536 epoch == 000, batch_i==00686, lr == 0.001, loss == 2.818, accuracy_all == 0.0000

    Thanks, Ardeal

    opened by ardeal 20
  • RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

    RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

    Hi! I have some problems about this 'loss = model(imgs, targets)' in train.py Traceback (most recent call last): File "/root/.pycharm_helpers/pydev/pydevd.py", line 1578, in globals = debugger.run(setup['file'], None, None, is_module) File "/root/.pycharm_helpers/pydev/pydevd.py", line 1015, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/root/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/workspace/YOLOv3_pytorch/train.py", line 85, in loss = model(imgs, targets) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/workspace/YOLOv3_pytorch/models.py", line 259, in forward x, *losses = module[0](x, targets) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/workspace/YOLOv3_pytorch/models.py", line 202, in forward loss_cls = (1 / nB) * self.ce_loss(pred_cls[mask], torch.argmax(tcls[mask], dim=1)) File "/usr/local/lib/python3.5/dist-packages/torch/functional.py", line 533, in argmax return torch._argmax(input, dim, keepdim) RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity My environment is python3.5.2, torch1.0.0, GPU K80, linux

    opened by JihaoLee 18
  • Why are there no detection even if training data = validation data?

    Why are there no detection even if training data = validation data?

    I train only 10 images to verify the behavior. I run the training about 200 epochs, however, the detection result is none and the test result shows all APs are equal to 0 and mAP =0, where data/samples and the validation data are same as the training data.

    Why does this problem happen?

    I found the confidences are very small (<0.1) but I cannot clarify why the conf.s are much less than 0.1, while the default conf. threshold is 0.8 in train.py .

    opened by chijan-nh 17
  • the reason why 'no detections found by model'?

    the reason why 'no detections found by model'?

    I want to do transfer learning with using Darknet53.conv.74 backbone, coco128 datasets.

    ---- mAP 0.0
    Training Epoch 1: 100%|█████████████████████████| 16/16 [00:10<00:00,  1.59it/s]
    Training Epoch 2: 100%|█████████████████████████| 16/16 [00:09<00:00,  1.61it/s]
    
    ---- Evaluating Model ----
    Detecting objects: 100%|████████████████████████| 16/16 [00:02<00:00,  5.77it/s]
    metrics_output:  None
    ---- mAP not measured (no detections found by model)
    

    This is the result of $ python train.py --data_config data/coco.data --pretrained_weights weights/darknet53.conv.74.

    Here, why does detection not work? (I didn't change code.)

    opened by 2hyes 14
  • RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat.  This usually means that this function requires a non-empty list of Tensors.  Available functions are [CUDATensorId, CPUTensorId, VariableTensorId]

    RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CUDATensorId, CPUTensorId, VariableTensorId]

    Detecting objects: 0%| | 0/619 [00:00<?, ?it/s]Traceback (most recent call last): File "E:/PyTorch-YOLOv3-master/test.py", line 98, in batch_size=8, File "E:/PyTorch-YOLOv3-master/test.py", line 36, in evaluate for batch_i, (_, imgs, targets) in enumerate(tqdm.tqdm(dataloader, desc="Detecting objects")): File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\tqdm\std.py", line 1108, in iter for obj in iterable: File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch\utils\data\dataloader.py", line 345, in next data = self._next_data() File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data return self._process_data(data) File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data data.reraise() File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch_utils.py", line 394, in reraise raise self.exc_type(msg) RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "D:\Anaconda\envs\PyTorch-YOLOv3-master\lib\site-packages\torch\utils\data_utils\fetch.py", line 47, in fetch return self.collate_fn(data) File "E:\PyTorch-YOLOv3-master\utils\datasets.py", line 141, in collate_fn targets = torch.cat(targets, 0)

    RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CUDATensorId, CPUTensorId, VariableTensorId]

    opened by xiaoyuzhu666 14
  • Training on Custom Data issue

    Training on Custom Data issue

    I am having an issue while training a custom model using pretrained weights Command

    !python3 train.py --batch_size 4 --model_def config/yolov3-custom.cfg --data_config config/custom.data --pretrained_weights weights/darknet53.conv.74

    Error Log

    ---- Evaluating Model ----
    Detecting objects: 100%|##########################| 2/2 [00:07<00:00,  4.11s/it]
    []
    Traceback (most recent call last):
      File "train.py", line 160, in <module>
        batch_size=8,
      File "/home/ubuntu/PyTorch-YOLOv3/test.py", line 54, in evaluate
        true_positives, pred_scores, pred_labels = [np.concatenate(x, 0) for x in list(zip(*sample_metrics))]
    ValueError: not enough values to unpack (expected 3, got 0)
    
    
    opened by codeyogi911 14
  • RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1.

    RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1.

    Hi Everyone,

    I am trying to train on my own data. However, i keep getting this RuntimeError everytime i try to load my images. It loads around 12 images and then it errors out. I made sure that my images are RGB, however, they have different sizes.

    Can anyone help please?

    opened by fatanifh 14
  • TypeError: 'NoneType' object is not subscriptable

    TypeError: 'NoneType' object is not subscriptable

    Have there anyone else who met the same problem as I met? It can train in some batch,however meet the error suddenly. I am sure the path is correct.but I don't know how to solve it ---- [Epoch 0/100, Batch 7/55] ---- +------------+--------------+--------------+--------------+ | Metrics | YOLO Layer 0 | YOLO Layer 1 | YOLO Layer 2 | +------------+--------------+--------------+--------------+ | grid_size | 16 | 32 | 64 | | loss | 53.503120 | 49.941383 | 60.964851 | | x | 0.109302 | 0.079437 | 0.094549 | | y | 0.089693 | 0.093862 | 0.099689 | | w | 1.409947 | 0.991294 | 2.199120 | | h | 0.381467 | 0.345485 | 4.021410 | | conf | 50.943905 | 47.888214 | 53.957447 | | cls | 0.568806 | 0.543090 | 0.592637 | | cls_acc | 2.04% | 0.00% | 12.24% | | recall50 | 0.000000 | 0.000000 | 0.000000 | | recall75 | 0.000000 | 0.000000 | 0.000000 | | precision | 0.000000 | 0.000000 | 0.000000 | | conf_obj | 0.380452 | 0.323845 | 0.408052 | | conf_noobj | 0.388892 | 0.365904 | 0.407760 | +------------+--------------+--------------+--------------+

    File "train.py", line 100, in <module> for batch_i, (_, imgs, targets) in enumerate(dataloader): File "/root/anaconda2/envs/keyan/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 568, in __next__ return self._process_next_batch(batch) File "/root/anaconda2/envs/keyan/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch raise batch.exc_type(batch.exc_msg) TypeError: Traceback (most recent call last): File "/root/anaconda2/envs/keyan/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/root/anaconda2/envs/keyan/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in <listcomp> samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/yanghanxun/PyTorch-YOLOv3_05/utils/datasets.py", line 130, in __getitem__ img, targets = horisontal_flip(img, targets) File "/home/yanghanxun/PyTorch-YOLOv3_05/utils/augmentations.py", line 8, in horisontal_flip targets[:, 2] = 1 - targets[:, 2] TypeError: 'NoneType' object is not subscriptable

    opened by yhx0105 13
  • for issue#339

    for issue#339

    maybe an augmentation cause the target tensor become empty( tensor([ ]) ) , my solution is comment the Affine out so that the bug will be fixed

    Closes #339

    opened by imwxc 12
  • load self-trained darknet weight cannot detect object

    load self-trained darknet weight cannot detect object

    I used the original darknet yolov3 to train and get the weight. Then I used the detect.py to detect with loading darknet weights, but when I printed out the detection, it prints "None". But this weight works fine using darknet.

    opened by TIMETOTIAO 12
  • Bump setuptools from 65.5.0 to 65.5.1

    Bump setuptools from 65.5.0 to 65.5.1

    Bumps setuptools from 65.5.0 to 65.5.1.

    Changelog

    Sourced from setuptools's changelog.

    v65.5.1

    Misc ^^^^

    • #3638: Drop a test dependency on the mock package, always use :external+python:py:mod:unittest.mock -- by :user:hroncok
    • #3659: Fixed REDoS vector in package_index.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump numpy from 1.23.4 to 1.24.1

    Bump numpy from 1.23.4 to 1.24.1

    Bumps numpy from 1.23.4 to 1.24.1.

    Release notes

    Sourced from numpy's releases.

    v1.24.1

    NumPy 1.24.1 Release Notes

    NumPy 1.24.1 is a maintenance release that fixes bugs and regressions discovered after the 1.24.0 release. The Python versions supported by this release are 3.8-3.11.

    Contributors

    A total of 12 people contributed to this release. People with a "+" by their names contributed a patch for the first time.

    • Andrew Nelson
    • Ben Greiner +
    • Charles Harris
    • Clément Robert
    • Matteo Raso
    • Matti Picus
    • Melissa Weber Mendonça
    • Miles Cranmer
    • Ralf Gommers
    • Rohit Goswami
    • Sayed Adel
    • Sebastian Berg

    Pull requests merged

    A total of 18 pull requests were merged for this release.

    • #22820: BLD: add workaround in setup.py for newer setuptools
    • #22830: BLD: CIRRUS_TAG redux
    • #22831: DOC: fix a couple typos in 1.23 notes
    • #22832: BUG: Fix refcounting errors found using pytest-leaks
    • #22834: BUG, SIMD: Fix invalid value encountered in several ufuncs
    • #22837: TST: ignore more np.distutils.log imports
    • #22839: BUG: Do not use getdata() in np.ma.masked_invalid
    • #22847: BUG: Ensure correct behavior for rows ending in delimiter in...
    • #22848: BUG, SIMD: Fix the bitmask of the boolean comparison
    • #22857: BLD: Help raspian arm + clang 13 about __builtin_mul_overflow
    • #22858: API: Ensure a full mask is returned for masked_invalid
    • #22866: BUG: Polynomials now copy properly (#22669)
    • #22867: BUG, SIMD: Fix memory overlap in ufunc comparison loops
    • #22868: BUG: Fortify string casts against floating point warnings
    • #22875: TST: Ignore nan-warnings in randomized out tests
    • #22883: MAINT: restore npymath implementations needed for freebsd
    • #22884: BUG: Fix integer overflow in in1d for mixed integer dtypes #22877
    • #22887: BUG: Use whole file for encoding checks with charset_normalizer.

    Checksums

    ... (truncated)

    Commits
    • a28f4f2 Merge pull request #22888 from charris/prepare-1.24.1-release
    • f8fea39 REL: Prepare for the NumPY 1.24.1 release.
    • 6f491e0 Merge pull request #22887 from charris/backport-22872
    • 48f5fe4 BUG: Use whole file for encoding checks with charset_normalizer [f2py] (#22...
    • 0f3484a Merge pull request #22883 from charris/backport-22882
    • 002c60d Merge pull request #22884 from charris/backport-22878
    • 38ef9ce BUG: Fix integer overflow in in1d for mixed integer dtypes #22877 (#22878)
    • bb00c68 MAINT: restore npymath implementations needed for freebsd
    • 64e09c3 Merge pull request #22875 from charris/backport-22869
    • dc7bac6 TST: Ignore nan-warnings in randomized out tests
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump certifi from 2022.9.24 to 2022.12.7

    Bump certifi from 2022.9.24 to 2022.12.7

    Bumps certifi from 2022.9.24 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Replace own `Mish` implementation by torch's

    Replace own `Mish` implementation by torch's

    Is your feature request related to a problem? Please describe.

    In #695 the mish activation function is implemented. https://github.com/eriklindernoren/PyTorch-YOLOv3/blob/e54d52e6500b7bbd687769f7abfd8581e9f59fd1/pytorchyolo/models.py#L117 Torch now provides this function itself.

    Describe the solution you'd like

    Use this: https://pytorch.org/docs/1.10/generated/torch.nn.functional.mish.html?highlight=mish#torch.nn.functional.mish

    Describe alternatives you've considered

    enhancement 
    opened by jaagut 0
  • Help with poetry install

    Help with poetry install

    I am having an issue where i run poetry install (I am using visual studio and a Jupyter .ipynb file), and this error message is produced: "Because pytorchyolo depends on scipy (^1.9) which doesn't match any versions, version solving failed."

    I have tried fixing the issue but I have no idea what is going wrong, when I run the same code but in google collab it works fine. Does anyone know what is wrong?

    opened by Mike-The-Knight 15
  • Difference implementations between this repo and the faster_rcnn ones

    Difference implementations between this repo and the faster_rcnn ones

    Thank you for the exhaustive resources that you put in here for the community to learn from!

    I've been wondering what the difference between the implementation of mAP for pascal voc from this repository and the ones from https://github.com/longcw/faster_rcnn_pytorch.git

    After spending sometime 'debugging' I came to the conclusion that both should be identical. However, when comparing the result, I get better mAP using the implementation from this repo (75.6) than using the other one (71.2).

    I wonder if anyone have had similar problem or dilemma and could share their experiences?

    opened by ksmdnl 2
Owner
Erik Linder-Norén
ML engineer at Apple. Excited about machine learning, basketball and building things.
Erik Linder-Norén
Minimal diffusion models - Minimal code and simple experiments to play with Denoising Diffusion Probabilistic Models (DDPMs)

Minimal code and simple experiments to play with Denoising Diffusion Probabilist

Rithesh Kumar 16 Oct 6, 2022
YOLOv3 in PyTorch > ONNX > CoreML > TFLite

This repository represents Ultralytics open-source research into future object detection methods, and incorporates lessons learned and best practices

Ultralytics 9.3k Jan 7, 2023
Torchyolo - Yolov3 ve Yolov4 modellerin Pytorch uygulamasıdır

TORCHYOLO : Yolo Modellerin Pytorch Uygulaması Yapılacaklar: Yolov3 model.py ve

Kadir Nar 3 Aug 22, 2022
A high-performance anchor-free YOLO. Exceeding yolov3~v5 with ONNX, TensorRT, NCNN, and Openvino supported.

YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and industrial communities. For more details, please refer to our report on Arxiv.

null 7.7k Jan 6, 2023
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

null 7.7k Jan 3, 2023
Train a state-of-the-art yolov3 object detector from scratch!

TrainYourOwnYOLO: Building a Custom Object Detector from Scratch This repo let's you train a custom image detector using the state-of-the-art YOLOv3 c

AntonMu 616 Jan 8, 2023
Dataset para entrenamiento de yoloV3 para 4 clases

Deteccion de objetos en video Este repo basado en el proyecto PyTorch YOLOv3 para correr detección de objetos sobre video. Construí sobre este proyect

null 1 Nov 1, 2021
This project deals with the detection of skin lesions within the ISICs dataset using YOLOv3 Object Detection with Darknet.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Skin Lesion detection using YOLO This project deal

Lalith Veerabhadrappa Badiger 1 Nov 22, 2021
🔥 TensorFlow Code for technical report: "YOLOv3: An Incremental Improvement"

?? Are you looking for a new YOLOv3 implemented by TF2.0 ? If you hate the fucking tensorflow1.x very much, no worries! I have implemented a new YOLOv

null 3.6k Dec 26, 2022
Object Detection with YOLOv3

Object Detection with YOLOv3 Bu projede YOLOv3-608 modeli kullanılmıştır. Requirements Python 3.8 OpenCV Numpy Documentation Yolo ile ilgili detaylı b

Ayşe Konuş 0 Mar 27, 2022
Multiple custom object count and detection using YOLOv3-Tiny method

Electronic-Component-YOLOv3 Introduce This project created to detect, count, and recognize multiple custom object using YOLOv3-Tiny method. The target

Derwin Mahardika 2 Nov 14, 2022
Minimal PyTorch implementation of Generative Latent Optimization from the paper "Optimizing the Latent Space of Generative Networks"

Minimal PyTorch implementation of Generative Latent Optimization This is a reimplementation of the paper Piotr Bojanowski, Armand Joulin, David Lopez-

Thomas Neumann 117 Nov 27, 2022
PyTorch Implementation of CycleGAN and SSGAN for Domain Transfer (Minimal)

MNIST-to-SVHN and SVHN-to-MNIST PyTorch Implementation of CycleGAN and Semi-Supervised GAN for Domain Transfer. Prerequites Python 3.5 PyTorch 0.1.12

Yunjey Choi 401 Dec 30, 2022
Yolov5-lite - Minimal PyTorch implementation of YOLOv5

Yolov5-Lite: Minimal YOLOv5 + Deep Sort Overview This repo is a shortened versio

Kadir Nar 57 Nov 28, 2022
PyTorch reimplementation of minimal-hand (CVPR2020)

Minimal Hand Pytorch Unofficial PyTorch reimplementation of minimal-hand (CVPR2020). you can also find in youtube or bilibili bare hand youtube or bil

Hao Meng 228 Dec 29, 2022
Minimal But Practical Image Classifier Pipline Using Pytorch, Finetune on ResNet18, Got 99% Accuracy on Own Small Datasets.

PyTorch Image Classifier Updates As for many users request, I released a new version of standared pytorch immage classification example at here: http:

JinTian 106 Nov 6, 2022
Independent and minimal implementations of some reinforcement learning algorithms using PyTorch (including PPO, A3C, A2C, ...).

PyTorch RL Minimal Implementations There are implementations of some reinforcement learning algorithms, whose characteristics are as follow: Less pack

Gemini Light 4 Dec 31, 2022
Minimal implementation of Denoised Smoothing: A Provable Defense for Pretrained Classifiers in TensorFlow.

Denoised-Smoothing-TF Minimal implementation of Denoised Smoothing: A Provable Defense for Pretrained Classifiers in TensorFlow. Denoised Smoothing is

Sayak Paul 19 Dec 11, 2022
Minimal implementation of PAWS (https://arxiv.org/abs/2104.13963) in TensorFlow.

PAWS-TF ?? Implementation of Semi-Supervised Learning of Visual Features by Non-Parametrically Predicting View Assignments with Support Samples (PAWS)

Sayak Paul 43 Jan 8, 2023