Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tatsuya-fukuoka/yolov7-onnx-infer
Code to detect objects by inferring images and videos using YOLOv7's onnx model
https://github.com/tatsuya-fukuoka/yolov7-onnx-infer
deep-learning machine-learning object-detection onnx onnxruntime python yolo yolov7
Last synced: 2 months ago
JSON representation
Code to detect objects by inferring images and videos using YOLOv7's onnx model
- Host: GitHub
- URL: https://github.com/tatsuya-fukuoka/yolov7-onnx-infer
- Owner: tatsuya-fukuoka
- Created: 2022-12-13T15:18:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T22:58:01.000Z (5 months ago)
- Last Synced: 2024-11-09T15:42:38.780Z (3 months ago)
- Topics: deep-learning, machine-learning, object-detection, onnx, onnxruntime, python, yolo, yolov7
- Language: Python
- Homepage:
- Size: 4.13 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yolo-object-detection - tatsuya-fukuoka/yolov7-onnx-infer - fukuoka/yolov7-onnx-infer?style=social"/> : Inference with yolov7's onnx model. (Lighter and Deployment Frameworks)
- awesome-yolo-object-detection - tatsuya-fukuoka/yolov7-onnx-infer - fukuoka/yolov7-onnx-infer?style=social"/> : Inference with yolov7's onnx model. (Lighter and Deployment Frameworks)
- awesome-cuda-triton-hpc - tatsuya-fukuoka/yolov7-onnx-infer - fukuoka/yolov7-onnx-infer?style=social"/> : Inference with yolov7's onnx model. (Applications)
- awesome-cuda-triton-hpc - tatsuya-fukuoka/yolov7-onnx-infer - fukuoka/yolov7-onnx-infer?style=social"/> : Inference with yolov7's onnx model. (Applications)
README
# yolov7-onnx-infer
Inference with yolov7's onnx model## onnx model
* [yolov7-tiny.onnx](https://drive.google.com/file/d/1-P3RpFnbXv_a99EW_wiBCUcZ7ssJzEnj/view?usp=share_link)
* [yolov7.onnx](https://drive.google.com/file/d/1pL-VhELoJMIwT5H9hGi5y0wgztfb0CsI/view?usp=share_link)## 1. Dev Env
### 1.1 pip install
```bash
pip install -U pip && pip install -r requirements.txt
```
### 1.2 Docker
#### Dockerfile
Ubuntu 20.04
```Dockerfile
FROM ubuntu:20.04
USER rootRUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
LABEL version="1.0"
LABEL description="Build operating environment for yolov7-onnx-infer"RUN apt-get update && \
apt-get -y install python3-pip && \
apt-get -y install git && \
apt-get -y install libgl1-mesa-dev && \
apt-get -y install libglib2.0-0 && \
pip install -U pip && \
pip install opencv-python onnxruntime
```
Debian
```Dockerfile
FROM debian:stable-slim
USER rootLABEL version="1.0"
LABEL description="Build operating environment for yolov7-onnx-infer"RUN apt-get update && \
apt-get -y install python3-pip && \
apt-get -y install git && \
apt-get -y install libgl1-mesa-dev && \
apt-get -y install libglib2.0-0 && \
pip install -U pip && \
pip install opencv-python onnxruntime
```
#### docker build
```bash
docker build -t tatsuya060504/yolov7-onnx-infer:v1.0.0 .
```
#### docker pull
[Docker Hub](https://hub.docker.com/repository/docker/tatsuya060504/yolov7-onnx-infer)
```bash
docker pull tatsuya060504/yolov7-onnx-infer:raspberrypi
```
docker run
```bash
docker run -it --name=yolov7-onnx-infer -v $(pwd):/home tatsuya060504/yolov7-onnx-infer:raspberrypi
```## 2. Onnx Model Download
You can download the yolox-onnx model by executing the shell script in the model folder.
```
cd model
sh download_yolov7_tiny_onnx.sh #or download_yolov7_onnx.sh
```## 3. Inference
### Image
```bash
python onnx_inference.py -i -m -e -s
```
### Video
```bash
python onnx_inference.py -mo video -i -m -e -s
```
## 4. References
* [yolov7](https://github.com/WongKinYiu/yolov7)
* [yolov7/tools/YOLOv7onnx.ipynb](https://github.com/WongKinYiu/yolov7/blob/main/tools/YOLOv7onnx.ipynb)## 5. About me
* [Blog](https://chantastu.hatenablog.com/)
* [Twitter](https://twitter.com/chantatsu_blog)
* [Youtube](https://www.youtube.com/channel/UCH9dyrHb8qbEKr_oPsCWq2Q)