Giter Club home page Giter Club logo

displacement_field's People

Contributors

dulucas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

displacement_field's Issues

How to test trained models?

Hello, want now to test a different group of images.How can I do that ? Should I rewrite the code ?Thanks

Demo code

Hi, I write a demo code to do a test. The model is trained using the code in this repo. However, I find the visulization of the result is not as good as imagined. I was wondering if I did something wrong. Here are the demo code and testing images.

Code:

import numpy as np
import torch
import cv2
import matplotlib.pyplot as plt

from df import Displacement_Field


device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model = Displacement_Field()
pth_path = 'xxx/Displacement_Field/log/nyu/df_nyu_rgb_guidance/snapshot/epoch-19.pth'
model.load_state_dict(torch.load(pth_path)['model'])
model.to(device)
model.eval()

image = cv2.imread('./image.png', cv2.IMREAD_GRAYSCALE)
depth = cv2.imread('./depth.png', cv2.IMREAD_GRAYSCALE)

image = torch.from_numpy(image.astype(np.float32) / 255.0).unsqueeze(0).unsqueeze(0).to(device)
depth = torch.from_numpy(depth.astype(np.float32) / 255.0).unsqueeze(0).unsqueeze(0).to(device)
depth = (depth - depth.min()) / (depth.max() - depth.min())

pred = model(image, depth)

pred = pred.detach().cpu().numpy()[0, 0]
plt.imsave('./result.png', pred, cmap='gray')

Image:
image

Depth:
depth

Result:
result

download.sh does not work

Thanks for your work.
I faced some problem when executing "download.sh". Terminal reports:
"Connecting to horatio.cs.nyu.edu (horatio.cs.nyu.edu)|216.165.22.17|:80... failed: Connection refused".

Model Problem

Hi, in your paper, is the refinement model trained on different depth estimation methods separately, or done in the same way with this repo?

About the batch size

why is batch size set to 1? I tried a bigger value than 1, and the output is very strange.

How to test this model?

Thanks for your work.
I have trained the model, is there any testing code? for example, How can I test my trained model on the NYUv2OC++ dataset ?

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.