Yolov5 Tensorflow 2 detection implementation (no training). This project uses a Tensorflow saved_model
format for Yolov5 object detection. For training and exporting please check the Yolov5 repository.
- Detecting objects in an image folder, an image, a video or webcam.
- Able to use custom trained
saved_model
's (only size 640 models) - Drawing bounding boxes in images.
- Usage of non max suppression.
- Automatically write images with bounding boxes (no videos yet).
$ git clone https://github.com/Jeremy-vdw/Yolov5-tf2.git
$ cd Yolov5-tf2
$ pip install -r requirements.txt
$ python detect.py --source './data/images/' --prob 0.4
--saved_model
path to saved_model.yolov5s
as default--labels
path to labels (.names) file.data/coco.names
as default--source
path to input image/video or image_folder.0
for webcam as default.--prob
minimum probability to eliminate weak predictions.0.7
as default--thres
setting threshold for filtering weak bounding boxes with NMS.0.3
as default--visualize
to show bounding boxes.True
as default.