KazuhideMimura / yolov5-ichthyolith

Aplication of yolov5 for detecting microfossil fish teeth called ichthyolith
MIT License
10 stars 1 forks source link

Regarding the 2-stage yolov5 detection #6

Open jayer95 opened 2 years ago

jayer95 commented 2 years ago

Hi,

Regarding the 2-stage yolov5, is there any yolov5.pt that uses detection for 2 stages?

Projects like the following:

https://github.com/stephanecharette/DarkPlate

KazuhideMimura commented 2 years ago

Hi, thank you for your question.

I'm writing a paper for this project, and I can't share the custom model for detecting and classifying microfossils right now. I'm sorry for it.

If you are interested in training model, instructions in classifier.py might be some help. https://github.com/ultralytics/yolov5/blob/classifier/classifier.py

# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
Train a YOLOv5 classifier model on a classification dataset
Usage - train:
    $ python classifier.py --model yolov5s --data cifar100 --epochs 5 --img 224 --batch 128
    $ python -m torch.distributed.run --nproc_per_node 4 --master_port 1 classifier.py --model yolov5s --data imagenet --epochs 5 --img 224 --device 4,5,6,7
jayer95 commented 2 years ago

@KazuhideMimura

Hi, thanks for your reply, First of all, I wish you good luck in writing your paper of your project,

Thanks, I have the ability to train the model myself, and I rephrase my question.

My question is about the two stage models that also use object detection, the second-stage is not the classification model.

For example, one-stage is used for object detection of license plates, and second-stage is used for character object detection (0-9, A-Z) of roi of one-stage license plates object detection.

Two stages are yolov5 object detection, both use yolov5 self custom models.

Projects like the following: https://github.com/stephanecharette/DarkPlate

KazuhideMimura commented 2 years ago

I now understand your question, which sounds very interesting.

Detection x detection has the potential to be applied in various fields. Regarding my project, detailed description of particular part of the fossil can possibly done by 2nd detection model. Thank you for providing this perspective!

Practically, operation of the 2nd model is described in utils/general.py. If you are to try, you need to (1) change below L.923 and (2) consider how to get and visualize output (major modifications are required below L.167 of detect.py.).

jayer95 commented 2 years ago

@KazuhideMimura

Thank you for your understanding. If it is also helpful for your project, we can try to develop on other branch, This project is an existing case, by implementing two-stage yolov5 detection: https://github.com/bharsubedi/ALPR-Yolov5 But his yolov5 is an old version of yolov5, I guess it's yolov5-v5.0, and it can't do video inference. I'm very interested in your project that write the deteciton and classification models into the detect.py argument. I have some existing research results, if you are interested in developing this, please let me know. I can provide 1 and 2 stage models on yolov5-v6.1.

KazuhideMimura commented 2 years ago

Hi, sorry for the late reply. Although I'm very interested in 2 stage detection, it is beyond the scope of this repository. So if you are interested, would you create a new repository? (Please let me know when you opened your repo)

jayer95 commented 2 years ago

@KazuhideMimura No problem, I'm developing, do you have a email?