{"id":15662195,"url":"https://github.com/iitzco/opencv-dnn-samples","last_synced_at":"2025-07-14T01:14:42.498Z","repository":{"id":52482011,"uuid":"137523594","full_name":"iitzco/OpenCV-dnn-samples","owner":"iitzco","description":"How to run inference on different models using OpenCV's dnn package","archived":false,"fork":false,"pushed_at":"2018-06-15T21:44:52.000Z","size":74623,"stargazers_count":20,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T23:11:56.870Z","etag":null,"topics":["deep-learning","dnn","opencv"],"latest_commit_sha":null,"homepage":null,"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/iitzco.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}},"created_at":"2018-06-15T19:14:51.000Z","updated_at":"2025-04-03T08:27:40.000Z","dependencies_parsed_at":"2022-09-03T01:21:16.091Z","dependency_job_id":null,"html_url":"https://github.com/iitzco/OpenCV-dnn-samples","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/iitzco%2FOpenCV-dnn-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitzco%2FOpenCV-dnn-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitzco%2FOpenCV-dnn-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitzco%2FOpenCV-dnn-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iitzco","download_url":"https://codeload.github.com/iitzco/OpenCV-dnn-samples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590627,"owners_count":21772940,"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":["deep-learning","dnn","opencv"],"created_at":"2024-10-03T13:30:38.491Z","updated_at":"2025-05-05T23:12:10.999Z","avatar_url":"https://github.com/iitzco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenCV dnn samples\n\nHere you can find 3 different examples (Tensorflow, Caffe and Torch) on how to use the `dnn` package from OpenCV. The idea is to understand how the package can be used to make inferences on any trained model.\n\nFor each model used, you need to understand the meaning of their output values.\n\n\u003e **Attention**: this code runs under Python3\n\n## Why is this cool?\n\nThere is no need to install any Deep Learning framework! With just OpenCV you can make inferences on trained graphs from these common frameworks: Tensorflow, Caffe and Torch.\n\n## How to use?\n\n1. Clone the repo.\n2. *Optional* Create a virtual environment (for example, using `virtualenv`) to keep dependencies isolated.\n3. Run `pip install -r requirements.txt`\n4. Run any of the following samples:\n\n#### Tensorflow\n\nYou can run an Object Detection model based on SSD+MobileNet trained on COCO dataset.\n\n```bash\n$ python main_tensorflow.py ./images/people.jpg\n```\n\nThe used model was extracted from the official Tensorflow Object Detection API Zoo [here](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md)\n\n#### Caffe\n\nYou can run an Image Classification Detection model trained on ImageNet dataset.\n\n```bash\n$ python main_caffe.py ./images/eagle.png\n```\n\nThis model was extracted from the code that [this](https://www.pyimagesearch.com/2017/08/21/deep-learning-with-opencv/) excellent post provides.\n\n#### Torch\n\nYou can run an Image Classification Detection model trained on ImageNet dataset.\n\n```bash\n$ python main_torch.py ./images/eagle.png\n```\n\nThe model needs to be downloaded because it's not included in this repo. Go to `./torch/` to get the link to the official download URL. The model was extracted from [here](https://github.com/facebook/fb.resnet.torch/tree/master/pretrained).\n\n## Acknowledge\n\n* Refer to [this blogpost](https://habr.com/company/intel/blog/333612/) written by the author of the `dnn` package.\n* More information here: https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitzco%2Fopencv-dnn-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitzco%2Fopencv-dnn-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitzco%2Fopencv-dnn-samples/lists"}