Comments (13)
Weights file are here http://pjreddie.com/darknet/yolo/
Look around for older version
from darkflow.
Do you have to keep the cfg and weights files paired? I would assume so. For example, I wouldn't use one of the darkflow cfg files and one of the pjreddie/darknet/yolo weight files, right?
from darkflow.
As long as --model
, --load
and --config
is pointing to appropriate position, the pair .cfg
and .weights
are well-defined and there will be no confusion.
Two example that works fine:
./flow --model ~/darkflow/cfg/yolo.cfg --load ~/pjreddie/darknet/yolo.weights
# or partially load yolo-4c from yolo.weights, assuming yolo.weights' cfg is at ~/somewhereelse/
./flow --model ~/darkflow/cfg/yolo-4c.cfg --load ~/pjreddie/darknet/yolo.weights --config ~/somewhereelse/
from darkflow.
Good to know about the --config flag. I tried a test, using the darkflow tiny cfg, and the darknet V1 tiny cfg and weights.
Got an assertion error:
rob@skynet1:~/darkflow$ ./flow --model cfg/v1/yolo-tiny.cfg --train --load /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights --config /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.cfg --dataset /home/rob/Data_PascalVOC/VOCdevkit/VOC2012/JPEGImages/ --annotation /home/rob/Data_PascalVOC/VOCdevkit/VOC2012/Annotations/ --gpu 1.0
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcurand.so.8.0 locally
Parsing cfg/v1/yolo-tiny.cfg
Loading /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights ...
Traceback (most recent call last):
File "./flow", line 42, in
tfnet = TFNet(FLAGS)
File "/home/rob/darkflow/net/build.py", line 34, in init
darknet = Darknet(FLAGS)
File "/home/rob/darkflow/dark/darknet.py", line 26, in init
self.load_weights()
File "/home/rob/darkflow/dark/darknet.py", line 78, in load_weights
wgts_loader = loader.create_loader(*args)
File "/home/rob/darkflow/utils/loader.py", line 104, in create_loader
return load_type(path, cfg)
File "/home/rob/darkflow/utils/loader.py", line 18, in init
self.load(*args)
File "/home/rob/darkflow/utils/loader.py", line 69, in load
val = walker.walk(new.wsize[par])
File "/home/rob/darkflow/utils/loader.py", line 126, in walk
'Over-read {}'.format(self.path)
AssertionError: Over-read /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights
Looking through what over-read means right now...
from darkflow.
BTW, pulling both --load and --config arguments out of the above call (starting from scratch weights basically) allows training to start fine.
from darkflow.
Your command:
./flow --model cfg/v1/yolo-tiny.cfg --load /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights --config /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.cfg
Is invalid, as --config
should be a folder, to look for tiny-yolo.cfg
, not the specific file, so the correct command is
./flow --model cfg/v1/yolo-tiny.cfg --load /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights --config /home/rob/models_darknet/yoloV1_tiny/
from darkflow.
Same error, using --config with folder instead of file. Error below.
rob@skynet1:~/darkflow$ ./flow --model cfg/v1/yolo-tiny.cfg --train --load /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights --config /home/rob/models_darknet/yoloV1_tiny/ --dataset /home/rob/Data_PascalVOC/VOCdevkit/VOC2012/JPEGImages/ --annotation /home/rob/Data_PascalVOC/VOCdevkit/VOC2012/Annotations/ --gpu 1.0
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:120] successfully opened CUDA library libcurand.so.8.0 locally
Parsing /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.cfg
Parsing cfg/v1/yolo-tiny.cfg
Loading /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights ...
Traceback (most recent call last):
File "./flow", line 42, in
tfnet = TFNet(FLAGS)
File "/home/rob/darkflow/net/build.py", line 34, in init
darknet = Darknet(FLAGS)
File "/home/rob/darkflow/dark/darknet.py", line 26, in init
self.load_weights()
File "/home/rob/darkflow/dark/darknet.py", line 78, in load_weights
wgts_loader = loader.create_loader(*args)
File "/home/rob/darkflow/utils/loader.py", line 104, in create_loader
return load_type(path, cfg)
File "/home/rob/darkflow/utils/loader.py", line 18, in init
self.load(*args)
File "/home/rob/darkflow/utils/loader.py", line 69, in load
val = walker.walk(new.wsize[par])
File "/home/rob/darkflow/utils/loader.py", line 126, in walk
'Over-read {}'.format(self.path)
AssertionError: Over-read /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights
from darkflow.
Seems like it is getting hung up on parsing the darknet weights file. Incidentally, would using the --binary flag work, instead of the --load flag?
from darkflow.
The message means home/rob/models_darknet/yoloV1_tiny/tiny-yolo.cfg
indicates a larger size than /home/rob/models_darknet/yoloV1_tiny/tiny-yolo.weights
actually is.
from darkflow.
Okay, interesting. Might be a problem with the files I pulled from the darknet site.
I suspected something similar, tried a different set (tiny_extract), with V1 extraction cfg and weights, and seems to work okay.
from darkflow.
I suppose you are trying to load yolo-tiny
of YOLOv1.0 from tiny-yolo
of YOLOv1.1 ? Doing that on my machine would be
./flow --model cfg/v1/yolo-tiny.cfg --load bin/v1.1/tiny-yolov1.weights --config cfg/v1.1/
And it works okay.
from darkflow.
Possibly. I'll take another look to make sure I'm using the correct pairing.
from darkflow.
hi,you,when I want to train a new model Iues the order:
./flow --model cfg/v3/tiny-yolo-voc-3c.cfg --load bin/tiny-yolo-voc.weights
#######tiny-yolo-voc is a copy of tiny-yolo-voc and class=3,filter=40,and label.txt include 3 class###
It come out a problem like this:
AssertionError: expect 63123056 bytes, found 63471556
I know it caused by the unpair between the .weight and .cfg ,how to solve this problem
thank you!
from darkflow.
Related Issues (20)
- [Documentation] Link to the Android demo is broken
- tiny yolo predict a lot of bounding boxes for one class problem HOT 1
- Result is empty HOT 2
- PermissionError: [Errno 13] Permission denied: './ckpt/checkpoint' HOT 1
- How to put a darkflow model into Android Studio
- Importing to external project
- Accuracy HOT 1
- error in getting started
- Version of yolo from the yolo.cfg file
- Shrikant@ can you help in in regard of this.
- What's wrong with Darkflow?
- can't import darkflow
- Build Error darkflow on 20.04 Ubuntu
- Training own model
- How to convert tensorflow to darknet?
- Convert annotation video mat files to COCO
- Tensorflow update to TF 2.x
- python setup.py build_ext --inplace HOT 3
- pip install -e .
- NMS.pxd not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkflow.