ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.1k stars 223 forks source link

Add one or two new categories? #145

Open mrconter1 opened 2 years ago

mrconter1 commented 2 years ago

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:

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

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 commented 1 month ago

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 commented 1 month ago

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 https://github.com/ucbdrive/few-shot-object-detection/issues/145#issuecomment-2277663077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYLDTT7YPUBVTT7RAI6JKLZQSMDTAVCNFSM6AAAAABMIG6WBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXGY3DGMBXG4 . You are receiving this because you were mentioned.Message ID: @.***>

AISoltani commented 1 month ago

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 commented 1 month ago

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