How fast should finetuning happen?
I have a custom dataset that I tried to finetune on. I used the D0 model, and trained for 10 epochs of 150k images, but I got a max AP of 0.05. The tutorial for PASCAL VOC 2012 gets 0.33 AP after a single epoch of only 5k images. Although I think that's evaluating on the training data...
Update:
-
I'm using the Waymo dataset, and had dumped the training data sequentially into a single tfrecord. Dumping it into multiple tfrecords to allow better mixing of training data got me to an AP of 0.11 after 2 epochs.
-
I tested finetuning on PASCAL with a 20% holdout set and got an AP of .27 after one epoch.
I think the issue is just that my dataset is much harder to train on, I'm going to try a longer training period and I'll report back.
Ok, just finished a training run with 5x the data and 5x the epochs (800k images, 10 epochs) and topped out at an AP of 0.13.
Very confused at this point, I'm going to take a good, hard look at my tfrecord converter to make sure there isn't some bug...
Has anyone else tried training on the Waymo dataset and gotten better results?

I ran inference on one of the images, and it looks vaguely sensible? 2 or 3 huge spurious detection boxes, though... Does anyone know if that's a know failure mode that I could track down?
Not sure about why there are some big boxes. A temporary solution is that you can try to increase the the min_score_thresh might avoid drawing those boxes.
When I saw those big spurious detections, I thought the issue might be that my finetuning was actually making things worse, so I added some code to map the classes from coco to waymo so I could get mAP values with just the released checkpoints. It confirmed that the finetuning was helping - the mapped class version only had an mAP of 0.06.
For comparison, the mapped version of d7 had a mAP of 0.19.
d4 was 0.16.
d4 was 0.16.
Hi, can you explain that how did you fine-tune?
That number isn't from fine-tuning - I just added some code that translated the classes from COCO to the classes in the Waymo Dataset (car, truck -> vehicle, etc.) and used the checkpoint weights as is. From that I was able to confirm that finetuning was in fact working, since the finetuned d0 had an AP of 0.13 instead of the 0.6 that the mapped d0 had.
I've never successfully finetuned one of the larger models, due to issues with memory and compute utilization.
You should follow https://github.com/google/automl/tree/master/efficientdet#8-finetune-on-pascal-voc-2012-with-detector-coco-ckpt for finetuning dataset. I could train with batch size 64 on GTX 1080TI.
You should follow https://github.com/google/automl/tree/master/efficientdet#8-finetune-on-pascal-voc-2012-with-detector-coco-ckpt for finetuning dataset. I could train with batch size 64 on GTX 1080TI.
You are surely not using one GPU, right? Training efficientdet-d0 on coco I could only have batch size of 10 on a single GPU, and a batch size of 12 per GPU on a server with horovod docker.
I only train head. Why batch size only 10? Do you understand what I mean? I suggest you should read README.md again.
One batch is a number of images that can fit into the GPU while calculating the gradient and changing the weights of the network, I am aware of that (but not because I read the README.md). And that could be the difference, your gradient is only changing the weights of the head, while the rest of the network is frozen I presume. However, training the whole network - which I'd like to do in order to replicate the paper's results - contains a lot more weights to be trained and changed.
One batch is a number of images that can fit into the GPU while calculating the gradient and changing the weights of the network, I am aware of that (but not because I read the README.md). And that could be the difference, your gradient is only changing the weights of the head, while the rest of the network is frozen I presume. However, training the whole network - which I'd like to do in order to replicate the paper's results - contains a lot more weights to be trained and changed.
We are talking about finetune dataset in the issue, maybe I missed something?
No, you are completely right, I am sorry, there was a miscommunication in that matter,. I should open new issues for new problems. (I was just scrolling through old issues because part of the documentation is in the issues and the repo does not work without them.)
You should follow https://github.com/google/automl/tree/master/efficientdet#8-finetune-on-pascal-voc-2012-with-detector-coco-ckpt for finetuning dataset. I could train with batch size 64 on GTX 1080TI.
@fsx950223 what checkpoints were you able to fine-tune on? Were you able to fine-tune on d4 with one/multiple GPU?
I've been able to finetune with d3 on a single GPU. I still haven't gotten multi gpu training working, but I think the new keras code might make it work.
Running d4 is very slow + batch size 1 on my 2080 ti
Hi @LucasSloan,
Would you mind sharing the finetuning command that you have used? I would also like to fine tune on my own dataset.
Thanks! David