Coder Social home page Coder Social logo

Comments (17)

CharlesShang avatar CharlesShang commented on May 25, 2024

@miraclebiu Thank you for this work.
ResNet has batch_norm layers that keeps a moving_avg and moving_var during each iter. And it works only for mini_batch > 1 (see the orginal paper). In our case, the batchsize is 1. so the moving-avg and moving_var is meanlingless.

To better use ResNet, I think you should keep the bn layer fixed, skipping re-computing mean and var during training.

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

looking forward for your latest result.

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

I read your code agian and find you've disabled the updating of bn, by passing is_training=False.
Then I'm not sure about the causes.
Some suggestions:

  1. Try a differen learning rate.
  2. Disable updating of resnet layers, only fine-tuning new layers, like rpn_xx, fc layers.
  3. Add a histogram summary of each layer to make sure there is no large difference in magnitude between the resnet and new layers

There is a resnet implement, https://github.com/ry/tensorflow-resnet, and also the pretrained models.

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

I will try and if I can find the error, I will tell you

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

This evening, I turn my code from the Faster-rcnn_TF to your project ,and I train the resnet50 for about 130k iterations ,the test performance map is about 70%,maybe is the Faster-rcnn_TF errors that I didn't find .In my previous opinion, since this project can train the VGG well ,so it can train resnet50 well too But I think I'm wrong. Besides , I also get the code about the psroipooling in R-FCN and implement in the tensorflow ,maybe I can send to you .

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

I'm new about tensorflow and the FRCN, so I think I should read your code carefully and learn how to use it .

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

@miraclebiu Congratulations! Very glad you made it. You can try pull request to send you awesome code to this repo. check this link https://help.github.com/articles/about-pull-requests/

And there are something very confusing in the original code, like the inconsistency of axis. some where the rpn_score is ordered by (1, H, W, A, 2) and some where (1, H, W, 2, A).

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

@CharlesShang I write an email to your gmail.
I don't know how to pull request the file since I'm a newcomer about github, all I know is how to download the code.Besides, the tensorflow machine and my computer is not the same machine , I need to copy the file to this computer, so I create the reposity about TFFRCN_Resnet50,you can see the readme.md, I only change the factory.py, init.py, networks.py in ./lib/networks and add resnet50_train and resnet50_test.py in the same folder.
Thank you for your work on this project!
the website is
https://github.com/miraclebiu/TFFRCN_resnet50

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

I run this on 0.11 ,you can check what's changed on 0.12 https://github.com/tensorflow/tensorflow/releases

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

@miraclebiu I merge your contributions to resnet branch.
After a simple test, I'll finally merge it to the master.
Looking forward to your resnet101 models.
Thanks again.

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

@miraclebiu
Added your code. Notice there is psroi_pooling, have you tested this module?
I think we can build R-FCN together.

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

@CharlesShang I have tested the forward, I haven't test the backward, I find it on the github and have contrasted it with the caffe code and made some modifications,I think it is right.
Besides, I think if someone want to build R-FCN, he should write some code about OHEM which I think is very important for R-FCN. It is just my opinion.
Google have submitted a paper on arXiv about many detectors ,"Speed/accuracy trade-offs for modern convolutional object detectors", I don't know if they use the OHEM for R-FCN. I wish they can release their codes.

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

@CharlesShang ,maybe you can use tf.nn.top_k or tf.nn.in_top_k to sort the loss and use the tf.gather .
Since the network has four loss and sum them , I don't know which should do the OHEM .

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

@miraclebiu, online hard example mining (OHEM), data augment, etc., are very important for detection. I'll add these functions in a few days. A sinple way is to check out the R-FCN code and find out how they use OHEM:-).
Thank you for your information about that google paper.

from tffrcnn.

miraclebiu avatar miraclebiu commented on May 25, 2024

@CharlesShang the current map of Resnet101 model is 70.4% , it has iterated 150k , maybe it need more iterations . The converted Resnet50 and Resnet 101 model has a small gap about 0.6% top5 error, so there is no big difference between using Resnet50 and Resnet101 ,but the Resnet101 model is about twice bigger than the Resnet50.

from tffrcnn.

CharlesShang avatar CharlesShang commented on May 25, 2024

I think it's the best mAP we can get.
Maybe the bottleneck is training data, the origianl paper (FasterRCNN + ResNet101) reported the mAP on 07 was 0.738 using 07+12 for training.

from tffrcnn.

jwnsu avatar jwnsu commented on May 25, 2024

from tffrcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.