Skip to content
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

How to fine-tune? #29

Closed
9thDimension opened this issue Jan 13, 2017 · 1 comment
Closed

How to fine-tune? #29

9thDimension opened this issue Jan 13, 2017 · 1 comment

Comments

@9thDimension
Copy link

Firstly, let me say thanks and congratulations on this ambitious and impressive project.

I've been perusing the code-base and I don't understand it very well. I would like to fine-tune YOLO to my own dataset, using a checkpoint that was learnt on VOC/COCO data.

Just as a test-run, to see what would happen, I ran

./flow --train --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights

which came back with the error:

...
Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
Load  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
Running entirely on CPU
Traceback (most recent call last):
 File "./flow", line 42, in <module>
   tfnet = TFNet(FLAGS)
 File "/home/hal9000/Sources/darkflow/net/build.py", line 51, in __init__
   self.setup_meta_ops()
 File "/home/hal9000/Sources/darkflow/net/build.py", line 94, in setup_meta_ops
   if self.FLAGS.train: self.build_train_op()
 File "/home/hal9000/Sources/darkflow/net/help.py", line 15, in build_train_op
   self.framework.loss(self.out)
 File "/home/hal9000/Sources/darkflow/net/vanilla/train.py", line 9, in loss
   'Loss type {} not implemented'.format(loss_type)
AssertionError: Loss type [region] not implemented

So I ask:

(1) Which options on the flow shell script do I need to run fine-tuning?
(2) How do I point to my dataset, and how should it be formatted?

Thanks again.

@thtrieu
Copy link
Owner

thtrieu commented Jan 13, 2017

(1) You did it correctly, the only reason you cannot fine-tune this config is because it is YOLO9000, for which I did not build the training part (as stated in README). If you want to fine-tune older version's configs, point to ./cfg/v1/ or ./cfg/v1.1/

(2) use option --dataset and --annotation, you can see the complete set of options by ./flow --h (again, as stated in README). The format should be identical to that of PASCAL VOC dataset.

@thtrieu thtrieu closed this as completed Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants