Comments (3)
Never mind, I figured out the issue. The model accepts normalized test image where the pixel range is 0 to 1. Dividing the read image by 255 solved the issue.
from monodepth.
Here is what I am doing.
I have replaced the following commands
dataloader = MonodepthDataloader(args.data_path, args.filenames_file, params, args.dataset, args.mode)
left = dataloader.left_image_batch
right = dataloader.right_image_batch
with a placeholder for left and right
left = tf.placeholder(tf.float32, [2,256,512,3])
right = tf.placeholder(tf.float32, [2, 256, 512])
the model was then created based on these placeholders
model = MonodepthModel(params, args.mode, left, right)
The left placeholer was initialized with the test image as follows
image = cv2.imread("data/challenge01.jpg")
left1 = tf.image.resize_images(image, [256, 512])
leftp = tf.stack([left1, tf.image.flip_left_right(left1)])
ll=sess.run(leftp)
And finally I used feed_dict
to replace the placeholder left with an actual image as 4D tensor
disp = sess.run(model.disp_left_est[0], feed_dict={left:ll})
The code actually runs successfully but doesn't generate a valid disparity map. The output is more like edge detection. Can you please tell what am I missing?
Thank you.
from monodepth.
Hi,
can yo send me your changes to be able to accept a video as input
Thanks
from monodepth.
Related Issues (20)
- Test results not good after training on custom data HOT 6
- disparity map error HOT 1
- Training without CUDA HOT 1
- Question About Disparity Smoothness Loss
- Relative paths don't work for checkpoint_path
- Total parameters
- Can we use any camera for depth estimation ?
- About the kitti weight in kitti_archives_to_download.txt HOT 2
- Load ImageNet weights for ResNet50 HOT 2
- How to create my own dataset? HOT 2
- Non Linearity on Outputted Disparity.
- Run on windows
- How is the uncertainty measured?
- world coordinates
- testing simple.py has bad result HOT 3
- Difference between upconv and iconv
- Test - why don't you evaluate the loss function ?
- Calculating C1 and C2 error for Make3D dataset HOT 1
- How to load the pre-training model
- Is that possble to use the algorithm in Edge devices
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 monodepth.