{"id":24482336,"url":"https://github.com/cccaaannn/yolo_predictor","last_synced_at":"2026-04-29T01:03:56.609Z","repository":{"id":112740991,"uuid":"327479225","full_name":"cccaaannn/yolo_predictor","owner":"cccaaannn","description":"Predict images with tensorflow converted darknet yolov4 model in a single line.","archived":false,"fork":false,"pushed_at":"2021-01-16T05:13:49.000Z","size":1990,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T12:16:51.071Z","etag":null,"topics":["predict-images","tensorflow","yolo-predictor","yolov4"],"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/cccaaannn.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,"zenodo":null}},"created_at":"2021-01-07T02:15:26.000Z","updated_at":"2021-01-16T05:13:51.000Z","dependencies_parsed_at":"2023-09-13T17:21:21.438Z","dependency_job_id":null,"html_url":"https://github.com/cccaaannn/yolo_predictor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cccaaannn/yolo_predictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cccaaannn%2Fyolo_predictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cccaaannn%2Fyolo_predictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cccaaannn%2Fyolo_predictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cccaaannn%2Fyolo_predictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cccaaannn","download_url":"https://codeload.github.com/cccaaannn/yolo_predictor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cccaaannn%2Fyolo_predictor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["predict-images","tensorflow","yolo-predictor","yolov4"],"created_at":"2025-01-21T12:13:26.095Z","updated_at":"2026-04-29T01:03:56.603Z","avatar_url":"https://github.com/cccaaannn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Yolo predictor\n### Predict images with tensorflow converted darknet yolov4 model in a single line.\n---\n\n![GitHub top language](https://img.shields.io/github/languages/top/cccaaannn/yolo_predictor?style=flat-square) ![](https://img.shields.io/github/repo-size/cccaaannn/yolo_predictor?style=flat-square) [![GitHub license](https://img.shields.io/github/license/cccaaannn/yolo_predictor?style=flat-square)](https://github.com/cccaaannn/yolo_predictor/blob/master/LICENSE)\n\n\n## Before starting\n- Yolo predictor predicts single or multiple images with [darknet yolo](https://github.com/AlexeyAB/darknet) model\n- Model has to be converted to tensorflow, you can use this repo for converting the model [github.com/hunglc007/tensorflow-yolov4-tflite](https://github.com/hunglc007/tensorflow-yolov4-tflite)\n- Tested with tensorflow 2.4.0\n\n\n## Usage\n### Predict a single image\n```shell\npython predict.py -m model_files/yolov4_coco -n model_files/coco.names -i test_images/dog.jpg --show\n```\n\n### Predict a directory of images\n```shell\npython predict.py -m model_files/yolov4_coco -n model_files/coco.names -d test_images --show\n```\n\n### Save predicted images\n```shell\npython predict.py -m model_files/yolov4_coco -n model_files/coco.names -d test_images --save_folder test_results\n```\n\n### All arguments\n```\nModel arguments:\n  -m, --model_path          Tensorflow converted saved model FOLDER path\n  -n, --names_path          Class (names) file path\n\nImage arguments:\n  -d, --dir_path            Directory of the images\n  -i, --image_path          Path of the image\n\nDraw arguments:\n  -s, --show                Draw and show images with bounding boxes\n  --save_folder             Save folder for drawn images with bounding boxes\n  --resize                  Resize images with given dim, Ex: 1280 720\n  --suffix                  Saved file suffix. Ex: '_predicted' dog.jpg -\u003e dog_predicted.jpg\n```\n\n## Example results\n\u003c/br\u003e\u003cimg src=\"readme_images/dog_predicted.jpg\" alt=\"drawing\" width=\"400\"/\u003e \u003cimg src=\"readme_images/person_predicted.jpg\" alt=\"drawing\" width=\"400\"/\u003e\u003c/br\u003e\n\n### For more flexibility you can use yolo_predictor class\n```python\nfrom yolo_predictor import yolo_predictor\nfrom yolo_drawer import yolo_drawer\n\nmodel_path = \"model_files/yolov4_coco.weights\"\nnames_path = \"model_files/coco.names\"\nimage_path = \"test_images/dog.jpg\"\n\n# init model\npredictor = yolo_predictor(model_path, names_path)\n\n# predict\npredictions = predictor.predict(image_path)\nprint(predictions)\n\n# draw image\ndrawer = yolo_drawer()\nimage, save_path = drawer.draw(predictions, image_path, show=False, resize=False, save_folder_path=\"test_results\")\n\nimport cv2\ncv2.imshow(\"Predicted \" + save_path, image)\ncv2.waitKey()\n```\n\n### Output\n```\n[(class_name, class_index, confidence, (x, y, w, h)), (class_name, class_index, confidence, (x, y, w, h)), ...]\n```\n```shell\n[('bicycle', 1, 0.9867098, (0.4529685378074646, 0.48244842886924744, 0.573084, 0.5117002)), ('dog', 16, 0.98514426, (0.28938552737236023, 0.6685629785060883, 0.23469335, 0.5305287)), ('truck', 7, 0.92009175, (0.754764.7547647655010223, 0.2147115096449852, 0.296138, 0.16953142))]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcccaaannn%2Fyolo_predictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcccaaannn%2Fyolo_predictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcccaaannn%2Fyolo_predictor/lists"}