bingykang / Fewshot_Detection

Few-shot Object Detection via Feature Reweighting
https://arxiv.org/abs/1812.01866
526 stars 111 forks source link

Training for 16:9 aspect ratio #40

Open kshitijagrwl opened 4 years ago

kshitijagrwl commented 4 years ago

I can see that the repository code has been trained on 448x448 and this works fine on Pascal VOC.

Now if i want to adapt the code to another dataset which has a ratio of 16:9, I can modify the input width, height to roughly -> 768, 448

Now because of this the final output layer of the reweighting network becomes 1x0x1024

layer filters size input output 0 conv 32 3 x 3 / 1 768 x 448 x 4 -> 768 x 448 x 32 1 max 2 x 2 / 2 768 x 448 x 32 -> 384 x 224 x 32 2 conv 64 3 x 3 / 1 384 x 224 x 32 -> 384 x 224 x 64 3 max 2 x 2 / 2 384 x 224 x 64 -> 192 x 112 x 64 4 conv 128 3 x 3 / 1 192 x 112 x 64 -> 192 x 112 x 128 5 max 2 x 2 / 2 192 x 112 x 128 -> 96 x 56 x 128 6 conv 256 3 x 3 / 1 96 x 56 x 128 -> 96 x 56 x 256 7 max 2 x 2 / 2 96 x 56 x 256 -> 48 x 28 x 256 8 conv 512 3 x 3 / 1 48 x 28 x 256 -> 48 x 28 x 512 9 max 2 x 2 / 2 48 x 28 x 512 -> 24 x 14 x 512 10 conv 1024 3 x 3 / 1 24 x 14 x 512 -> 24 x 14 x1024 11 max 2 x 2 / 2 24 x 14 x1024 -> 12 x 7 x1024 12 conv 1024 3 x 3 / 1 12 x 7 x1024 -> 12 x 7 x1024 13 glomax 12 x 12 / 1 12 x 7 x1024 -> 1 x 0 x1024

What is the right way to handle this change?

prabhat04011998 commented 1 year ago

Where exactly the codebase for reweighting module is written , can you help ?

kshitijagrwl commented 1 year ago

This repo is pretty old now @prabhat04011998, maybe consider using a fresher version/codebase.

The reweighting module is defined in https://github.com/bingykang/Fewshot_Detection/blob/ddfd3fdc8bc5a9a2ca956cad6a5ed07a4660bdb6/darknet_meta.py#L86

AFAIK it relies on the config https://github.com/bingykang/Fewshot_Detection/blob/master/cfg/darknet_dynamic.cfg