models icon indicating copy to clipboard operation
models copied to clipboard

can i train faster-rcnn-inception-v2 on multiple tfrecords?

Open Eladsimba opened this issue 7 years ago • 5 comments

Please go to Stack Overflow for help and support:

http://stackoverflow.com/questions/tagged/tensorflow

Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • What is the top-level directory of the model you are using: /models/research/object_detection

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): used my own dataset

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04

  • TensorFlow installed from (source or binary): pip install

  • TensorFlow version (use command below): 1.7.0

  • Bazel version (if compiling from source):

  • CUDA/cuDNN version:

  • GPU model and memory: NVIDIA GeForce GTX 1080

  • Exact command to reproduce: python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config

Describe the problem

I am trying to train a model on my own dataset. in tutorials that i had seen they always use one tfrecord for train and one for test - each containing data on multiple tagged images. my data contains one tfrecord for each labeled image. I tried to train the model on my tfrecords but it was not able to make the training. is it possible to train on multiple tfrecords? if yes, how are they supposed to be arranged ?

Eladsimba avatar Apr 24 '19 07:04 Eladsimba

Of course you can.Please refer to the usage in the configuration file.


  tf_record_input_reader {

    input_path: "PATH_TO_BE_CONFIGURED/mscoco_train.record-?????-of-00100"

  }

rootkitchao avatar Apr 24 '19 10:04 rootkitchao

thank you! and also, do you know if it is possible to train on a dataset containing only one tagged image (one for train and one for test) ? can the model even learn with only one example?

Eladsimba avatar Apr 29 '19 18:04 Eladsimba

@Eladsimba Can this change work? What changes need to be made to generate data?

ggzzzzz628 avatar Nov 04 '19 09:11 ggzzzzz628

@rootkitchao What changes need to be made to generate data?

ggzzzzz628 avatar Nov 04 '19 09:11 ggzzzzz628

Now generate more tfrecord and config loading multiple tfrecord has been solved, but found that it does not help the memory (still OOM, I thought that more tfrecord can reduce the memory usage, increase the batch size parameters), I would like to ask How should I handle it? @Eladsimba @rootkitchao

ggzzzzz628 avatar Nov 15 '19 03:11 ggzzzzz628