louisfoucard / w-net Goto Github PK
View Code? Open in Web Editor NEWw-net: a convolutional neural network architecture for the self-supervised learning of depthmap from pairs of stereo images.
w-net: a convolutional neural network architecture for the self-supervised learning of depthmap from pairs of stereo images.
TypeError: Input 'end' of 'StridedSlice' Op has type float32 that does not match type int32 of argument 'begin'.
how fix this?
hi, I want to know why when the get the train data, their are two generator.
def train_generator_func():
while True:
X = train_generator1.next()
print X.shape
Y1 = train_generator2.next()
yield X, [Y1, np.zeros(shape=(Y1.shape[0], img_rows - 4, img_cols - 4)),
np.zeros(shape=(Y1.shape[0], img_rows - 4, img_cols - 4))]
please, can I discard the Y1 ?
and just use the X? thank you very much.
Great work! I am trying testing and learning from your work.
It seems the origin go-through script missed the definition of "im_left".
I try to add the one-liner before the scripts need it and it seems to work:
im_left = stereo_im[:, np.r_[0, 0:img_cols-1],:]
FYI.
Hi Louis,
Thanks for the great repository. It's very exciting work.
I've been trying for a few days to reproduce your results using this code and the provided sample images. I was assuming I could take your sample images and "overfit" the network to these to at least see some results. Unfortunately I can't seem to get the network to produce good quality left->right and right->left reconstructions, and the disparity map looks quite incorrect. My intuition says I should only need a large corpus of training data if I want to produce a generalised model, and that a small training set should at least be able to perform well when validated against itself. Would you agree with this assumption?
I don't expect you to spend your time on helping me get it working, but I wondered if you might release your pretrained weights so I can repeat your results with the sample images?
Thanks in advance!
Chris
2 depthmaps = []
3 for i in tqdm(range(1)):
----> 4 dat = data_generator.next()
5
6 disparity_map_left, disparity_map_right = disp_maps_forward.predict(dat[0][0:10])
After going through https://stackoverflow.com/questions/1073396/is-generator-next-visible-in-python-3-0 , I found that on python 3 you need to use data_generator.next() or next(data_generator).
Note: I had to change this in the walk_through.ipynb file and the data_loader.py file as well
But even after this I get a Type Error:
TypeError: 'float' object cannot be interpreted as an integer
TypeError Traceback (most recent call last)
in ()
2 depthmaps = []
3 for i in tqdm(range(1)):
----> 4 dat = data_generator.next()
5
6 disparity_map_left, disparity_map_right = disp_maps_forward.predict(dat[0][0:10])
~/PycharmProjects/tensorplay/venv/w-net-master/data_loader.py in train_generator_func()
50 def train_generator_func():
51 while True:
---> 52 X = train_generator1.next(self)
53 Y1 = train_generator2.next(self)
54 yield X, [Y1, np.zeros(shape=(Y1.shape[0], img_rows - 4, img_cols - 4)),
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in next(self)
1817 # The transformation of images is not under thread lock
1818 # so it can be done in parallel
-> 1819 return self._get_batches_of_transformed_samples(index_array)
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in _get_batches_of_transformed_samples(self, index_array)
1763 batch_x = np.zeros(
1764 (len(index_array),) + self.image_shape,
-> 1765 dtype=backend.floatx())
1766 # build batch of image data
1767 for i, j in enumerate(index_array):
I am unable to fix this. Please help..
@LouisFoucard - this looks fantastic. I've run through your notebook and am pleased by the results so far.
Can you please add a "LICENSE" file to the top-level directory of the repo?
Ideally, you would choose Apache-2.0, MIT, or BSD, but choosing one is important to enable others to use your open source repo.
Thank you!
Edit: Resolved.
In this work, you've hardcorded the expected disparity levels to +- 16. Is there anything stopping us from increasing those to a larger number, like +-128? There are other datasets that I'd like to test on that have these levels of disparity. What would need to change in the code to enable larger disparity searches?
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.