-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
problem of validation set #316
Comments
the loss is higher than expected. either you have lots of classes or it's still underfitting. try smaller network like d0 or increase lr but be aware of overfitting |
Hi @zylo117 My problem is the detection for 4 class. I tried the efficientdet-d0 in framework detectron2 achive mAP=41. But in detectron2, it perform with d1,d2 not realy good. I wanna try your framework. But I trained from yesterday in 10 hour with 200 epoche. With your tutorial perfom well but, my dataset, I don't know how to modify. Thanks |
try increasing lr |
hold on, did you load d0 weights into a d2 model? of course the result is bad. it's basically training from scratch |
Hi @zylo117 , |
Hi @wenjun90 , did your learning rate drop? Can you share your learning rate plot with me (or just the number). For all of my experiments on customized data the learning rate never drops, so i just wanted to look at yours. |
lr only drops on plateaus |
Hi @zylo117 , i see. Thanks a lot! |
Hi @zylo117 , Thank you so much |
try these two but I haven't tested them yet, so use it at your own risk. |
Hi @zylo117 It's good for coco dataset and your tutorial but my own dataset is not good. :( |
great, I think you have done so well on coco. |
Hi @zylo117, I set 40 epochs and I trained last night, Each epoch need 30 minutes for training. This morning, I stopped with 14 epoch and eval very well with these metrics. I try check time of prediction on gpu Tesla V100 with 21 FPS and on cpu with 3.3 FPS. With my dataset, I really don't know how set these hyperparameter. I hope receive your advice. My objectif is to detect the region of text block in document like that: Thank you very much! |
set head only False to train the rest of the layers |
thank @zylo117 . I set False to train with my small dataset 3000 images, result is better but still smaller than faster rcnn. With rcnn, I get AP60, but Efficientdet-d0 only 35. |
do you mean AP50 or AP50:95? |
Hi @zylo117 This is my result EfficientDet-d0 by your framework: Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.343 This is my results by EfficientDet-d0 in framwork Detectron2 Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.403 This is my results by Faster RCNN in detectron2 Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.609 |
are these two efficientdet the same anchors? |
Hi, |
Hi @zylo117, Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.445 I change the ratio anchor too, In general, my result with d2 still less than faster rcnn (mAP=60, baseline), but one things positive in this cas is time of prediction on cpu correspondant as in paper. (0.3s d0, 0.7s d1 and 1.2s d2). Initial I set anchor ratio as default: [(1,1), (0.7,1.4),(1.4,0.7)]. In framework detectron2, backbone efficientdet d0, d1, I trained, there is no too different to mAP but time of prediction d1 is so long with 3s on cpu. Thank you your help. |
I think training effdet with a larger batchsize can help improving |
Hi @zylo117 , batchsize = 4, learning rate = 1e-3, anchor ratio optimal = '[(1.3, 0.8), (2.1, 0.5), (3.1, 0.3)]' D0: D1: Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.213 D2 Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.208 D3 When I set batch size = 16 for d0. I get the result is better at 40 epoch: |
Hi @zylo117 , This is normal? |
Yes, if you are v100 32G. But I remember there is a v100 16G, then no. |
Hi @wenjun90, How you are getting AP, is it embedded in train.py or you are stopping training and then running coco_eval.py using checkpoint? |
Hi @zylo117,
I do training with my dataset 2700 image train and 300 valid.
python train.py -c 2 -p mydataset --batch_size 8 --lr 2.5e-4 --num_epochs 200
--load_weights /path/to/your/weights/efficientdet-d0.pth
The ratio and scale achor sont optimiser par code kmeans-anchor-ratios.
The AP after 50 epoch:
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.050
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.140
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.022
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.050
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.059
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.196
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.269
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.269
The AP after 150 epoch so bad:
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.059
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.160
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.031
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.059
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.072
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.213
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.290
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.000
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.290
What is the problem according you?
Thanks
The text was updated successfully, but these errors were encountered: