-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
Do you report MSCOCO performance? #1
Comments
Evaluation code against MS COCO is included in the repository, both for bounding boxes and segmentation masks so it should be easy to run (but takes a long time). We should publish more details, though. Thanks for bringing it up. Our implementation deviates a bit from the paper (as mentioned in the documentation), and optimizing for COCO was a 'nice to have' rather than being the main objective. We got pretty close to the reported numbers (within 3 to 4 percentage points) but that was with half the training steps compared to the paper. We'll try to add more details over the next few days. |
I used the pre-trained COCO weights test,After testing segmentation masks, But i found the result is not good ,could you tell me the reason? |
I trained the coco dataset and found the result was not good . How to fine tune the work or set the parameters,why is that? |
Out of curiosity, what's the score people have seen on COCO? |
I am getting the following results on the COCO minival set with the provided model (mask_rcnn_coco.h5) : |
@vijaykbg That's a lot lower than what I got. Is this for bounding boxes or segmentation masks? I'll try to generate and share our results next week. |
@waleedka it's great work,looking forward to your next week results and model weights file !!!! |
@waleedka Thanks for the info and the code. I evaluated segmentation masks ("segm") using the evaluation code coco.py. |
I have installed this right now, and without any tweak I run
Which probably translates to
Which finally gives me the following precisions:
|
And for "segm":
|
@csnemes2 |
@Walid-Ahmed |
Evaluation is really time-consuming and seems that my gpu is not used, when configurationis like this: @waleedka How can I change it to evalute on gpu, not cpu? |
Just falsely installed the cpu version of tensorflow. |
Has anyone reproduced the result published on the original paper? I tried the code, but the model is converging slowly. The mAP is around 29%. |
The pretrained model seems to base on ResNet101-FPN backbone if I'm not mistaken. The reference number in the paper for this architecture is segm- |
@ppwwyyxx True Usually there is no big difference, hence, the success/popularity of minival Anyway I started a new evaluation on the whole dataset, but it will take a while |
This took a bit longer than I hoped, but I just uploaded a new trained model. https://github.com/matterport/Mask_RCNN/releases/tag/v2.0 These are the results on the COCO 5K minival. Bounding box AP is 34.7 (the paper reports 38.2 on test-dev but they don't report minival, unless I missed it). For segmentation, the AP is 29.6 (the paper reports 35.4 on minival). Playing with hyper parameters might allow you to get higher accuracy, but I didn't have enough time to try.
|
FYI I pushed my own implementation. On minival it gets 40.1 on bbox and 34.4 on segm, with only a ResNet101 backbone (no FPN). This is slightly better than the paper's number. |
@waleedka Thank you for your efforts. Another thing I want to mention is, why are you loading parameters from a resnet50-based pretrained model (see model.get_imagenet_weights()) when training for a resnet101-based network? |
@ppwwyyxx That's awesome. Do you think your custom implementation of |
@jiang1st Keras provides a resnet50 trained weights, but not resnet101. I could find resnet101 weights from another source and do a quick mapping of weight names and load them. I just didn't get around to doing so. The residual connections in resnet make this less of an issue, other than longer fine tuning time, and for most people starting from the COCO weights is a faster path. Still, I do want to add 101 weights when I get a chance. Regarding the learning rate, I'm using 0.001 with a batch size of 16 (2 images per GPU on 8 GPUs). Typically you'd want to use a higher LR with bigger batches, but my observation in a few tests lead me to believe that the gradients from different GPUs are being summed (rather than averaged). This is a guess as I haven't verified it by tracing the internal implementation code, but if it's true then it means that you could use the same LR with regardless of the batch size. |
@waleedka It improves a little bit (within 1 mAP). If your model is not initialized with a pretrained resnet101, it is probably the main reason. |
@ppwwyyxx That makes sense, thanks! I'll train on resnet101 weights and see how much improvement that gives me. And if I get the chance, I want to try your implementation of ROI Align and see if that gives it additional boost as well. |
@waleedka there is converted resnet101 weights for keras here https://gist.github.com/flyyufelix/65018873f8cb2bbe95f429c474aa1294 |
@waleedka I trained with your latest training schedule on a 4 gpu system but get far worse results than your v2 weights. How exactly did you train your v2 weights: starting from imagenet? Same as your published training schedule? Is the difference between a 4 and a 8 gpu system and the resulting larger batch sizes really that big? |
@jmtatsch I tried with 8 gpus with the default configuration, and didn't reproduce the reported result (far below 34.7). Not sure where could be the problem. |
As the @ppwwyyxx said, the problem may come from pretrained model. So why not write resnet in model.py by using tf-slim and then you can use tf-slim official pretrained model. Is it possible? |
What does it mean of full pretrained model in compare with resnet pretrain? |
So my question is that can we rewrite resnet part using tf-slim in model.py to use offical pretrained model in tf-slim team |
I see what you said. So, we first convert pretrained resnet 101 in tf-slim to keras and we can train with full pretrained model. |
@XupingZHENG With the 101 layer weights and waleeds training schedule i got very mediocre results. Pretty much doubled the training up and its still running. |
i train the coco2017, the loss is 0.6 , but i get the result is zeros.I don't know why... Configurations: Running per image evaluation... |
@waleedka Could you post the hyperparameters you used to get the reported performance somewhere? The results when I train the model look way worse and with a model as complex as Mask R-CNN doing a hyperparameter search takes a lot of time. So it would be great to know, which configuration you used for the provided checkpoint and the posted results. |
Any updates on this? I'm trying to use this repository as baseline for my thesis, which is impossible if results are so far off from the original paper. |
I adjusted the training schedule to something more reasonable and am slowly getting somewhere. Currently bbox-AP is at 31.4 and segm-AP at 29.1 with a Resnet-101 on minival2014. Still not great, but way better than what I got with the training schedule posted with this repository. I will of course post my training schedule eventually, but would like to wait until my thesis is done (October 1). If someone needs it earlier, just message me. |
@syrix I would actually be very interested. I've also updated my schedule and get better results now but they are still quite a bit from the official checkpoint (however using a ResNet50). |
Training is done now. Final results are 32.6 for bbox and 30.1 for segm on 8-GPUs with a Resnet101 initialized with Resnet50 weights. There are also checkpoints with slightly better numbers (33.0 and 30.4), but I will just use the last one. Not sure where the higher values from @waleedka come from, but I'm fairly sure it's not just changes to the learning schedule, but changes to the remaining code, e.g. not freezing batchnorm. I use a base learning rate of 0.005 (which is fairly aggressive) and a batch size of 2 for an effective batch size of 16.
The final fine-tuning / 100 barely changes results, so 1-2 epochs of that is probably enough. The last three stages are intentionally fairly similar to the s1x-schedule of Detectron, which is from the authors of the paper, but my learning rate is different and I don't use linear warmup. Here is the trainer-class in case you need it:
And here are loss curves. Train-loss: Val-loss: You can clearly see that the first learning rate decrease is essential, while the second one is not necessary. |
I train the coco2017, use coco.py, but get the result mAP=0.203. It is far worse result, could you tell me the reason? Command: train Configurations: |
I'm running the evaluation but it seems to be stuck at "index created!" then, nothing. I've waited for 12+, evaluating on just 100 images. Yet the results aren't ready ? Is this an error of some sort or should just preserver. |
Bugfix for MaskRCNN creating empty log_dir that breaks find_last()
Tensorflow2.0
Hi, Do you have any notes on the hyper parameters, data augmentation, optimizer etc.? I am working on the code as is with no changes made and am trying to train on Coco2014 dataset I have read through many issues here and have picked up various suggestions - use Adam, data augmentations, use ResNet50, lower learning rate, train all layer directly without stage-wise training - to mention a few. I have a couple of specific questions regarding training on Coco dataset.
Finally, generally, I am wondering if you have some suggestions from your experiments on the right direction to get the model to a convergence point? |
@stark-xf Hi, could you figure how to the model trained? |
No description provided.
The text was updated successfully, but these errors were encountered: