Open praneeth0609 opened 4 years ago
@praneeth0609 I am also working currently on a project to detect objects which are even smaller than mentioned by you. The objects are small stones, nuts, bolts, screws etc. I am also facing the same issue that I have trained Yolov3 and Yolov4 on my custom dataset but not able to get good results. So any solution?
@praneeth0609 @Farjad3253
https://github.com/AlexeyAB/darknet
check this repo and search "small object" , he explained how to train for small objects, smaller than 16 x 16.
@MuhammadAsadJaved . Yes I have checked that repo but not getting good results!
@MuhammadAsadJaved , thanks for your reply. I have checked https://github.com/AlexeyAB/darknet and i followed those instructions. can you give some suggestions on below quires:
hello @pjreddie @MuhammadAsadJaved I have a camera with 30X optical Zoom, and I want to detect birds, which are at long distances. give me some suggestions:
@MuhammadAsadJaved @praneeth0609 . I have tried the training of model for smaller objects as specified on https://github.com/AlexeyAB/darknet. But still not getting good results on small objects like bolts, screws, stones etc. Kindly solve this issue?
I haven't worked with this problem, I just saw this information so shared with you.
On Mon, Aug 10, 2020 at 11:02 AM Farjad3253 notifications@github.com wrote:
@MuhammadAsadJaved https://github.com/MuhammadAsadJaved @praneeth0609 https://github.com/praneeth0609 . I have tried the training of model for smaller objects as specified on https://github.com/AlexeyAB/darknet. But still not getting good results on small objects like bolts, screws, stones etc. Kindly solve this issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/2256#issuecomment-671142812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4GR5B4LYS6MUYXG3MASTTR75PLVANCNFSM4PWMJYDQ .
When you're going to detect the object, try to set higher values on width and height on your cfg file. I managed to detect really small objects on a image 4000x3000 with the width and height on 2560.
@Tuumix . What was the input size which you specified in the cfg file?
@Farjad3253 for training it was 768 and for detection 2560
@Tuumix . Ok you mean that for training it was 768x768 and while testing you used 2560x2569? Is it so?
Yes, for training I cropped the image in 768x768x and for detection I use the full resolution image but the cfg file I used 2560x2560
@Tuumix . Ok I got your point that while you were training you specified the resolution as 768x768 in .cfg file!
Yees, sorry if my explanation was a little bit confusing haha
@Tuumix . No problem dear! Atleast you tried to help us. Thanks!
Yes, for training I cropped the image in 768x768x and for detection I use the full resolution image but the cfg file I used 2560x2560
@Tuumix thank you for your suggestion. how you did the crop operation. is it cropping the object or resizing the full image to 768x768. can you share your .cfg file here. it will be more helpful.
@praneeth0609 I cropped the object to 768x768.
@Tuumix thank you for your replay. I want to know some details regarding the training of yolov4. present I'm training custom data using yolov4. this is how I'm getting the loss and mAP graph. can you clarify the bellow questions?
@Tuumix @Farjad3253
Hi @Tuumix
If I understand correctly, your training network size was 768x768, and you cropped your training images to that resolution.
During detection, your input image resolution is 4000x3000 and forwarded to detection network of 2560x2560.
Did you scale down the evaluation image size of 4000x3000 to network size of 2560x2560, or did you slide the evaluation image in the size of 2560x2560 (and probably 200px strive for overlaps) before forward to the network for detection?
Regarding training network, I also found in https://github.com/AlexeyAB/darknet/blob/master/README.md#how-to-improve-object-detection that says
increase network resolution in your .cfg-file (height=608, width=608 or any value multiple of 32) - it will increase precision
Do you think you would get better accuracy if your training size was higher than 768
?
We have a similar use case to detect small objects (~200px) in a 4k image. We bumped the training size to 1056x1056 (the largest training resolution we can fit with 16GB GPU RAM), but the detection accuracy of small objects is not very, thus investigating what other parameters (training network size, training image size; detection network size, detection image size).
Thanks!
If we have to use two different GPU s 2060 and 2070, for OpenCV dnn or darkent , do we need to use separate versions of cuda and CUDNN...? If we use two separate versions can I use them whenever I need or will the older version will be overwritten by the new version?
You can use same cuda and cudnn.
On Sun, Sep 27, 2020 at 9:41 PM praneeth0609 notifications@github.com wrote:
If we have to use two different GPU s 2060 and 2070, for OpenCV dnn or darkent , do we need to use separate versions of cuda and CUDNN...? If we use two separate versions can I use them whenever I need or will the older version will be overwritten by the new version?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/2256#issuecomment-699637218, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4GR5DNCNVJK2MO54ANXPLSH46JTANCNFSM4PWMJYDQ .
@kangks can you share the cfg file for training with 1056x1056
@MuhammadAsadJaved currently I'm using intel i7 9th gen, Geforce 2060 6 GB GPU, Linux os, and am trying to detect the custom objects using yolov4, but am getting Low processing rate. can I upgrade to 2070 8 GB, if I can..? what are the advantages of 2070 over 2060. can you suggest the best GPU for Yolo v4 object detection with a decent frame rate ...?
I have images that have a height of around 2000 and a width around 1500. I'm using 4-tesla T4 GPU. When I use height width 1024 or even 608 for batch size = 64 and subdivision = 16. I get out of memory cuda error.
My question is I want to train yolov4 for higher resolution at batch size=64 and subdivision=16 so what kind of GPU I need, how much RAM do I need, How much GPU I need? OR any other hard ware configure I have to follow for such kind of training?
Thank You
hello... Currently, I'm working on custom object detection like birds, etc. I need to detect small objects also. but am not able to detect small objects. To get detect small objects, what I need to do. Here are my questions:
- How many images required per class ? (am using 2 classes.)
- For smaller object detection what I have to do ?
- even the object is very small in the frame. it should be detected . for this any suggestions?
- If we take one bird as an example, how many images required for specific angle of bird (front, back, up, bottom) ?
- what is the minimum object size that i can detect using yolo. ?
- For smaller object detections, what changes I have to do to my custom object dataset ?
- Any suggestions for improving the mAP ?
did you get good results? i am trying to set a cfg file for small objects as well, tennis table balls, and i was wondering if you would have any advice
I think this might help from www.ccoderun.ca Stéphane's Darknet FAQ: TLDR troubleshooting What is Darknet? What is YOLO? What software is used to make this work? How do I get started? Which configuration file should I use? Does the network have to be perfectly square? How does sizing work? What is the optimal network size? Can I train a neural network with a CPU? What is the difference between CPU and GPU? How many images will it take? What about negative samples? Can I train a neural network using synthetic images? What does the error message "CUDA Error: out of memory" mean during training? How to build Darknet on Linux? How to build Darknet on Windows? What about OpenCV and CUDA? How many FPS should I expect to get? How can I increase my FPS? How much memory does it take? How long does it take to train? What command should I use when training my own network? How should I setup my files and directories? What about the "train" and "valid" files? How to run against multiple images? Should I crop my training images? How to annotate images? How do Darknet/YOLO annotations work? How do I turn off data augmentation? How important is image rotation as a data augmentation technique? Where can I get more help?
@AhlemKaabi Thank you for sharing the proper resource here.
hello... Currently, I'm working on custom object detection like birds, etc. I need to detect small objects also. but am not able to detect small objects. To get detect small objects, what I need to do. Here are my questions: