LdDl / odam

ODAM - Object detection and Monitoring
Apache License 2.0
32 stars 4 forks source link

yolov5 #22

Open edbek opened 2 years ago

edbek commented 2 years ago

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

LdDl commented 2 years ago

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.

edbek commented 2 years ago

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 !

LdDl commented 2 years ago
  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.
edbek commented 2 years ago

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.

LdDl commented 2 years ago

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).