{"id":17133080,"url":"https://github.com/youlixx/yolo_v2_tf2","last_synced_at":"2026-06-21T18:30:19.707Z","repository":{"id":184631377,"uuid":"568426779","full_name":"Youlixx/yolo_v2_tf2","owner":"Youlixx","description":"Digit detection using a custom YOLOv2 TF2 implementation with a toy dataset","archived":false,"fork":false,"pushed_at":"2022-11-20T14:12:26.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T14:39:25.642Z","etag":null,"topics":["computer-vision","mnist","object-detection","tensorflow2","yolov2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Youlixx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-20T13:58:49.000Z","updated_at":"2023-05-21T14:03:23.000Z","dependencies_parsed_at":"2023-07-29T11:58:54.814Z","dependency_job_id":null,"html_url":"https://github.com/Youlixx/yolo_v2_tf2","commit_stats":null,"previous_names":["youlixx/yolo_v2_tf2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youlixx%2Fyolo_v2_tf2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youlixx%2Fyolo_v2_tf2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youlixx%2Fyolo_v2_tf2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youlixx%2Fyolo_v2_tf2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Youlixx","download_url":"https://codeload.github.com/Youlixx/yolo_v2_tf2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240261101,"owners_count":19773437,"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":["computer-vision","mnist","object-detection","tensorflow2","yolov2"],"created_at":"2024-10-14T19:29:18.509Z","updated_at":"2026-06-21T18:30:19.637Z","avatar_url":"https://github.com/Youlixx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digit detection using YOLOv2\n\n![digits](https://drive.google.com/uc?export=view\u0026id=1i9CwzKJ4iVLj73W_eDjDrLIltZ4AMV1p)\n\nThis implementation of [YOLOv2](https://arxiv.org/abs/1612.08242) was written for a tutorial session given at Automatants, the Artificial Intelligence association of CentraleSupélec. A replay of the session is available [here](https://www.youtube.com/watch?v=8b2oOXX2uuU) (check it out if you can speak French!)\n\nThe following packages are required\n - tensorflow\n - opencv-python (used in `test.py` to display the images)\n\n## Dataset\n\nThe dataset was synthetically generated, it consists of noisy images with random MNIST digits on it. The goal of the model is to detect the digits on the image using bounding boxes and classify them into 0-9. The digits are uniformly distributed over the whole dataset as it is in the original one.\n\nThe dataset can be downloaded [here](https://drive.google.com/file/d/1f51LLoxgKkyPmR5YesOFmfmZs2DBpZES/view?usp=share_link). The files of the archive should be placed in a folder named `dataset` at the root of the project.\n\n## Train\n\nA model can be trained using the following command\n\n`python train.py --datatset train --epochs 20 --batch_size 16 --learning_rate 0.001 --priors 3 --scaling 16`\n\nwith the following parameters\n - the name of the dataset (train by default)\n - the number of epochs over which the model will be trained\n - the batch size\n - the learning rate\n - the number of prior used by the model\n - the scaling factor of the model (architecture dependent, should be 16 for the default architecture)\n\nThe weights and priors used are saved into `weights`. A pre-trained model can be found [here](https://drive.google.com/file/d/1zZk16IYVg1nWby0jD_tANj0rggkkIHUR/view?usp=share_link)\n\n## Test\n\nThe model can be tested using the following command\n\n`python test.py --dataset test --batch_size 16 --scaling 16 --alpha 0.1 --beta 0.3`\n\nwith the following parameters\n - the name of the dataset (test by default, or test_large which is another test set with large images)\n - the batch size\n - the scaling factor of the model (architecture dependent, should be 16 for the default architecture)\n - the detection threshold alpha\n - the NMS threshold beta\n\nThis script will display the images of the test set with the detected bounding boxes\n\n## Evaluation\n\nThe model can be evaluated using the mAP metric using the following command\n\n`python eval.py --dataset test --batch_size 16 --scaling 16 --alpha 0.1 --beta 0.3`\n\nwith the following parameters\n - the name of the dataset (test by default, or test_large which is another test set with large images)\n - the batch size\n - the scaling factor of the model (architecture dependent, should be 16 for the default architecture)\n - the detection threshold alpha\n - the NMS threshold beta\n\nNote: the current implementation of the mAP is not very accurate. Since the metric is computed across all possible alpha values, the NMS should be recomputed each time which would very time expensive. Right now, a simple approximation of the mAP is given by the script; a more practical way of doing would be by sampling alpha with a fixed step instead of using the continuous approach.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoulixx%2Fyolo_v2_tf2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoulixx%2Fyolo_v2_tf2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoulixx%2Fyolo_v2_tf2/lists"}