Coder Social home page Coder Social logo

Comments (7)

MRinel avatar MRinel commented on September 18, 2024 3

@aghasaadmohammad , the strange visualization of depth image seems to be related with normalization of input image. Use matplotlib for reading input or /255. have a try :)

from fast-depth.

dwofk avatar dwofk commented on September 18, 2024

Hi @MRinel,

The depth output by the network, when running pred = model(input), is in meters.

The colored_depthmap function simply scales the depth for visualization purposes.

from fast-depth.

MRinel avatar MRinel commented on September 18, 2024

Thank you for your explanation! @dwofk
There is another issue I don't quite understand. On TX2, when I use the example image, the prediction was really good [like the first image], but not so good using my own input [like the second image].I compared the input images' information, they have different depth bit, one is 32 bits, the other is 24 bits, does the last 8 bits representing transparency have any impact on prediction?
rgb_pred
13

from fast-depth.

dwofk avatar dwofk commented on September 18, 2024

Hi @MRinel,

If there is an alpha/transparency channel present (i.e. if your current input is in RGBA color space), that channel needs to be removed first, so that the correct R, G, and B channels can then be fed into the network.

You could try converting your input from RGBA to RGB to see if this was the issue.

from fast-depth.

MRinel avatar MRinel commented on September 18, 2024

Hi @dwofk ,
Maybe I didn't describe it clearly.
I have transformed "deploy/data/rgb.npy,pred.npy,depth.npy" to "rgb.png,pred.png,GT-depth.png" by "data/visualize.py", they are normal like what posted on fast-depth paper. But when using my current input (without alpha channel), the outputs of visualize.py seems strange. Like next pictures.
The first image is original without alpha channel, second is "visualize.py-->rgb",third is "visualize.py-->pred", I'm confused why the RGB image cannot be restored with visualize.py .Am I getting the npy file the right way?
I get the npy file this way:

  from PIL import Image
  import numpy as np
 
  im = Image.open('./data/test_0902.png')
  im = im.resize((224,224),Image.ANTIALIAS)
  im_array = np.array(im)
  np.save('./data/test_0902.npy',im_array)

test_0902
test_0902 (1)
test_0902_pred

from fast-depth.

MRinel avatar MRinel commented on September 18, 2024

I've solved the problem,thanks a lot! @dwofk

from fast-depth.

aghasaadmohammad avatar aghasaadmohammad commented on September 18, 2024

@MRinel how did u solve this issue?

from fast-depth.

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.