sovit-123 / fasterrcnn-pytorch-training-pipeline

PyTorch Faster R-CNN Object Detection on Custom Dataset
MIT License
223 stars 75 forks source link

small objects detection #140

Closed merbenf closed 2 months ago

merbenf commented 6 months ago

hello again it finally all works thank you for this valuable repo but i just wanted to ask for "sahi" model wich is used for small objects detection how can i use it in inference with faster r cnn and if there any other models are used for very small (tiny) objects to be used . thank you all .

sovit-123 commented 6 months ago

Hello @merbenf I have not integrated SAHI into the project yet. I will add that to my TODO list.

merbenf commented 6 months ago

Hello @merbenf I have not integrated SAHI into the project yet. I will add that to my TODO list.

thank you sir we are waiting for it

joshua-atolagbe commented 3 months ago

@sovit-123 , any update about this?

sovit-123 commented 2 months ago

I will be working on this next.

joshua-atolagbe commented 2 months ago

Okay great. Looking forward to this

sovit-123 commented 2 months ago

@joshua-atolagbe I have SAHI image inference for all the pretrained torchvision models with almost all the arguments similar to inference.py. The code is in the sahi_inference.py file. You can find the SAHI branch here.

I will merge it after a bit more testing.

joshua-atolagbe commented 2 months ago

You’re the best bro. Will check it out script. I’m hoping it will also calculate the metrics like map50, precision, recall and fps too. Thank you for your hard work @sovit-123 👏

sovit-123 commented 2 months ago

@joshua-atolagbe Thanks. Just for some clarification. It is the inference script. It will give you the FPS on the folder of images (the directory path that you will pass that contains the images). However, it does not carry out the metric calculations. It is quite difficult to integrate SAHI with object detection evaluation. Although it sounds plausible to add that, it is not very straightforward.

However, the image inference with SAHI is in working state at the moment. Please let me know if you find any errors.

sovit-123 commented 2 months ago

@joshua-atolagbe Just for addition. These are the kind of results that you can expect with the current pipeline with the COCO pretrained Faster RCNN ResNet50 FPN V2.

image_6

sovit-123 commented 2 months ago

Just an update. Updated the sahi_inference.py script for custom trained models as well. Now you can use not just Torchvision pretrained models, but also custom trained weights with the script.

Let me know if I can close the issue.

merbenf commented 2 months ago

@sovit-123 Thanks a lot Sir. I'm very grateful for your support and effort. I also sent you a connection request and a message on LinkedIn asking for your opinion. I would greatly appreciate it if you could take a moment to respond.

joshua-atolagbe commented 2 months ago

@joshua-atolagbe Thanks. Just for some clarification. It is the inference script. It will give you the FPS on the folder of images (the directory path that you will pass that contains the images). However, it does not carry out the metric calculations. It is quite difficult to integrate SAHI with object detection evaluation. Although it sounds plausible to add that, it is not very straightforward.

However, the image inference with SAHI is in working state at the moment. Please let me know if you find any errors.

I have some codes that can compute these metrics when using SAHI inference. I will make a pull request soon.

joshua-atolagbe commented 2 months ago

Just an update. Updated the sahi_inference.py script for custom trained models as well. Now you can use not just Torchvision pretrained models, but also custom trained weights with the script.

Let me know if I can close the issue.

Great work man👏. Yes you can close the issue

sovit-123 commented 2 months ago

Thanks.