Giter VIP home page Giter VIP logo

Comments (3)

aqeelanwar avatar aqeelanwar commented on July 29, 2024 2

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.

aqeelanwar avatar aqeelanwar commented on July 29, 2024

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.

wolhandlerdeb avatar wolhandlerdeb commented on July 29, 2024

Hi,
can yo send me your changes to be able to accept a video as input
Thanks

from monodepth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.