Comments (5)
Hi!
You have to download the model_image_zooms. Everything is explained in the README.
Míriam
from detection-2016-nipsws.
By the way, I've checked all package in "requirements.txt", all are the same except of these 8 packages, I have newer version:
-
package_name==my_version (your_version)
-
Cython==0.25.1 (0.24.1)
-
numpy==1.11.2 (1.11.1)
-
Pillow==3.4.2 (3.3.1)
-
prompt-toolkit==1.0.8 (1.0.7)
-
pyparsing==2.1.10 (2.1.3)
-
python-dateutil==2.6.0 (2.5.3)
-
pytz==2016.10 (2016.6.1)
-
scikit-learn==0.18.1 (0.17.1)
And, here is my folder path:
--font/
|----LiberationMono-Regular.ttf
--img/
--models_image_zooms/
|----model_image_zooms
--scripts/
--vgg16_weights.h5
--testing/
here, testing/ is empty
and the file "model_image_zooms" under the folder models_image_zooms/
was created by "touch models_image_zooms/model_image_zooms"
If not doing so (just have an empty folder models_image_zooms/)
I'll get this error message:
Using Theano backend.
Traceback (most recent call last):
File "image_zooms_testing.py", line 42, in
model = get_q_network(weights_path + model_name)
File "/auto/master05/liyi9487/project/detection-2016-nipsws/scripts/reinforcement.py", line 87, in get_q_network
model.load_weights(weights_path)
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 2486, in load_weights
f = h5py.File(filepath, mode='r')
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 272, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 92, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-build-v_zMzm/h5py/h5py/_objects.c:2847)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-build-v_zMzm/h5py/h5py/_objects.c:2805)
File "h5py/h5f.pyx", line 76, in h5py.h5f.open (/tmp/pip-build-v_zMzm/h5py/h5py/h5f.c:2093)
IOError: Unable to open file (Unable to open file: name = '../models_image_zooms/model_image_zooms', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
from detection-2016-nipsws.
"You should also create two folders in the root of the project, called models_image_zooms and models_pool45_crops, and store inside them the corresponding weights."
So I should store vgg16_weights.h5 into models_image_zoom/ ?
Thank you for answering
from detection-2016-nipsws.
I got that!
"downloaded in the following links Image Zooms model and Pool45 Crops model"
yes, now I have these two weights under corresponding folders.
However, I still cannot run the code successfully:
python scripts/image_zooms_testing.py
Using Theano backend.
Traceback (most recent call last):
File "scripts/image_zooms_testing.py", line 41, in
model_vgg = obtain_compiled_vgg_16(path_vgg)
File "/auto/master05/liyi9487/project/detection-2016-nipsws/scripts/features.py", line 203, in obtain_compiled_vgg_16
model = vgg_16(vgg_weights_path)
File "/auto/master05/liyi9487/project/detection-2016-nipsws/scripts/features.py", line 255, in vgg_16
model.load_weights(weights_path)
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 2486, in load_weights
f = h5py.File(filepath, mode='r')
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 272, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/home/master/05/liyi9487/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 92, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-build-v_zMzm/h5py/h5py/_objects.c:2847)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-build-v_zMzm/h5py/h5py/_objects.c:2805)
File "h5py/h5f.pyx", line 76, in h5py.h5f.open (/tmp/pip-build-v_zMzm/h5py/h5py/h5f.c:2093)
IOError: Unable to open file (Unable to open file: name = '../vgg16_weights.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
Here are my files under the root of the project:
ls -l
total 541448
-rw-r--r-- 1 liyi9487 cmlab 1101 Dec 20 09:46 LICENSE
-rw-r--r-- 1 liyi9487 cmlab 12657 Dec 20 09:46 README.md
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 20 09:46 authors
-rw-r--r-- 1 liyi9487 cmlab 898570 Dec 20 09:46 bellver-2016-nipsws.pdf
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 20 10:42 font
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 20 09:46 img
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 20 09:46 logos
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 23 13:48 models_image_zooms
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 23 13:50 models_pool45_crops
-rw-r--r-- 1 liyi9487 cmlab 547 Dec 20 09:46 requirements.txt
drwxr-xr-x 4 liyi9487 cmlab 4096 Dec 21 14:18 scripts
drwxr-xr-x 2 liyi9487 cmlab 4096 Dec 20 10:24 testing
-rwxrwxrwx 1 liyi9487 cmlab 553479920 Dec 20 14:56 vgg16_weights.h5
I do have the file " vgg16_weights.h5" and I even chmod to 0777.
Thank you for helping.
from detection-2016-nipsws.
I knew why!!
my classmate told me why, since I execute the file "image_zoom_testing.py" under the root of the project, but I need to execute that file under script/
thank u very much
from detection-2016-nipsws.
Related Issues (20)
- the class_name of id 16 is wrong HOT 1
- maximum memory consumed? HOT 2
- pretrained models_pool45_crops weights for pool45_crops_testing models HOT 1
- about weights of model_vgg HOT 4
- A wired problem I found when testing the VOC dataset 2007 HOT 1
- I ran into problems when using the vc02012 dataset.
- Time taken per iteration during training?
- flatten error HOT 2
- OSError: [Errno 24] Too many open files: './VOC2012//JPEGImages/2008_008190.jpg' HOT 1
- error in generate_bounding_box_from_annotation HOT 1
- TypeError: __init__() got an unexpected keyword argument 'file' HOT 2
- Yes, pretrained CNN is used here,using pretrained cnn (vgg16 here) has 2 benefits:First, HOT 1
- On precision_recall curve questions
- Multi-class Training
- Could this be able to detect multiple objects in one image? e.g. several aircrafs within one image?
- Used the pre-trained model model_image_zooms_2, it returns action 6 on the very first prediction with similar airplane test images
- ValueError: You are trying to load a weight file containing 0 layers into a model with 16 layers.
- platform
- Negative Dimension size error
- ValueError: You are trying to load a weight file containing 0 layers into a model with 16 layers. HOT 1
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 detection-2016-nipsws.