Code Monkey home page Code Monkey logo

graph2plan's People

Contributors

hanhan55 avatar zzilch 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

graph2plan's Issues

When I ran the train.py file, I encountered a problem, I hope you can answer it. Thank you.

Create dir...
Create dataloader...
Traceback (most recent call last):
File "train.py", line 604, in
main(args)
File "train.py", line 235, in main
train_loader,valid_loader,test_loader = get_data_loaders(args)
File "train.py", line 135, in get_data_loaders
valid_dataset = get_dataset(args,'valid')
File "train.py", line 120, in get_dataset
return FloorPlanDataset(f'{args.dataset_dir}/data_{split}.mat')
File "/home/zhaoliuqing/wry/Graph2plan-master/Network/model/floorplan.py", line 211, in init
self.data = sio.loadmat(data_path, squeeze_me=True, struct_as_record=False)['data']
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/scipy/io/matlab/mio.py", line 208, in loadmat
matfile_dict = MR.get_variables(variable_names)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/scipy/io/matlab/mio5.py", line 292, in get_variables
res = self.read_var_array(hdr, process)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/scipy/io/matlab/mio5.py", line 252, in read_var_array
return self._matrix_reader.array_from_header(header, process)
File "mio5_utils.pyx", line 675, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 721, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 894, in scipy.io.matlab.mio5_utils.VarReader5.read_cells
File "mio5_utils.pyx", line 673, in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix
File "mio5_utils.pyx", line 723, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 978, in scipy.io.matlab.mio5_utils.VarReader5.read_struct
File "mio5_utils.pyx", line 673, in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix
File "mio5_utils.pyx", line 721, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 894, in scipy.io.matlab.mio5_utils.VarReader5.read_cells
File "mio5_utils.pyx", line 672, in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix
File "mio5_utils.pyx", line 617, in scipy.io.matlab.mio5_utils.VarReader5.read_header
File "mio5_utils.pyx", line 487, in scipy.io.matlab.mio5_utils.VarReader5.read_int8_string
File "mio5_utils.pyx", line 349, in scipy.io.matlab.mio5_utils.VarReader5.read_element
File "mio5_utils.pyx", line 286, in scipy.io.matlab.mio5_utils.VarReader5.cread_tag
File "streams.pyx", line 86, in scipy.io.matlab.streams.GenericStream.read_into
OSError: could not read bytes

Very complicated

The steps are not clear and very complex specially when we open the window
which file we load to use it?

`data.mat` does not exist

Problem

Hi, I was following the instructions in Graph2Plan/DataPreparation/ and noticed that it mentions 'You can also download the extracted data from here.'

However, I'm unable to access the supposed data.mat file. Could you please assist me with this issue?

Error status

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Sep 21 07:27:30 UTC 2023
There was an unexpected error (type=Not Found, status=404).
No message available

Error in GUI and Test file

Hi, I was trying to run the GUI using python manage.py runserver. I am able to load images from Interface\House\static\Data\Img\ but when I click the "Transfer" button, the programme is giving me FileNotFound error. "Generate" and "Save" button don't seem to give any output. I am not able to .mat files for any of the layouts. Could you please suggest how to remove this error? Could you also tell how to test the trained model without using the GUI? Lastly how to use "Graph" and "Layout" buttons which appear after clicking the "Transfer" button
image

problems about the interface

Internal Server Error: /index/NumSearch/
Traceback (most recent call last):
File "/home/.../anaconda3/envs/g2p_app/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/.../anaconda3/envs/g2p_app/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/.../Code/Graph2plan/Interface/Houseweb/views.py", line 148, in NumSearch
testName = data_new[0].split(".")[0]
AttributeError: 'NoneType' object has no attribute 'split'

IndexError: index 144 is out of bounds for axis 0 with size 144

Hi just got this issue in the training:

raceback (most recent call last):
File "train.py", line 604, in
main(args)
File "train.py", line 473, in main
trainer.run(train_loader,max_epochs=args.epoch)
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 446, in run
self._handle_exception(e)
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 410, in _handle_exception
raise e
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 433, in run
hours, mins, secs = self._run_once_on_dataset()
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 399, in _run_once_on_dataset
self._handle_exception(e)
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 410, in _handle_exception
raise e
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\ignite\engine\engine.py", line 387, in _run_once_on_dataset
for batch in self.state.dataloader:
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch\utils\data\dataloader.py", line 801, in next
return self._process_data(data)
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch\utils\data\dataloader.py", line 846, in _process_data
data.reraise()
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch_utils.py", line 385, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 9.
Original Traceback (most recent call last):
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\XuluY\Graph2plan-master\Network\model\floorplan.py", line 223, in getitem
return fp.get_train_data()
File "C:\Users\XuluY\Graph2plan-master\Network\model\floorplan.py", line 202, in get_train_data
boxes = self.get_boxes(tensor=tensor)
File "C:\Users\XuluY\Graph2plan-master\Network\model\floorplan.py", line 159, in get_boxes
boxes = np.apply_along_axis(norm,1,boxes)
File "<array_function internals>", line 6, in apply_along_axis
File "C:\Users\XuluY\anaconda3\envs\g2p_train\lib\site-packages\numpy\lib\shape_base.py", line 402, in apply_along_axis
buff[ind] = asanyarray(func1d(inarr_view[ind], *args, **kwargs))
File "C:\Users\XuluY\Graph2plan-master\Network\model\floorplan.py", line 158, in
norm = lambda box:np.array([X[box[1]],Y[box[0]],X[box[3]-1],Y[box[2]-1]])
IndexError: index 144 is out of bounds for axis 0 with size 144

Preprocessing for our own dataset

Hi, I read your paper. You have mentioned the preprocessing steps regarding generating graphs for each of the floorplan present in the RPlan dataset. Could you please share the code regarding it?

std::bad_alloc error

Hi, thanks for the great work @ruizhenh

I am trying to run the code on linux system. when I run

python manage.py runserver 0.0.0.0:8000

it gives the following error:

manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

I cant understand what is happening. Any help?

Thanks

What's the meaning of r in rEdge?

Hi!
I can't get the meaning of r in rEdge where 'rEdge: (u,v,r), room indices and relative position(u relative to v)'.
Meanwhile, it is not used in the floorplan.py, see 101: 'for u, v, _ in self.data.rEdge:', but I want to know the relation in rooms, so can you explain the definition of r in rEdge?
Thanks a lot.

When I ran the train.py file, I encountered a problem, I hope you can answer it. Thank you.

File "train.py", line 604, in
main(args)
File "train.py", line 473, in main
trainer.run(train_loader,max_epochs=args.epoch)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 446, in run
self._handle_exception(e)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 410, in _handle_exception
raise e
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 433, in run
hours, mins, secs = self._run_once_on_dataset()
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 399, in _run_once_on_dataset
self._handle_exception(e)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 410, in _handle_exception
raise e
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/ignite/engine/engine.py", line 387, in _run_once_on_dataset
for batch in self.state.dataloader:
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data
return self._process_data(data)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data
data.reraise()
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 3.
Original Traceback (most recent call last):
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/zhaoliuqing/wry/Graph2plan-master/Network/model/floorplan.py", line 223, in getitem
return fp.get_train_data()
File "/home/zhaoliuqing/wry/Graph2plan-master/Network/model/floorplan.py", line 202, in get_train_data
boxes = self.get_boxes(tensor=tensor)
File "/home/zhaoliuqing/wry/Graph2plan-master/Network/model/floorplan.py", line 159, in get_boxes
boxes = np.apply_along_axis(norm,1,boxes)
File "/home/zhaoliuqing/anaconda3/lib/python3.7/site-packages/numpy/lib/shape_base.py", line 380, in apply_along_axis
res = asanyarray(func1d(inarr_view[ind0], *args, **kwargs))
File "/home/zhaoliuqing/wry/Graph2plan-master/Network/model/floorplan.py", line 158, in
norm = lambda box:np.array([X[box[1]],Y[box[0]],X[box[3]-1],Y[box[2]-1]])
IndexError: index 208 is out of bounds for axis 0 with size 208

参数objs

您好,请问Model中forward里的参数objs是怎么来的,我查看了所有代码,并没有看到关于objs的定义,望解答疑惑

Matlab Engine not installing

Annotation 2020-07-02 113759

Hi! Great work btw. I have issue in installing matlab engine with python 3.7. I have attached a photo of the error. Could you please specify how were you able to install it.

Preview the saved output visualization in matlab

How to visualize the output saved in .mat format? also the doors and windows aren't visible in the output of the interface, how am I supposed to visualize these .mat format files? in the test.png we can see doors and windows clearly since they have been previewed in local inference under the postprocessing directory but these details aren't present in the output visualization.

I was assuming upon saving I might be able to get a different format image type but somehow I'm downloading a matlab file which is too cryptic for me to understand. please help.

Saved File as .mat NOT .png

I'm really fascinated by this work actually so thank you.
I'm not really familiar with mat files to be honest.
so when I try to SAVE the plan after adjusting the graph Nodes, it saves the file as .mat struct file and NOT .png
is there a way to save it as .png?
also to add doors and windows

Thank you,

Page not found (404)

Hi

Thanks for your effort on this great repo.

I get the above error when i run: python3 manage.py runserver 0.0.0.0:8000
I am using python==3.9
Here is the terminal log:
"""
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
iunie 17, 2023 - 07:01:15
Django version 4.2.2, using settings 'House.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

Not Found: /
[17/Jun/2023 07:01:32] "GET / HTTP/1.1" 404 3230
"""
Here is the web log:
Screenshot from 2023-06-17 09-56-19

What am I doing wrong? any insight?
Thanks in advance

Global Variables are not defined in views.py

Hello,
I am trying to use the Interface to generate floorplans, however, I am coming across a problem where the testNameList global variable is not defined. I have tried setting a default value and calling global testNameList inside some of the other functions but to no avail.

image

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.