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

tiny yolo training error #1080

Open
aayushgavande opened this issue Oct 6, 2019 · 2 comments
Open

tiny yolo training error #1080

aayushgavande opened this issue Oct 6, 2019 · 2 comments

Comments

@aayushgavande
Copy link

Parsing ./cfg/tiny-yolo-voc.cfg
Parsing cfg/tiny-yolo-voc-1c.cfg
Loading bin/tiny-yolo-voc.weights ...
Successfully identified 63471556 bytes
Finished in 0.05065202713012695s

Building net ...
Source | Train? | Layer description | Output size
-------+--------+----------------------------------+---------------
| | input | (?, 416, 416, 3)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 416, 416, 16)
Load | Yep! | maxp 2x2p0_2 | (?, 208, 208, 16)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 208, 208, 32)
Load | Yep! | maxp 2x2p0_2 | (?, 104, 104, 32)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 104, 104, 64)
Load | Yep! | maxp 2x2p0_2 | (?, 52, 52, 64)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 52, 52, 128)
Load | Yep! | maxp 2x2p0_2 | (?, 26, 26, 128)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 26, 26, 256)
Load | Yep! | maxp 2x2p0_2 | (?, 13, 13, 256)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 13, 13, 512)
Load | Yep! | maxp 2x2p0_1 | (?, 13, 13, 512)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 13, 13, 1024)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 13, 13, 1024)
Init | Yep! | conv 1x1p0_1 linear | (?, 13, 13, 30)
-------+--------+----------------------------------+---------------
Running entirely on CPU
cfg/tiny-yolo-voc-1c.cfg loss hyper-parameters:
H = 13
W = 13
box = 5
classes = 1
scales = [1.0, 5.0, 1.0, 1.0]
Building cfg/tiny-yolo-voc-1c.cfg loss
Building cfg/tiny-yolo-voc-1c.cfg train op
Finished in 7.391351699829102s

Enter training ...

cfg/tiny-yolo-voc-1c.cfg parsing newmodel/annotations
Parsing for ['Rugby_Ball']
[====================>]100% 000245.xml
Statistics:
Dataset size: 245
Dataset of 245 instance(s)
Traceback (most recent call last):
File "flow", line 6, in
cliHandler(sys.argv)
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\cli.py", line 33, in cliHandler
print('Enter training ...'); tfnet.train()
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\net\flow.py", line 39, in train
for i, (x_batch, datum) in enumerate(batches):
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\net\yolo\data.py", line 114, in shuffle
inp, new_feed = self._batch(train_instance)
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\net\yolov2\data.py", line 27, in _batch
img = self.preprocess(path, allobj)
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\net\yolo\predict.py", line 62, in preprocess
result = imcv2_affine_trans(im)
File "C:\Users\Avinash\Anaconda3\envs\Darkflow\Darkflow_Net\darkflow-master\darkflow\utils\im_transform.py", line 20, in imcv2_affine_trans
h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

how do i solve this error ?

@guias12
Copy link

guias12 commented Oct 21, 2019

that's a duplicate #265 (comment)

@Tanmay-Kulkarni101
Copy link

Tanmay-Kulkarni101 commented Nov 10, 2019

Hey, what command did you use to start the process?

flow --model /content/darkflow/cfg/yolov2-tiny-modified.cfg \
--load /content/darkflow/bin/yolov2-tiny.weights \
--dataset /content/images \
--annotation /content/annotations \
--gpu 1.0 \
--train

worked for me.

Earlier I had made use of the following-

flow --model /content/darkflow/cfg/yolov2-tiny-modified.cfg \
--load /content/darkflow/bin/yolov2-tiny.weights \
--imgdir /content/images \
--annotation /content/annotations \
--gpu 1.0 \
--train

and had faced the same error. Thus, making use of the dataset flag should do the trick. I hope this helps.

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

3 participants