Code Monkey home page Code Monkey logo

depthy's Introduction

About

I'm a computer vision scientist with interests in audio-visual processing, particularly depth inference, ultrasonic imaging, light fields, and computational photography.

depthy's People

Contributors

hahnec 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

Watchers

 avatar  avatar  avatar  avatar

depthy's Issues

Can't generate depth map

Hello @hahnec,

I couldn't create depth map with your program: depthy v0.3.0 installed via pip3.
When trying with the default test images, I get the following error:

load light-field images
Traceback (most recent call last):
  File "/usr/local/bin/depthy", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/depthy/bin/cli.py", line 113, in main
    lf_img_arr = load_lf_arr(filenames)
  File "/usr/local/lib/python3.7/site-packages/depthy/misc/io_functions.py", line 53, in load_lf_arr
    fnames = sorted(fnames, key=lambda x: int(re.sub("[^0-9]", "", os.path.basename(x).split(".")[0])))
  File "/usr/local/lib/python3.7/site-packages/depthy/misc/io_functions.py", line 53, in <lambda>
    fnames = sorted(fnames, key=lambda x: int(re.sub("[^0-9]", "", os.path.basename(x).split(".")[0])))
ValueError: invalid literal for int() with base 10: ''

When trying with one of my image (a .png), it stops relatively early after ~2s, I get the following:

load light-field images
compute depth from epipolar images
/usr/local/lib/python3.7/site-packages/depthy/lightfield/epi_depth.py:107: RuntimeWarning: invalid value encountered in
true_divide
  disparity = np.mean(disp_arr*reli_arr**2, axis=-1) / confidence
export depth as ply and pfm file
finished

The _epi.pfm =~ 1.3mb

And with another image (a .png), it stops after ~1min and I get:

load light-field images
compute depth from epipolar images
export depth as ply and pfm file
/usr/local/lib/python3.7/site-packages/depthy/misc/pfm_handler.py:62: RuntimeWarning: invalid value encountered in true_divide
  img_arr = (img_arr-np.min(img_arr))/(np.max(img_arr)-np.min(img_arr))
finished

_epi.pfm =~ 100mb

Tried also with a .jpg, I get:

load light-field images
Traceback (most recent call last):
  File "/usr/local/bin/depthy", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/depthy/bin/cli.py", line 113, in main
    lf_img_arr = load_lf_arr(filenames)
  File "/usr/local/lib/python3.7/site-packages/depthy/misc/io_functions.py", line 60, in load_lf_arr
    assert lf_dim % 2 == 1, 'Reshaping image list to light-field array failed due to size %s.' % len(img_list)
AssertionError: Reshaping image list to light-field array failed due to size 0.

Any idea?
It stills generate _epi.ply and _epi.pfm files, but no output image, is it normal or just because it errors out at some point?

Error in generating depth map from epi

I would like to generate depth map using my png file. But it always show error like this. Could you please help in this issue? Many thanks

(depth_map) C:\Workplace\02work>depthy -s D:\PNG\flood

depthy v0.4.0

Using epi method

Load light-field images

Traceback (most recent call last):
File "c:\users\anaconda3\envs\depth_map\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\anaconda3\envs\depth_map\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\anaconda3\envs\depth_map\Scripts\depthy.exe_main
.py", line 7, in
File "c:\users\anaconda3\envs\depth_map\lib\site-packages\depthy\bin\cli.py", line 138, in main
lf_img_arr = load_lf_arr(filenames)
File "c:\users\anaconda3\envs\depth_map\lib\site-packages\depthy\misc\io_functions.py", line 53, in load_lf_arr
fnames = sorted(fnames, key=lambda x: int(re.sub("[^0-9]", "", os.path.basename(x).split(".")[0])))
File "c:\users\anaconda3\envs\depth_map\lib\site-packages\depthy\misc\io_functions.py", line 53, in
fnames = sorted(fnames, key=lambda x: int(re.sub("[^0-9]", "", os.path.basename(x).split(".")[0])))
ValueError: invalid literal for int() with base 10: ''

depthmap to stereo pair

HI , can you give sample code ideas how to make stereo pair from depthmap in python , I have searched ,but not found that , could you please guide me .
Thanks in advanced .

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.