jianyunli / easy-yolov7

This a clean and easy-to-use implementation of YOLOv7 in PyTorch, made with ❤️ by Theos AI.

Home Page:https://theos.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🤙🏻 Easy YOLOv7 ⚡️

Easy YOLOv7 by Theos AI

This a clean and easy-to-use implementation of YOLOv7 in PyTorch, made with ❤️ by Theos AI.

Don't forget to read our Blog and subscribe to our YouTube Channel!

Install all the dependencies

pip install -r requirements.txt

Detect the image

python image.py

Detect the webcam

python webcam.py

Detect the video

python video.py
output.mp4

Detect multiple live video streams in parallel

Create a new text file called streams.txt inside the repository folder and put the URLs of the streams in each new line, for example:

https://192.168.0.203:8080/video
https://192.168.0.204:8080/video
https://192.168.0.205:8080/video

Then execute the streams script.

python streams.py

Track the video

python track_video.py

Track the webcam

python track_webcam.py

Detect and OCR the image

python ocr_image.py

Easy YOLOv7 and OCR by Theos AI

Detect and OCR the video

This script uses a license plate recognition model (ANPR / ALPR), so you will have to edit it for it to work with your own model by changing the weights file, classes yaml file and finally the ocr_classes list.

python ocr_video.py

Train YOLOv7 on your own custom dataset

Watch the following tutorial to learn how to do it.

How to Train YOLO v7 on a Custom Dataset for Gun Detection in Security Cameras

Click the weights button

Go to your training experiment and click the weights button on the top right corner.

Download weights button of Theos AI

Download the files

Download the best or last weights and the classes YAML file and put them inside the repository folder.

Download weights modal of Theos AI

Use your own custom model

Change the following line to use your custom model.

yolov7.load('best.weights', classes='classes.yaml', device='cpu') # use 'gpu' for CUDA GPU inference

Contact us

Reach out to contact@theos.ai if you have any questions!

About

This a clean and easy-to-use implementation of YOLOv7 in PyTorch, made with ❤️ by Theos AI.

https://theos.ai


Languages

Language:Python 100.0%