manurare / 360monodepth

Code release for 360monodepth. With our framework we achieve monocular depth estimation for high resolution 360° images based on aligning and blending perspective depth maps.
https://manurare.github.io/360monodepth/
MIT License
158 stars 32 forks source link

Increase number of images step 1 #3

Closed shreyask3107 closed 2 years ago

shreyask3107 commented 2 years ago

Hi @manurare, currently the model takes 20 images from the faces of an icosahedron. Could you recommend me ways in which I can increase the number of images (close to 100 or 200) and the code to do the same?

I am aware that project_icosahedron.py implements the required projections. More details will be super helpful. Thanks!

manurare commented 2 years ago

Hi,

You can always subdivide further the icosahedron. One way is to find the barycentric coordinates for each face, and form new smaller faces by joining every vertex of a face with the barycentric center. This will create 3 smaller faces per initial face of the icosahedron ending up with a finer subdivision with 60 faces. If you want even more, you can subdivide further or I found that the Fibonacci sphere algorithm is a good way for defining a regular grid over a sphere.

As long as the function for creating more images returns the same kind of data as get_icosahedron_parameters, there should not be any problem.

shreyask3107 commented 2 years ago

Hi @manurare , Thank You very much. I will try to implement this👍

I will keep this issue open for a couple of days if I face any issues in implementing Fibonacci Sphere algorithm.

shreyask3107 commented 2 years ago

Hi @manurare , even with the Fibonacci Sphere Algorithm, I shall only get the tangent points. How would you recommend me to generate the triangle tangent points? Than You.

manurare commented 2 years ago

Right, now you don't have a regular polygon anymore nor exact knowledge of where each vertex of the triangle falls. What I'd do is, in each tangent point sample a tangent image using gnomonic projection. You can control how big/small your tangent plane is using padding or coord_gnom_xy_range in gnomonic2pixel function.