{"id":18614296,"url":"https://github.com/minar09/yolov3-pytorch","last_synced_at":"2025-04-11T00:30:31.768Z","repository":{"id":67770005,"uuid":"224140100","full_name":"minar09/yolov3-pytorch","owner":"minar09","description":"yolov3 model in pytorch implementation, customized for single class training and testing","archived":false,"fork":false,"pushed_at":"2019-11-29T03:32:09.000Z","size":971,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T06:51:12.643Z","etag":null,"topics":["darknet","object-detection","pytorch","real-time","single-class","testing","training","yolo","yolov3","you-only-look-once"],"latest_commit_sha":null,"homepage":"https://github.com/ultralytics/yolov3","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minar09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-26T08:27:22.000Z","updated_at":"2022-04-27T02:53:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"fec9bac8-672e-4d9b-a431-1de8ec98d48f","html_url":"https://github.com/minar09/yolov3-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minar09%2Fyolov3-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minar09%2Fyolov3-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minar09%2Fyolov3-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minar09%2Fyolov3-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minar09","download_url":"https://codeload.github.com/minar09/yolov3-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322201,"owners_count":21084333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["darknet","object-detection","pytorch","real-time","single-class","testing","training","yolo","yolov3","you-only-look-once"],"created_at":"2024-11-07T03:25:52.896Z","updated_at":"2025-04-11T00:30:31.755Z","avatar_url":"https://github.com/minar09.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/26833433/61591130-f7beea00-abc2-11e9-9dc0-d6abcf41d713.jpg\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n    \u003ca href=\"https://www.ultralytics.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://storage.googleapis.com/ultralytics/logo/logoname1000.png\" width=\"160\"\u003e\u003c/a\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/26833433/61591093-2b4d4480-abc2-11e9-8b46-d88eb1dabba1.jpg\"\u003e\n          \u003ca href=\"https://itunes.apple.com/app/id1452689527\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/26833433/50044365-9b22ac00-0082-11e9-862f-e77aee7aa7b0.png\" width=\"180\"\u003e\u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/26833433/61591100-55066b80-abc2-11e9-9647-52c0e045b288.jpg\"\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# Disclaimer\n\nThis repository is a customized version for single class training. For more details and issues, please refer to the original repository: https://github.com/ultralytics/yolov3.\n\n# Introduction\n\nThis directory contains PyTorch YOLOv3 software developed by Ultralytics LLC, and **is freely available for redistribution under the GPL-3.0 license**. For more information please visit https://www.ultralytics.com.\n\n# Description\n\nThe https://github.com/ultralytics/yolov3 repo contains inference and training code for YOLOv3 in PyTorch. The code works on Linux, MacOS and Windows. Training is done on the COCO dataset by default: https://cocodataset.org/#home. **Credit to Joseph Redmon for YOLO:** https://pjreddie.com/darknet/yolo/.\n\n# Requirements\n\nPython 3.7 or later with the following `pip3 install -U -r requirements.txt` packages:\n\n- `numpy`\n- `torch \u003e= 1.1.0`\n- `opencv-python`\n- `tqdm`\n\n# Tutorials\n\n* [GCP Quickstart](https://github.com/ultralytics/yolov3/wiki/GCP-Quickstart)\n* [Transfer Learning](https://github.com/ultralytics/yolov3/wiki/Example:-Transfer-Learning)\n* [Train Single Image](https://github.com/ultralytics/yolov3/wiki/Example:-Train-Single-Image)\n* [Train Single Class](https://github.com/ultralytics/yolov3/wiki/Example:-Train-Single-Class)\n* [Train Custom Data](https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data)\n\n# Jupyter Notebook\n\nOur Jupyter [notebook](https://colab.research.google.com/github/ultralytics/yolov3/blob/master/examples.ipynb) provides quick training, inference and testing examples.\n\n# Training\n\n**Start Training:** `python3 train.py` to begin training after downloading COCO data with `data/get_coco_dataset.sh`. Each epoch trains on 117,263 images from the train and validate COCO sets, and tests on 5000 images from the COCO validate set.\n\n**Resume Training:** `python3 train.py --resume` to resume training from `weights/last.pt`.\n\n**Plot Training:** `from utils import utils; utils.plot_results()` plots training results from `coco_16img.data`, `coco_64img.data`, 2 example datasets available in the `data/` folder, which train and test on the first 16 and 64 images of the COCO2014-trainval dataset.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/63258271-fe9d5300-c27b-11e9-9a15-95038daf4438.png\" width=\"900\"\u003e\n\n## Image Augmentation\n\n`datasets.py` applies random OpenCV-powered (https://opencv.org/) augmentation to the input images in accordance with the following specifications. Augmentation is applied **only** during training, not during inference. Bounding boxes are automatically tracked and updated with the images. 416 x 416 examples pictured below.\n\nAugmentation | Description\n--- | ---\nTranslation | +/- 10% (vertical and horizontal)\nRotation | +/- 5 degrees\nShear | +/- 2 degrees (vertical and horizontal)\nScale | +/- 10%\nReflection | 50% probability (horizontal-only)\nH**S**V Saturation | +/- 50%\nHS**V** Intensity | +/- 50%\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/66699231-27beea80-ece5-11e9-9cad-bdf9d82c500a.jpg\" width=\"900\"\u003e\n\n## Speed\n\nhttps://cloud.google.com/deep-learning-vm/  \n**Machine type:** n1-standard-8 (8 vCPUs, 30 GB memory)  \n**CPU platform:** Intel Skylake  \n**GPUs:** K80 ($0.20/hr), T4 ($0.35/hr), V100 ($0.83/hr) CUDA with [Nvidia Apex](https://github.com/NVIDIA/apex) FP16/32  \n**HDD:** 100 GB SSD  \n**Dataset:** COCO train 2014 (117,263 images)\n\nGPUs | `batch_size` | images/sec | epoch time | epoch cost\n--- |---| --- | --- | --- \nK80 | 64 (32x2) | 11  | 175 min  | $0.58\nT4 | 64 (32x2) | 40  | 49 min  | $0.29\nT4 x2 | 64 (64x1) | 61  | 32 min  | $0.36\nV100 | 64 (32x2) | 115 | 17 min | $0.24\nV100 x2 | 64 (64x1) | 150 | 13 min | $0.36\n2080Ti | 64 (32x2) | 81  | 24 min  | - \n2080Ti x2 | 64 (64x1) | 140  | 14 min  | - \n\n# Inference\n\n`detect.py` runs inference on any sources:\n\n```bash\npython3 detect.py --source ...\n```\n\n- Image:  `--source file.jpg`\n- Video:  `--source file.mp4`\n- Directory:  `--source dir/`\n- Webcam:  `--source 0`\n- RTSP stream:  `--source rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa`\n- HTTP stream:  `--source http://wmccpinetop.axiscam.net/mjpg/video.mjpg`\n\nTo run a specific models:\n\n**YOLOv3:** `python3 detect.py --cfg cfg/yolov3.cfg --weights weights/yolov3.weights`\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/64067835-51d5b500-cc2f-11e9-982e-843f7f9a6ea2.jpg\" width=\"500\"\u003e\n\n**YOLOv3-tiny:** `python3 detect.py --cfg cfg/yolov3-tiny.cfg --weights weights/yolov3-tiny.weights`\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/64067834-51d5b500-cc2f-11e9-9357-c485b159a20b.jpg\" width=\"500\"\u003e\n\n**YOLOv3-SPP:** `python3 detect.py --cfg cfg/yolov3-spp.cfg --weights weights/yolov3-spp.weights`\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/64067833-51d5b500-cc2f-11e9-8208-6fe197809131.jpg\" width=\"500\"\u003e\n\n\n# Pretrained Weights\n\n- Darknet `*.weights` format: https://pjreddie.com/media/files/yolov3.weights\n- PyTorch `*.pt` format: https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI\n\n## Darknet Conversion\n\n```bash\n$ git clone https://github.com/ultralytics/yolov3 \u0026\u0026 cd yolov3\n\n# convert darknet cfg/weights to pytorch model\n$ python3  -c \"from models import *; convert('cfg/yolov3-spp.cfg', 'weights/yolov3-spp.weights')\"\nSuccess: converted 'weights/yolov3-spp.weights' to 'converted.pt'\n\n# convert cfg/pytorch model to darknet weights\n$ python3  -c \"from models import *; convert('cfg/yolov3-spp.cfg', 'weights/yolov3-spp.pt')\"\nSuccess: converted 'weights/yolov3-spp.pt' to 'converted.weights'\n```\n\n# mAP\n\n- `test.py --weights weights/yolov3.weights` tests official YOLOv3 weights.\n- `test.py --weights weights/last.pt` tests most recent checkpoint.\n- `test.py --weights weights/best.pt` tests best checkpoint.\n- Compare to darknet published results https://arxiv.org/abs/1804.02767.\n\n[ultralytics/yolov3](https://github.com/ultralytics/yolov3) mAP@0.5 ([darknet](https://arxiv.org/abs/1804.02767)-reported mAP@0.5)\n\n\u003ci\u003e\u003c/i\u003e         | 320         | 416         | 608\n---             | ---         | ---         | ---\n`YOLOv3`        | 51.8 (51.5) | 55.4 (55.3) | 58.2 (57.9)\n`YOLOv3-SPP`    | 53.7        | 57.7        | 60.7 (60.6)\n`YOLOv3-tiny`   | 29.0        | 32.9 (33.1) | 35.5\n\n```bash\n$ python3 test.py --save-json --img-size 608\nNamespace(batch_size=16, cfg='cfg/yolov3-spp.cfg', conf_thres=0.001, data='data/coco.data', img_size=608, iou_thres=0.5, nms_thres=0.5, save_json=True, weights='weights/yolov3-spp.weights')\nUsing CUDA device0 _CudaDeviceProperties(name='Tesla T4', total_memory=15079MB)\n                Class    Images   Targets         P         R       mAP        F1: 100% 313/313 [07:40\u003c00:00,  2.34s/it]\n                  all     5e+03  3.58e+04     0.119     0.788     0.594     0.201\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.367 \u003c---\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.607 \u003c---\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.387\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.208\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.392\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.487\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.297\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.465\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.495\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.332\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.518\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.621\n\n$ python3 test.py --save-json --img-size 416\nNamespace(batch_size=16, cfg='cfg/yolov3-spp.cfg', conf_thres=0.001, data='data/coco.data', img_size=416, iou_thres=0.5, nms_thres=0.5, save_json=True, weights='weights/yolov3s-ultralytics.pt')\nUsing CUDA device0 _CudaDeviceProperties(name='Tesla T4', total_memory=15079MB)\n                Class    Images   Targets         P         R       mAP        F1: 100% 313/313 [07:01\u003c00:00,  1.41s/it]\n                  all     5e+03  3.58e+04      0.11     0.739     0.569     0.185\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.373\n Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.577\n Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.392\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.175\n Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.403\n Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.537\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.313\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.482\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.501\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.266\n Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.541\n Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693\n```\n\n# Citation\n\n[![DOI](https://zenodo.org/badge/146165888.svg)](https://zenodo.org/badge/latestdoi/146165888)\n\n# Contact\n\nIssues should be raised directly in the repository. For additional questions or comments please email Glenn Jocher at glenn.jocher@ultralytics.com or visit us at https://contact.ultralytics.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminar09%2Fyolov3-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminar09%2Fyolov3-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminar09%2Fyolov3-pytorch/lists"}