odam icon indicating copy to clipboard operation
odam copied to clipboard

yolov5

Open edbek opened this issue 3 years ago • 5 comments

I am new to this technology. Is it possible to use yolov5 instead of yolov4 ?

edbek avatar Aug 29 '22 16:08 edbek

YOLOv5 and YOLOv4 are not compatible, since YOLOv5 is not YOLO-family descendant in terms of source ML framework - https://github.com/pjreddie/darknet/issues/2198.

You can use yolov7 (tiny version) though - https://github.com/AlexeyAB/darknet/issues/8595

Also this question could be addressed to OpenCV maintainers, since opencv::dnn is used.

LdDl avatar Aug 29 '22 20:08 LdDl

A few more questions:

  1. What is faster yolov7 (tiny) or yolov4 (tiny)?
  2. Are there for yolov4, besides the standard set of labels ("coco.names"), any others with their already trained models? Or is there only one model for yolov4?

Thanks in advance for your replies !

edbek avatar Aug 30 '22 10:08 edbek

  1. tiny-v7 should be considered slower since there are more layers in network architecture.
  2. there are tons of pretrained models in internet. As example I have another repo with pretrained tiny-v4, tiny-v3 for vehicles-only detector (for counting cars) https://github.com/LdDl/rust-road-traffic/tree/master/data (actual training steps are described at https://github.com/LdDl/yolo_vehicles ). What kind of data do you need find on your images? May be I've already seen such pretrained model.

LdDl avatar Aug 30 '22 10:08 LdDl

To count cars, it is necessary to add various types of trucks (maybe even with trailers), fixed-route taxis, trolleybuses, trams to the model. But there is only a limited set of vehicles in the existing model ("car", "motorbike", "bus", "train", "truck").

Thanks.

edbek avatar Aug 31 '22 15:08 edbek

Yeah Pretty every model trained on COCO / BIT / AIC-HCMC datasets (or subsets). Those don't contain too many vehicle types. If you need to distinguish some classes you can manually annotate dataset, but it will lead increased inference time for neural network (more classes = more features = more job in convolutional layers).

LdDl avatar Aug 31 '22 18:08 LdDl