{"id":13641427,"url":"https://github.com/Peterisfar/YOLOV3","last_synced_at":"2025-04-20T07:33:35.402Z","repository":{"id":172663298,"uuid":"186973844","full_name":"Peterisfar/YOLOV3","owner":"Peterisfar","description":"yolov3 by pytorch","archived":false,"fork":false,"pushed_at":"2022-06-21T23:27:25.000Z","size":18165,"stargazers_count":196,"open_issues_count":14,"forks_count":53,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T11:38:42.558Z","etag":null,"topics":["mobilenetv2","model-compression","object-detection","pytorch","voc","yolov3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Peterisfar.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}},"created_at":"2019-05-16T07:20:01.000Z","updated_at":"2024-10-08T01:40:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"18a7cb6e-3c65-4bb2-80f7-087c993a6fac","html_url":"https://github.com/Peterisfar/YOLOV3","commit_stats":null,"previous_names":["peterisfar/yolov3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peterisfar%2FYOLOV3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peterisfar%2FYOLOV3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peterisfar%2FYOLOV3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peterisfar%2FYOLOV3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peterisfar","download_url":"https://codeload.github.com/Peterisfar/YOLOV3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249864361,"owners_count":21336727,"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":["mobilenetv2","model-compression","object-detection","pytorch","voc","yolov3"],"created_at":"2024-08-02T01:01:20.649Z","updated_at":"2025-04-20T07:33:35.395Z","avatar_url":"https://github.com/Peterisfar.png","language":"Python","funding_links":[],"categories":["Other Versions of YOLO"],"sub_categories":[],"readme":"# YOLOV3\n---\n# Introduction\nThis is my own YOLOV3 written in pytorch, and is also the first time i have reproduced a object detection model.The dataset used is PASCAL VOC. The eval tool is the voc2010. Now the mAP gains the goal score.\n\nSubsequently, i will continue to update the code to make it more concise , and add the new and efficient tricks.\n\n`Note` : Now this repository supports the model compression in the new branch [model_compression](https://github.com/Peterisfar/YOLOV3/tree/model_compression)\n\n---\n## Results\n\n\n| name | Train Dataset | Val Dataset | mAP(others) | mAP(mine) | notes |\n| :----- | :----- | :------ | :----- | :-----| :-----|\n| YOLOV3-448-544 | 2007trainval + 2012trainval | 2007test | 0.769 | 0.768 \\| - | baseline(augument + step lr) |\n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.793 | 0.803 \\| - | \\+multi-scale training |\n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.806 | 0.811 \\| - | \\+focal loss(note the conf_loss in the start is lower) |\n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.808 | 0.813 \\| - | \\+giou loss |\n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.812 | 0.821 \\| - | \\+label smooth |  \n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.822 | 0.826 \\| - | \\+mixup |  \n| YOLOV3-\\*-544 | 2007trainval + 2012trainval | 2007test | 0.833 | 0.832 \\| 0.840 | \\+cosine lr |\n| YOLOV3-\\*-* | 2007trainval + 2012trainval | 2007test | 0.858 | 0.858 \\| 0.860 | \\+multi-scale test and flip, nms threshold is 0.45 |  \n\n`Note` : \n\n* YOLOV3-448-544 means train image size is 448 and test image size is 544. `\"*\"` means the multi-scale.\n* mAP(mine)'s format is (use_difficult mAP | no_difficult mAP).\n* In the test, the nms threshold is 0.5(except the last one) and the conf_score is 0.01.`others` nms threshold is 0.45(0.45 will increase the mAP)\n* Now only support the single gpu to train and test.\n\n\n---\n## Environment\n\n* Nvida GeForce RTX 2080 Ti\n* CUDA10.0\n* CUDNN7.0\n* ubuntu 16.04\n* python 3.5\n```bash\n# install packages\npip3 install -r requirements.txt --user\n```\n\n---\n## Brief\n\n* [x] Data Augment (RandomHorizontalFlip, RandomCrop, RandomAffine, Resize)\n* [x] Step lr Schedule \n* [x] Multi-scale Training (320 to 640)\n* [x] focal loss\n* [x] GIOU\n* [x] Label smooth\n* [x] Mixup\n* [x] cosine lr\n* [x] Multi-scale Test and Flip\n\n\n\n---\n## Prepared work\n\n### 1、Git clone YOLOV3 repository\n```Bash\ngit clone https://github.com/Peterisfar/YOLOV3.git\n```\nupdate the `\"PROJECT_PATH\"` in the params.py.\n### 2、Download dataset\n* Download Pascal VOC dataset : [VOC 2012_trainval](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar) 、[VOC 2007_trainval](http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar)、[VOC2007_test](http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar). put them in the dir, and update the `\"DATA_PATH\"` in the params.py.\n* Convert data format : Convert the pascal voc *.xml format to custom format (Image_path0 \u0026nbsp; xmin0,ymin0,xmax0,ymax0,class0 \u0026nbsp; xmin1,ymin1...)\n\n```bash\ncd YOLOV3 \u0026\u0026 mkdir data\ncd utils\npython3 voc.py # get train_annotation.txt and test_annotation.txt in data/\n```\n\n### 3、Download weight file\n* Darknet pre-trained weight :  [darknet53-448.weights](https://pjreddie.com/media/files/darknet53_448.weights) \n* This repository test weight : [best.pt](https://pan.baidu.com/s/1MdE2zfIND9NYd9mWytMX8g)\n\nMake dir `weight/` in the YOLOV3 and put the weight file in.\n\n---\n## Train\n\nRun the following command to start training and see the details in the `config/yolov3_config_voc.py`\n\n```Bash\nWEIGHT_PATH=weight/darknet53_448.weights\n\nCUDA_VISIBLE_DEVICES=0 nohup python3 -u train.py --weight_path $WEIGHT_PATH --gpu_id 0 \u003e nohup.log 2\u003e\u00261 \u0026\n\n```\n\n`Notes:`\n\n* Training steps could run the `\"cat nohup.log\"` to print the log.\n* It supports to resume training adding `--resume`, it will load `last.pt` automaticly.\n\n---\n## Test\nYou should define your weight file path `WEIGHT_FILE` and test data's path `DATA_TEST`\n```Bash\nWEIGHT_PATH=weight/best.pt\nDATA_TEST=./data/test # your own images\n\nCUDA_VISIBLE_DEVICES=0 python3 test.py --weight_path $WEIGHT_PATH --gpu_id 0 --visiual $DATA_TEST --eval\n\n```\nThe images can be seen in the `data/`\n\n---\n## TODO\n\n* [ ] Mish\n* [ ] OctConv\n* [ ] Custom data\n\n\n---\n## Reference\n\n* tensorflow : https://github.com/Stinky-Tofu/Stronger-yolo\n* pytorch : https://github.com/ultralytics/yolov3\n* keras : https://github.com/qqwweee/keras-yolo3\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeterisfar%2FYOLOV3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPeterisfar%2FYOLOV3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeterisfar%2FYOLOV3/lists"}