• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python scripts performing Instance Segmentation using the YOLOv8 model in ONNX.

ONNX YOLOv8 Instance Segmentation

Python scripts performing instance segmentation using the YOLOv8 model in ONNX.

! ONNX YOLOv8 Instance Segmentation Original image: https://commons.wikimedia.org/wiki/File:Giraffes_at_west_midlands_safari_park.jpg

Important

  • The input images are directly resized to match the input size of the model. I skipped adding the pad to the input image (image letterbox), it might affect the accuracy of the model if the input image has a different aspect ratio compared to the input size of the model. Always try to get an input size with a ratio close to the input images you will use.

Requirements

  • Check the requirements.txt file.
  • For ONNX, if you have a NVIDIA GPU, then install the onnxruntime-gpu, otherwise use the onnxruntime library.

Installation

git clone https://github.com/ibaiGorordo/ONNX-YOLOv8-Instance-Segmentation.git
cd ONNX-YOLOv8-Instance-Segmentation
pip install -r requirements.txt

ONNX Runtime

For Nvidia GPU computers: pip install onnxruntime-gpu

Otherwise: pip install onnxruntime

ONNX model

You can convert the Pytorch model to ONNX using the following Google Colab notebook: Open In Colab

  • The License of the models is GPL-3.0 license: License

Original YOLOv8 model

The original YOLOv8 Instance Segmentation model can be found in this repository: YOLOv8 Instance Segmentation

Examples

  • Image inference:
python image_instance_segmentation.py
  • Webcam inference:
python webcam_instance_segmentation.py
python video_instance_segmentation.py

!YOLOv8 instance segmentation video Original video: https://youtu.be/-bhSSispEcg

References:

More Repositories

1

pyKinectAzure

Python library to run Kinect Azure DK SDK functions
Python
446
star
2

ONNX-YOLOv8-Object-Detection

Python scripts performing object detection using the YOLOv8 model in ONNX.
Python
376
star
3

CREStereo-Pytorch

Non-official Pytorch implementation of the CREStereo(CVPR 2022 Oral).
Python
216
star
4

ONNX-YOLOv7-Object-Detection

Python scripts performing object detection using the YOLOv7 model in ONNX.
Python
201
star
5

AWR1642-Read-Data-Python-MMWAVE-SDK-2

Python program to read and plot the data in real time from the AWR1642 and IWR1642 mmWave radar boards (Texas Instruments).
Python
132
star
6

AWR1843-Read-Data-Python-MMWAVE-SDK-3-

Python program to read and plot the data in real time from the AWR1843 mmWave radar board (MMWAVE SDK 3)
Python
131
star
7

ONNX-SAM2-Segment-Anything

Python scripts for the Segment Anythin 2 (SAM2) model in ONNX
Python
131
star
8

HITNET-Stereo-Depth-estimation

Python scripts for performing stereo depth estimation using the HITNET Tensorflow model.
Python
123
star
9

ONNX-CREStereo-Depth-Estimation

Python scripts performing stereo depth estimation using the CREStereo model in ONNX.
Python
121
star
10

ONNX-Mobile-Human-Pose-3D

Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.
Python
120
star
11

ONNX-YOLOv6-Object-Detection

Python scripts performing object detection using the YOLOv6 model in ONNX.
Python
93
star
12

ONNX-Unidepth-Monocular-Metric-Depth-Estimation

Python scripts performing Metric Monocular Depth Estimation using the Unidepth model in ONNX.
Python
74
star
13

IWR1443-Read-Data-Python-MMWAVE-SDK-1

Python program to read and plot the position of the reflected points from the IWR1443 and the AWR1443. It works both with Windows and Raspberry Pi.
Python
69
star
14

Ultrafast-Lane-Detection-Inference-Pytorch-

Example scripts for the detection of lanes using the ultra fast lane detection model in Pytorch.
Python
69
star
15

ONNX-HybridNets-Multitask-Road-Detection

Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONNX.
Python
67
star
16

Sapiens-Pytorch-Inference

Minimal code and examnples for inferencing Sapiens foundation human models in Pytorch
Python
62
star
17

BlazeFace-TFLite-Inference

Python scripts to detect faces in Python with the BlazeFace Tensorflow Lite models
Python
61
star
18

ONNX-CenterSnap-6D-Pose-and-Shape-Estimation

Python scripts for performing 6D pose estimation and shape reconstruction using the CenterSnap model in ONNX
Python
55
star
19

onnx-Ultra-Fast-Lane-Detection-Inference

Example scripts for the detection of lanes using the ultra fast lane detection model in ONNX.
Python
48
star
20

PyTorch-High-Res-Stereo-Depth-Estimation

Python scripts form performing stereo depth estimation using the high res stereo model in PyTorch .
Python
47
star
21

ONNX-HITNET-Stereo-Depth-estimation

Python scripts form performing stereo depth estimation using the HITNET model in ONNX.
Python
46
star
22

TFLite-Mobile-Generic-Object-Localizer

Python TFLite scripts for detecting objects of any class in an image without knowing their label.
Python
45
star
23

depthai-android-jni-example

Android example to get the rgb and disparity images from the OAK-D device connected to a phone.
C++
44
star
24

Mediapipe-Halloween-Examples

Python scripts using the Mediapipe models for Halloween.
Python
40
star
25

ONNX-HRNET-Human-Pose-Estimation

Python scripts for performing 2D human pose estimation using the HRNET family models in ONNX.
Python
39
star
26

ONNX-FastACVNet-Depth-Estimation

Python scripts performing stereo depth estimation using the Fast-ACVNet model in ONNX.
Python
39
star
27

ONNX-MobileStereoNet

Python scripts for performing stereo depth estimation using the MobileStereoNet model in ONNX
Python
39
star
28

ONNX-YOLOv5-Instance-Segmentation

Python scripts performing instance segmentation using the YOLOv5 model in ONNX.
Python
36
star
29

TFLite-HITNET-Stereo-depth-estimation

Python scripts form performing stereo depth estimation using the HITNET model in Tensorflow Lite.
Python
36
star
30

ONNX-HAWP-Line-Detection

Python scripts for performing line detection using the HAWP model in ONNX.
Python
35
star
31

ONNX-RAFT-Optical-Flow-Estimation

Python scripts for performing optical flow estimation using the RAFT model in ONNX
Python
35
star
32

Pytorch-KP2D-Feature-Tracking

Python scripts for performing 2D feature detection and tracking using the KP2D model in Pytorch
Python
33
star
33

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.
Python
33
star
34

ONNX-LSTR-Lane-Detection

Python scripts for performing lane detection using the LSTR model in ONNX
Python
32
star
35

ONNX-YOLO-World-Open-Vocabulary-Object-Detection

Python scripts performing Open Vocabulary Object Detection using the YOLO-World model in ONNX.
Python
30
star
36

ONNX-SCDepth-Monocular-Depth-Estimation

Python scripts for performing monocular depth estimation using the SC_Depth model in ONNX
Python
29
star
37

ONNX-NeuFlowV2-Optical-Flow

Python scripts performing optical flow estimation using the NeuFlowV2 model in ONNX.
Python
26
star
38

Midasv2_1_small-TFLite-Inference

Python scripts to perform monocular depth estimation using Python with the Midas v2.1 small Tensorflow Lite model.
Python
25
star
39

onnx-perf-test

A simple Python tool to measure the performance of ONNX models.
Python
24
star
40

depthai-android-unity-example

Unity project with an example on how to run the depthai library in Android.
C++
24
star
41

ONNX-YOLOv9-MIT-Object-Detection

Python scripts performing object detection using the YOLOv9 MIT model in ONNX.
Python
23
star
42

cap_from_youtube

Get an OpenCV video capture from an YouTube video URL
Python
22
star
43

ONNX-msg_chn_wacv20-depth-completion

Python script for performing depth completion from sparse depth and rgb images using the msg_chn_wacv20. model in ONNX
Python
22
star
44

ONNX-GLPDepth

Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX
Python
21
star
45

depthai-TopFormer-Semantic-Segmentation

Python scripts performing on devive semantic segmentation using the TopFormer model in depthai.
Jupyter Notebook
21
star
46

TfLite-Ultra-Fast-Lane-Detection-Inference

Example scripts for the detection of lanes using the ultra fast lane detection model in Tensorflow Lite.
Python
21
star
47

Social-Distance-Feedback-For-The-Blind

A social distancing feedback system for the blind using the OAK-D camera
Jupyter Notebook
21
star
48

UnrealCV-stereo-depth-generation

Python scripts for generating synthetic stereo depth data using the UnrealCV library.
Python
19
star
49

ONNX-TopFormer-Semantic-Segmentation

Python scripts performing semantic segmentation using the TopFormer model in ONNX.
Python
17
star
50

ONNX-Inference-Template

Template project for performing inference on ONNX models in Python.
Python
17
star
51

ONNX-PackNet-SfM

Python scripts for performing monocular depth estimation using the PackNet-SfM model in ONNX
Python
17
star
52

ONNX-Object-Localization-Network

Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX.
Python
16
star
53

shoeDetection

Shoe detection with Tensorfllow js
Jupyter Notebook
15
star
54

Tensorflow-Mobile-Generic-Object-Localizer

Python Tensorflow 2 scripts for detecting objects of any class in an image without knowing their label.
Python
15
star
55

ONNX-MST-Image-Inpainting

Python scripts for performing Image Inpainting using the MST model in ONNX
Python
13
star
56

Tapir-Pytorch-Inference

Minimal code for Tapir model inference in Pytorch
Python
13
star
57

OpenImages-Yolo-converter

Convert OpenImages labels to be used for YOLOv3
Python
12
star
58

Mediapipe-Christmas-Examples

Python scripts using the Mediapipe models for Christmas.
Python
11
star
59

ONNX-ACVNet-Stereo-Depth-Estimation

About Python scripts form performing stereo depth estimation using the ACVNet model in ONNX.
Python
11
star
60

lsd_modern

(WIP) C++ code to try to modernize the original Line Segment Detect code
C++
10
star
61

ONNX-CoEx-Stereo-Depth-estimation

Python scripts form performing stereo depth estimation using the CoEx model in ONNX.
Python
10
star
62

ONNX-YOLOv10-Object-Detection

Python scripts performing object detection using the YOLOv10 model in ONNX.
Python
9
star
63

HuggingFace-API-ONNX-Conversion

Repository to showcase how to export models to ONNX using a client to a Hugging Face space.
Python
9
star
64

libusbAndroidTest

Example of an Android app for testing libusb with Java and C++.
C++
7
star
65

ONNX-PlanarReconstruction

Python scripts performing plane segmentation using PlanarReconstruction model in ONNX.
Python
7
star
66

TFLite-MobileStereoNet

Python scripts for performing stereo depth estimation using the MobileStereoNet model in Tensorflow Lite.
Python
7
star
67

Deeplab-Cityscapes-inference

Python program to visualize Deeplab (trained on Cityscapes dataset) results.
Python
6
star
68

nuScenes-Lane-Detection

Lane detection program (Python) for the nuScenes mini dataset
Python
6
star
69

libusbNativeAndroidTest

Example of a Native Android app for testing the libusb library in Android.
C
5
star
70

mmcv_onnx_ops_build

Repository for building the MMCV ONNX compatible ops to run them in onnxruntime.
CMake
5
star
71

ONNX-SAGENet-Driver-Attention-Estimation

Python scripts for performing driver attention estimation using the SAGENet model in ONNX
Python
5
star
72

Pytorch-SAGENet-Driver-Attention-Estimation

Python scripts for performing driver attention estimation using the SAGENet model in Pytorch
Python
4
star
73

Perception-Neuron-Read-Calc-File

Program to read the .calc file from the Perception Neuron (Noitom)
MATLAB
4
star
74

DepthaiAndroidMinimal

Minimal Android Studio project to build a depthai-core application without using a prebuild library.
Java
4
star
75

ONNX-Split-HITNET-Stereo-Depth-Estimation

Python scripts for performing Stereo Depth Estimation using the HITNET model split into two parts in ONNX.
Python
3
star
76

libUVC-OpenCV-cpp

Example script to capture images from USB cameras using the libUVC library and OpenCV in C++.
C
3
star
77

TFLite-msg_chn_wacv20-depth-completion

Python script for performing depth completion from sparse depth and rgb images using the msg_chn_wacv20. model in Tensorflow Lite.
Python
2
star
78

test-mapillary-python

Python scripts for testing the mapillary python library functionalities
Python
1
star
79

Jekyll-Posts-From-Github

Automatically generate Jekyll posts from all the README files of a Github user.
Python
1
star
80

Deeplab-ADE20K-Inference

Python program to visualize Deeplab (trained on ADE20K dataset) results.
Jupyter Notebook
1
star
81

cv_videowriter

Wrapper library around the OpenCV VideoWriter function with some extra features
Python
1
star
82

ibaiGorordo

1
star
83

tf2-object-detection-inference

Python program to perform object detection inference with Tensorflow 2.0.
Python
1
star