Comments (12)
- The program understands that you want to work with
yolov1-2c
. - The program sees that you want to load this config from weight
yolo.weights
- Since the name
yolo
andyolov1-2c
is different, the program assumes that you are doing a partial load from a weight file that has a different config. It assumes the config foryolo.weights
isyolo.cfg
, and indeed found one in./cfg/
- The program use
./cfg/yolo.cfg
to loadyolo.weights
and failed sinceyolo.cfg
indicates it expect 269862452 bytes, but found a total of 789312988 bytes.
Solution: Change your weight name to yolov1-2c.weights
from darkflow.
Please update a new code for some critical bug fixes before fine-tuning your yolov1
from darkflow.
This has to do with the output of last layer.
Please make sure this is true:
output = side * side * (classes + num * 5)
where output
found in the last [connected]
and side
, classes
, num
found in [detection]
from darkflow.
Where did you get yolov1-2c.weights
? Clearly the file's size does not match cfg/v1.1/yolov1-2c.cfg
as indicated by the assertion error (it is larger than what yolov1-2c.cfg
expects). From what I checked 789312988
bytes is the size of yolov1.weights
.
from darkflow.
Thank you for your effort. It worked but I have a new problem.
After running this command
./flow --model cfg/v1.1/yolov1-2c.cfg --load bin/yolov1-2c.weights
It produce this error
Traceback (most recent call last):
File "./flow", line 60, in <module>
tfnet.predict()
File "/home/moh/Documents/darkflow/net/flow.py", line 103, in predict
os.path.join(inp_path, all_inp[i]))
File "/home/moh/Documents/darkflow/net/yolo/test.py", line 71, in postprocess
cords = cords.reshape([SS, B, 4])
ValueError: total size of new array must be unchanged
from darkflow.
It worked .. but produces new error
First ..the equation :
output = side * side * (classes + num * 5)
output = 7*7*(2+3*5)= 833
when I use this command it works fine:
./flow --model cfg/v1.1/yolov1-2c.cfg
but when using this command
./flow --model cfg/v1.1/yolov1-2c.cfg --load bin/yolov1-2c.weights
./flow --model cfg/v1.1/yolov1-2c.cfg --load bin/yolov1-2c.weights
/home/moh/Documents/darkflow/dark/darknet.py:54: UserWarning: ./cfg/yolov1-2c.cfg not found, use cfg/v1.1/yolov1-2c.cfg instead
cfg_path, FLAGS.model))
Parsing cfg/v1.1/yolov1-2c.cfg
Loading bin/yolov1-2c.weights ...
Traceback (most recent call last):
File "./flow", line 42, in <module>
tfnet = TFNet(FLAGS)
File "/home/moh/Documents/darkflow/net/build.py", line 34, in __init__
darknet = Darknet(FLAGS)
File "/home/moh/Documents/darkflow/dark/darknet.py", line 27, in __init__
self.load_weights()
File "/home/moh/Documents/darkflow/dark/darknet.py", line 82, in load_weights
wgts_loader = loader.create_loader(*args)
File "/home/moh/Documents/darkflow/utils/loader.py", line 104, in create_loader
return load_type(path, cfg)
File "/home/moh/Documents/darkflow/utils/loader.py", line 18, in __init__
self.load(*args)
File "/home/moh/Documents/darkflow/utils/loader.py", line 76, in load
walker.offset, walker.size)
AssertionError: expect 745054228 bytes, found 789312988
from darkflow.
yolov1-2c.weights
it is the same as yolov1.weights
.
I only changed the names because of the previous problem.
yolov1-2c.weights= 789,312,988 bytes
can you give me a link for your yolov1.weights
?
This is my yolov1-2c.cfg
file:
https://drive.google.com/file/d/0B95Sp237mrsTSGp6Q2V4d2pXQkU/view?usp=sharing
from darkflow.
It is not supposed to work like that.
What you have here is yolov1-2c.cfg
and yolov1.weights
Then the only possible use case is that you want to partially load yolov1-2c.cfg
from yolov1.weights
. To do that:
./flow --model cfg/v1.1/yolov1-2c.cfg --load bin/v1.1/yolov1.weights --config cfg/v1.1/
from darkflow.
Great ! .. It worked.
but when I start training I used this command :
./flow --train --model cfg/v1.1/yolov1-2c.cfg --load bin/yolov1.weights --config cfg/v1.1/ --annotation labels/ --dataset JPEGImages/
It produces this error :
Running entirely on CPU
cfg/v1.1/yolov1-2c.cfg loss hyper-parameters:
side = 7
box = 3
classes = 2
scales = [1.0, 1.0, 0.5, 5.0]
Building cfg/v1.1/yolov1-2c.cfg loss
Building cfg/v1.1/yolov1-2c.cfg train op
Finished in 286.667635202s
Enter training ...
Traceback (most recent call last):
File "./flow", line 53, in <module>
print('Enter training ...'); tfnet.train()
File "/home/moh/Documents/darkflow/net/flow.py", line 37, in train
for i, (x_batch, datum) in enumerate(batches):
File "/home/moh/Documents/darkflow/net/yolo/data.py", line 130, in shuffle
data = self.parse()
File "/home/moh/Documents/darkflow/net/yolo/data.py", line 29, in parse
return pickle.load(f, encoding = 'latin1')[0]
TypeError: load() got an unexpected keyword argument 'encoding'
from darkflow.
Are you using Python3?
from darkflow.
yes.
I am working on Ubuntu that has python 3 per-installed.
from darkflow.
encoding
is a valid argument for load()
in python3. I suggest printing print(sys.version)
and make sure the running python is python3.
BTW, please pull new commit, some bugs are fixed.
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.