models icon indicating copy to clipboard operation
models copied to clipboard

Anybody know how to train "object_detction" model in local with own imageset?

Open june9713 opened this issue 9 years ago • 15 comments

I wanna train from scratch , but many error is occured. I followed instruction from "Quick Start: Training a pet detector" and "Running locally" (is mixed)

1 . I downloaded pet image files and annotate files from http://www.robots.ox.ac.uk/~vgg/data/pets/

pet_label_map.pbtxt is already exist in data folder.

make record file(https://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_pets.md) python object_detection/create_pet_tf_record.py --label_map_path=object_detection/data/pet_label_map.pbtxt --data_dir=pwd --output_dir=pwd

most confusing thing is pipeline config file. I dont know how to make config file exactly. /models/object_detection/samples/configs/ directory has some of sample config files. I just choose one file. I choose "faster_rcnn_resnet101_pets.config"

edit faster_rcnn_resnet101_pets.config . some of directory and file path should be changing

Now all ready is done.( I think) Lets start traingin.(https://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_locally.md)

my pipeline_config_path is : '~/Desktop/models/object_detection/models/models/faster_rcnn_resnet101_pets.config' my train_dir is : ~/Desktop/models/object_detection/models/models/train

run below:

python object_detection/train.py --logtostderr --pipeline_config_path='/Desktop/models/object_detection/models/models/faster_rcnn_resnet101_pets.config' --train_dir=/Desktop/models/object_detection/models/models/train

But failed.

Error Message is as below.

tensorflow.python.framework.errors_impl.NotFoundError: ~/Desktop/models/object_detection/models/models/faster_rcnn_resnet101_pets.config

It means pipeline_config file is not exist. But file is obiously exist!! So I dont know reason. Im finding the reason. If anybody have idea , please help me. Thnaks :-)

june9713 avatar Jun 19 '17 03:06 june9713

Your question would be easier to answer if you took some time to get the formatting right–i. e. use ``` for code etc., and with a bit of care taken to avoid spelling mistakes.

It's also possibly a question better suited for StackOverflow. Github issues are for bugs, not for usage questions.

But to hopefully help you: it appears the files are in ~/Desktop/..., i. e. /home/<username>/Desktop/..., but you're calling it with --pipeline_config_path='/Desktop/...'. Note the missing ~.

I'm also not sure that shell expansion of ~ to /home/<username> would work. Try using the actual paths.

KarlAmort avatar Jun 19 '17 08:06 KarlAmort

@MatthiasWinkelmann Thanks your kind answer. :-) And, actually , that is miss spell of "~" is right. But that is my mistake during copy text to here. Anyway I found answer! I changed all path to abs path , And it is work! Thanks your kind reply!

june9713 avatar Jun 19 '17 11:06 june9713

Hey @june9713 did you try with your own dataset instead of the pet dataset?

abhiML avatar Jun 19 '17 12:06 abhiML

I shared my experience here.

eshirima avatar Jul 07 '17 14:07 eshirima

@abhiML Sorry too late answer. I didnt notice your message becasue a lot of another messages. Yes, Im trying to train with my own images sets.

june9713 avatar Jul 07 '17 19:07 june9713

@eshirima Oh Thanks!! I will try and will tell you about result!

june9713 avatar Jul 07 '17 19:07 june9713

I have the same problem with you and for me i can not run the train.py correctlly. perhapse i made a mistake for the Running the Evaluation Job. wechatimg20 2

cindysillence avatar Jul 17 '17 15:07 cindysillence

@cindysillence You have a typo in your command. It's supposed to be --train_dir instead of -train_dir

eshirima avatar Jul 17 '17 16:07 eshirima

I'v tried with --train . It still not working ... I use mac . Do you use unbuntu or windows ? Emil Shirima [email protected] schrieb am Mo. 17. Juli 2017 um 18:56:

@cindysillence https://github.com/cindysillence You have a typo in your command. It's supposed to be --train_dir instead of -train_dir

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1606#issuecomment-315810853, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlYjTmmF6r0qBDM9S4-DzWOcRJIEZp7ks5sO5EHgaJpZM4N9uVo .

cindysillence avatar Jul 17 '17 17:07 cindysillence

@cindysillence I am using a Mac. Are you sure you've created the folder called train inside ../object_detection/output/?

eshirima avatar Jul 17 '17 20:07 eshirima

@cindysillence this is really basic stuff and probably doesn't belong here...

...But: There's a line break before ---train_dir=..., so you are running two commands separately. The first is the python train.py..., which complains about the missing --train_dir=. Then, you get the bash: --train_dir...: No such file or directory error because that line is run as a separate command.

KarlAmort avatar Jul 17 '17 21:07 KarlAmort

@eshirima im really shure about it. there is a train folder .

cindysillence avatar Jul 18 '17 09:07 cindysillence

@MatthiasWinkelmann yes i just follow the instructions fromhttps://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_locally.md. but this not work in my mac

cindysillence avatar Jul 18 '17 09:07 cindysillence

have you addressed this problem???

mrainezty avatar Aug 08 '18 07:08 mrainezty

please check the file faster_rcnn_resnet101_pets.config'

watchpoints avatar Aug 21 '18 03:08 watchpoints