Coder Social home page Coder Social logo

pytorch-layoutnet's People

Contributors

galavineri avatar sunset1995 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorch-layoutnet's Issues

Unable to replicate Layout 3D Viewer results; misaligned axes

I have followed the exact steps as mentioned in the readme to visualize the layout for the demo image in the 3D Viewer.

The boundary maps and corner maps outputted by the model are precise as seen below.
demo_aligned_rgb_all

However, there is an issue of misaligned axes and hence the output looks something like this.
image

Following is the exact command used for 3D visualization.
python3 visual_3d_layout.py --ignore_ceiling --img assert/demo.png --layout assert/output/demo_aligned_rgb_cor_id.txt

How to downsize the model

My current laptop has a 4 GB graphics card due to which I am unable to train the model on it. Can you please tell me how should I go about making the changes in order to run it on my machine. Thank you!

Strange usage of learning rate

Hi

Thank you for the implementation. It's very helpful.

I was wondering why do you start with very low learning rate (1e-6 at warmup) and then change to 0.018 later.

Isn't that supposed to be other way around? Starting with high learning-rate and then lowering it?

any solution for the error

python torch2pytorch_data.py 
Traceback (most recent call last):
  File "torch2pytorch_data.py", line 83, in <module>
    cvt2png(os.path.join(DATA_DIR, 'train'), train_pats, train_pano_map)
  File "torch2pytorch_data.py", line 37, in cvt2png
    assert os.path.isfile(th_path), '%s not found !!!' % th_path
AssertionError: /home/anish/Downloads/dataset/halfc/layout/pytorch-layoutnet/data/origin/data/panoContext_img_train.t7 not found !!!

some question about torch2pytorch_data.py

I can't read any data use ' imgs = torchfile.load(th_path)' , and when I use 'imgs = load_lua(th_path).numpy()',raise warning:ModuleNotFoundError: No module named 'torch.utils.serialization'。 find serialization is not exist

perspective version of panoEdgeDetection

Hi @sunset1995 , I know you are not planning to add support for perspective images for this repo. But do you by any chance know how one should write the perspective image version of function panoEdgeDetection?

Thank you!

How to annotate panorama

Hello
First, thanks for your sharing .
We want to use new indoor panorama samples for training, but how to annotate panorama as shown in the appendix becomes a trouble for us. Could you share the method or some tools to do the work?
Thank you!
camera_0bc03a051e9d4bed8e9191e263142f17_office_9_frame_equirectangular_domain_
camera_0bc03a051e9d4bed8e9191e263142f17_office_9_frame_equirectangular_domain_

How to find coordinates of a point after alignment?

I have some features that I extract from the original panorama. I want to calculate the coordinates of those feature points after alignment is done in the preprocessing step. Could you please advise. I did not find a function anywhere.

how many GB RAM Is required for this???? i am getting this error

panoContext_img_train.t7      : 414 examples
Traceback (most recent call last):
  File "torch2pytorch_data.py", line 83, in <module>
    cvt2png(os.path.join(DATA_DIR, 'train'), train_pats, train_pano_map)
  File "torch2pytorch_data.py", line 65, in cvt2png
    imgs = load_lua(th_path).numpy()
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 608, in load_lua
    return reader.read()
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 593, in read
    return self.read_object()
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 523, in wrapper
    result = fn(self, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 546, in read_object
    return reader_registry[cls_name](self, version)
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 147, in read_tensor
    storage = reader.read()
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 593, in read
    return self.read_object()
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 523, in wrapper
    result = fn(self, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 546, in read_object
    return reader_registry[cls_name](self, version)
  File "/opt/anaconda3/lib/python3.6/site-packages/torch/utils/serialization/read_lua_file.py", line 166, in read_storage
    return python_class.from_buffer(reader.f.read(size), 'native')
RuntimeError: $ Torch: not enough memory: you tried to allocate 4GB. Buy new RAM! at /pytorch/aten/src/TH/THGeneral.cpp:204

Guidelines for capturing the panoromic images

I wanted to try experimenting with the models with my own panoramic images, however, I had some doubts regarding how to go about capturing these images.

Would a phone camera(I am using iPhone) be appropriate for capturing the images or is some special camera required?
I have noticed that the images taken on the phone are not of the same aspect ratio.
Moreover, it is difficult to capture the whole height of the room from floor to ceiling.
Lastly, the images shot cannot cover the entire perimeter of the room.

Here, is an example image. Resolution: 11612x3628 and hence, the aspect ratio is also completely different than 2:1 used by the model.
img_2330

Add torchfile to the dependencies

Hello :)
I've just started trying to use your repository.
I've done the following steps:

  1. I've built the directory tree as you guided.
  2. I've ran python torch2pytorch_data.py successfully
  3. I've ran python torch2pytorch_pretrained_weight.py --torch_pretrained ckpt/panofull_joint_box_pretrained.t7 --encoder ckpt/pre_full_encoder.pth --edg_decoder ckpt/pre_full_edg_decoder.pth --cor_decoder ckpt/pre_full_cor_decoder.pth
    which in turn resulted in the following error:
    Traceback (most recent call last):
    File "torch2pytorch_pretrained_weight.py", line 2, in
    import torchfile
    ImportError: No module named 'torchfile'

And the solution was to install torchfile :)

Error in running visualization validation

I've done the following steps:

  1. Built the directory tree as you instructed
  2. ran python torch2pytorch_data.py annd python torch2pytorch_pretrained_weight.py with their instructed parameters
    But when i run 'python visual.py --flip --rotate 0.25 0.5 0.75 --img_glob "data/test/img/pano_aaccxxpwmsdgvj.png" --line_glob "data/test/line/pano_aaccxxpwmsdgvj.png" --output_dir assert/'
    I get the following error

Traceback (most recent call last):
File ".../LayoutNet/visual.py", line 55, in
encoder.load_state_dict(torch.load('%s_encoder.pth' % args.path_prefix))
File ".../lib/python3.5/site-packages/torch/serialization.py", line 356, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'ckpt/pre_encoder.pth'

There was a problem when I run visual_ 3d_ layout.py

When it comes to Warp floor and ceiling,After creating the thread, there is no result or error. What is the reason? Is it just waiting for a long time? Line 87 of visual_ 3d_ layout.py

    with Pool(n_thread) as p:
        sel = p.map(functools.partial(pt_in_poly, xy_poly), floor_xyz[:, :2])

    return floor_texture[sel], floor_xyz[sel], ceil_texture[sel], ceil_xyz[sel]

Few questions about difference from original implementation

Hi

Thank you very much for sharing
I've read through your code (and was very impressed!) and collected several questions about difference from the original implementation.
I'm wondering whether I'm right and the differences exist, and why you have chosen to implement it this way

  1. The learning rate that you use is very different. You use ~0.018 (after warmup), while the original work uses 0.0001 (times 5, because they multiply by 5 where the mask is true, while you divide by 5 where it is false). That is a very significant factor of 36... am I missing something? Maybe something is different between torch in lua and pytorch?

  2. The original work first trains only on edges, and then trains both on edges and on corners. Why have you chosen to avoid this?

  3. You haven't implemented the gamma augmentation (But I'm quite sure that it is not very significant)

  4. You use weight decay. Why?

  5. You use learning rate decay. Why?

  6. The original work clamped the gradients at 10. You have clipped the gradients' norm (Not the individual gradients) at 3. Any reason you have chosen to change this value?

The questions obviously don't criticize your work, just trying to understand the differences and get the best of both worlds...

Thanks

Panaramic images created using Smartphone

I used One Plus smartphone to click panorama picture of room.And used it as input image and the results turned out to be so different .I used the pre-trained model of PanaStd2d-3D to check the result.

Can someone suggest me how to proceed using smartphone panorama to 3D room layout ?

Thanks in advance

torch2pytorch_data.py problem

When use torchfile to load the panoContext_img_train.t7, the result is empty。

th_path = "D:\program\pytorch-layoutnet\data\origin\data\panoContext_img_train.t7"
imgs = torchfile.load(th_path)
print(imgs.shape)
(0,)

How to annotate panorama for object detection

Hello.
Thanks for your sharing .
I read your paper “ 360-Indoor: Towards Learning Real-World Objects in 360◦ Indoor Equirectangular Images”.But how to annotate panorama as shown in the appendix becomes a trouble for us. Could you share the method or some tools to do the work?
image

The CKPT file has become invalid.

Dear author,
First of all, thank you for sharing your work. The project has been incredibly helpful for learning. However, the CKPT file has become invalid. When I click on the provided link, it shows that the file does not exist. Unfortunately, this prevents me from verifying its effectiveness at the moment. I kindly request your assistance in resolving this issue. Thank you!

The corresponding location is as follows:
Download the trained model from here (350M). Put the 3 files extracted from the downloaded zip under ckpt/ folder.

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.