Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add one or two new categories? #145

Open
mrconter1 opened this issue Oct 31, 2021 · 5 comments
Open

Add one or two new categories? #145

mrconter1 opened this issue Oct 31, 2021 · 5 comments

Comments

@mrconter1
Copy link

Hello!

What would be the best approach to add one or more categories to an already existing model? I am following this guide:

https://github.com/ucbdrive/few-shot-object-detection/blob/master/docs/TRAIN_INST.md

But I am a bit unsure on how to approach this:

image

Say that I want to add two custom categories with 60 images each. If I understand it correctly I will take the COCO base model for fine-tuning. The base data/novel data ratio should be 3:1 (I think). I should therefore create a new dataset with:

  • 6 categories found in the original COCO dataset
  • 2 novel categories
  • With each category having 60 randomly selected images

The new dataset is the one I will use to fine-tune the base model which will be incoperated here (replacing the selected name with my custom dataset):

image

Is this correct?

@AISoltani
Copy link

Hello!

What would be the best approach to add one or more categories to an already existing model? I am following this guide:

https://github.com/ucbdrive/few-shot-object-detection/blob/master/docs/TRAIN_INST.md

But I am a bit unsure on how to approach this:

image

Say that I want to add two custom categories with 60 images each. If I understand it correctly I will take the COCO base model for fine-tuning. The base data/novel data ratio should be 3:1 (I think). I should therefore create a new dataset with:

  • 6 categories found in the original COCO dataset
  • 2 novel categories
  • With each category having 60 randomly selected images

The new dataset is the one I will use to fine-tune the base model which will be incoperated here (replacing the selected name with my custom dataset):

image

Is this correct?

just take care about base and novel ratio (1 novel and 3 base)..yes that's True!

@retazo0018
Copy link

retazo0018 commented Aug 9, 2024

Hi @mrconter1 and @AISoltani ,

Did you get a good detection accuracy during inference? Was 60 images per category sufficient to obtain a good accuracy? Also, If you had only 8 categories during fine_tuning, why is the ROI_Heads.NUM_CLASSES = 20?

I'll be very grateful for your reply.

Many Thanks

@mrconter1
Copy link
Author

mrconter1 commented Aug 9, 2024 via email

@AISoltani
Copy link

Hi @mrconter1 and @AISoltani ,

Did you get a good detection accuracy during inference? Was 60 images per category sufficient to obtain a good accuracy? Also, If you had only 8 categories during fine_tuning, why is the ROI_Heads.NUM_CLASSES = 20?

I'll be very grateful for your reply.

Many Thanks

Dear @retazo0018
about two years ago, I was able to get good accuracy from this method and I worked on medical data that had 32 classes and my accuracy was around 92.
did you run this?

@AISoltani
Copy link

This was a while ago. From what I remember I could identify Starship with just a couple of images. Den fre 9 aug. 2024 12:40Ashwin Murali @.> skrev:

Hi @mrconter1 https://github.com/mrconter1 , Did you get a good detection accuracy during inference? Was 60 images per category sufficient to obtain a good accuracy? Also, If you had only 8 categories during fine_tuning, why is the ROI_Heads.NUM_CLASSES = 20? I'll be very grateful for your reply. Many Thanks — Reply to this email directly, view it on GitHub <#145 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYLDTT7YPUBVTT7RAI6JKLZQSMDTAVCNFSM6AAAAABMIG6WBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXGY3DGMBXG4 . You are receiving this because you were mentioned.Message ID: @.
>

oh, that's great, good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants