Code Monkey home page Code Monkey logo

Comments (9)

yangJirui avatar yangJirui commented on June 9, 2024

I guess, you changed the CLASS_NUM(in the cfgs.py ) to 2, and you have restored the detection model with the Weights offered by us which trained in the pascal VOC.

Some solutions are as following:
Solution 1: You can load ImageNet's pretrained weights to train your data. Our program does not load the weights of Fast-RCNN/cls_fc when loading ImageNet Pretrained weights, so no error is reported.

Solution 2: Use the pre-trained model we provide to load, but you have to write some codes to control it does not load Fast-RCNN/cls_fc, because the shape is VOC trained weights is [2048, 21] while in your model is [2048, 3].
@leetesua

from faster-rcnn_tensorflow.

leetesua avatar leetesua commented on June 9, 2024

@yangJirui you are right, i changed the class num to 2. But how can i load imagenet's pretrained weights? Or how can i control not to load fast_rcnn/cls_fc? thanks a lot!

from faster-rcnn_tensorflow.

yangxue0827 avatar yangxue0827 commented on June 9, 2024

If you want to train your own dataset, please change the value of VERSION in cfgs.py. If not, model will load the weights which we provide according to the VERSION. @leetesua

from faster-rcnn_tensorflow.

yangxue0827 avatar yangxue0827 commented on June 9, 2024

1、If you want to train your own data, please note:

(1) Modify parameters (such as CLASS_NUM, DATASET_NAME, VERSION, etc.) in $PATH_ROOT/libs/configs/cfgs.py
(2) Add category information in $PATH_ROOT/libs/label_name_dict/lable_dict.py     
(3) Add data_name to line 76 of $PATH_ROOT/data/io/read_tfrecord.py 

@leetesua

from faster-rcnn_tensorflow.

leetesua avatar leetesua commented on June 9, 2024

I have changed the VERSION in cfgs from 'FasterRCNN_20180517' to '', so it won't load anything from output/trained_weight, however, when I run train.py again, it stops, with 'restore model' as the last printed line:
image

also, I am a little bit confused about,,, should i change the trained_weight in output folder or pretrained_weight in data folder ?

from faster-rcnn_tensorflow.

leetesua avatar leetesua commented on June 9, 2024

image

from faster-rcnn_tensorflow.

leetesua avatar leetesua commented on June 9, 2024

image

from faster-rcnn_tensorflow.

yangxue0827 avatar yangxue0827 commented on June 9, 2024

There are must something wrong with your tfrecord. @leetesua

from faster-rcnn_tensorflow.

yangxue0827 avatar yangxue0827 commented on June 9, 2024

Check your data and xml carefully.

from faster-rcnn_tensorflow.

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.