vsmolyakov / cv Goto Github PK
View Code? Open in Web Editor NEWcomputer vision
License: MIT License
computer vision
License: MIT License
Hi,
Thank you very much for sharing this code !
When I download and run your code "prepare_dataset.py" from the "caption generation" folder, I have an error that rise.
I already used the Flickr8k dataset for other projects and it is installed on my computer. I made sure to update the path. Here is the error :
`
94560256/94653016 [============================>.] - ETA: 0s
94658560/94653016 [==============================] - 52s 1us/step
94666752/94653016 [==============================] - 52s 1us/step
processing training and validation images...
0it [00:00, ?it/s]
Traceback (most recent call last):
File "/home/french_magician/Documents/Chicago/CV/Project/Code/prepare_dataset.py", line 107, in
c_train, c_val, c_test = prepare_dataset()
File "/home/french_magician/Documents/Chicago/CV/Project/Code/prepare_dataset.py", line 71, in prepare_dataset
encoded_images[img] = get_encoding(encoding_model, img)
File "/home/french_magician/Documents/Chicago/CV/Project/Code/prepare_dataset.py", line 31, in get_encoding
pred = np.reshape(pred, pred.shape[-1])
File "/home/french_magician/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 279, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/french_magician/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 51, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: cannot reshape array of size 100352 into shape (2048,)
`
Do you know how to fix it ?
Thanks for your Help,
Thomas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.