All Projects → ibaiGorordo → ONNX-ImageNet-1K-Object-Detector

ibaiGorordo / ONNX-ImageNet-1K-Object-Detector

Licence: MIT License
Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX. The repository combines a class agnostic object localizer to first detect the objects in the image, and next a ResNet50 model trained on ImageNet is used to label each box.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ONNX-ImageNet-1K-Object-Detector

Unity Detection2AR
Localize 2D image object detection in 3D Scene with Yolo in Unity Barracuda and ARFoundation.
Stars: ✭ 147 (+716.67%)
Mutual labels:  onnx, object-localization
Pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 676 (+3655.56%)
Mutual labels:  imagenet, onnx
Php Opencv Examples
Tutorial for computer vision and machine learning in PHP 7/8 by opencv (installation + examples + documentation)
Stars: ✭ 333 (+1750%)
Mutual labels:  imagenet, onnx
pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 788 (+4277.78%)
Mutual labels:  imagenet, onnx
model-zoo-old
The ONNX Model Zoo is a collection of pre-trained models for state of the art models in deep learning, available in the ONNX format
Stars: ✭ 38 (+111.11%)
Mutual labels:  onnx
lego-art-remix
Powerful computer vision assisted Lego mosaic creator · Over 500,000 images created (so far!)
Stars: ✭ 148 (+722.22%)
Mutual labels:  onnx
Attack-ImageNet
No.2 solution of Tianchi ImageNet Adversarial Attack Challenge.
Stars: ✭ 41 (+127.78%)
Mutual labels:  imagenet
vs-mlrt
Efficient ML Filter Runtimes for VapourSynth (with built-in support for waifu2x, DPIR, RealESRGANv2, and Real-CUGAN)
Stars: ✭ 34 (+88.89%)
Mutual labels:  onnx
AI-LAB
This repository contains a docker image that I use to develop my artificial intelligence applications in an uncomplicated fashion. Python, TensorFlow, PyTorch, ONNX, Keras, OpenCV, TensorRT, Numpy, Jupyter notebook... 🐋🔥
Stars: ✭ 44 (+144.44%)
Mutual labels:  onnx
person-detection
TensorRT person tracking RFBNet300
Stars: ✭ 30 (+66.67%)
Mutual labels:  onnx
openvino pytorch layers
How to export PyTorch models with unsupported layers to ONNX and then to Intel OpenVINO
Stars: ✭ 17 (-5.56%)
Mutual labels:  onnx
YOLOX
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Stars: ✭ 6,570 (+36400%)
Mutual labels:  onnx
perceptual-advex
Code and data for the ICLR 2021 paper "Perceptual Adversarial Robustness: Defense Against Unseen Threat Models".
Stars: ✭ 44 (+144.44%)
Mutual labels:  imagenet
tf-imagenet
TensorFlow ImageNet - Training and SOTA checkpoints
Stars: ✭ 50 (+177.78%)
Mutual labels:  imagenet
keras cv attention models
Keras/Tensorflow attention models including beit,botnet,CMT,CoaT,CoAtNet,convnext,cotnet,davit,efficientdet,efficientnet,fbnet,gmlp,halonet,lcnet,levit,mlp-mixer,mobilevit,nfnets,regnet,resmlp,resnest,resnext,resnetd,swin,tinynet,uniformer,volo,wavemlp,yolor,yolox
Stars: ✭ 159 (+783.33%)
Mutual labels:  imagenet
Tiny-Imagenet-200
🔬 Some personal research code on analyzing CNNs. Started with a thorough exploration of Stanford's Tiny-Imagenet-200 dataset.
Stars: ✭ 68 (+277.78%)
Mutual labels:  imagenet
wonnx
A GPU-accelerated ONNX inference run-time written 100% in Rust, ready for the web
Stars: ✭ 160 (+788.89%)
Mutual labels:  onnx
Swin-Transformer
This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows".
Stars: ✭ 8,046 (+44600%)
Mutual labels:  imagenet
Fast Stacked Hourglass Network OpenVino
A fast stacked hourglass network for human pose estimation on OpenVino
Stars: ✭ 52 (+188.89%)
Mutual labels:  onnx
TS-CAM
Codes for TS-CAM: Token Semantic Coupled Attention Map for Weakly Supervised Object Localization.
Stars: ✭ 96 (+433.33%)
Mutual labels:  object-localization

ONNX-ImageNet-1K-Object-Detector

Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX. The repository combines a class agnostic object localizer to first detect the objects in the image, and next a ResNet50 model trained on ImageNet is used to label each box.

Imagenet 1K Object Detection Original image: https://commons.wikimedia.org/wiki/File:Il_cuore_di_Como.jpg

Why

There are a lot of object detection models, but since most of them are trained in the COCO dataset, most of them can only detect a maximum of 80 classes. This repository proposes a "quick and dirty" solution to be able to detect the 1000 objects available in the ImageNet dataset.

Important

  • This model uses a lightweight class agnostic object localizer to first detect the objects. Therefore, this repository is not going to behave as well as other object detection models in complex scenes. In those cases, the object localizer will fail quickly and therefore no objects will be detected.
  • The ResNet50 clasifier is fast in a desktop GPU, however, since it needs to run for each of the detected boxes, the performance might be affected for images with many objects.

Requirements

  • Check the requirements.txt file.

Installation

pip install -r requirements.txt

ONNX model

  • Class Agnostic Object Localizer: The original model from TensorflowHub (link at the bottom) was converted to different formats (including .onnx) by PINTO0309, the models can be found in his repository. This repository will automatically download the model if the model is not found in the models folder.

  • ResNet50 Classifier: The original model from PaddleClas (link at the bottom) was converted to ONNX format using a similar procedure as the one described in this article by PINTO0309. This repository will automatically download the model.

How to use

  • Image inference:
python image_object_detection.py
  • Video inference:
python video_object_detection.py
  • Webcam inference:
python webcam_object_detection.py

Examples

Macaque Detection

Macaque Detection Original image: https://commons.wikimedia.org/wiki/File:Onsen_Monkey.JPG

Christmas Stocking Detection

Christmas Stocking Detection Original image: https://unsplash.com/photos/paSqTlm3DsA

Burrito Detection

Burrito Detection Original image: https://commons.wikimedia.org/wiki/File:Breakfast_burrito_(cropped).jpg

Bridge Detection

Bridge Detection Original image: https://commons.wikimedia.org/wiki/File:Bayonne_Bridge_Collins_Pk_jeh-2.JPG

[Inference video Example]

1k.detector.output_Trim.mp4

Original video: https://www.pexels.com/video/a-medusa-jellyfish-swimming-gracefully-underwater-2731905/ (by Vova Krasilnikov)

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].