FloorplanTransformation
FloorplanTransformation copied to clipboard
how to make prediction on a floorplan image with pytorch version
Hi chenliu ,how to make prediction on a floorplan image with PyTorch version???
@art-programmer Thanks for converting the code to pytorch
, super useful.
- Could you please document how to predict using a trained model on new floor plan image.
- Also, do you have a trained
pytorch
model that we could download and use?
@manneshiva how did you run "pip install -r requirements.txt". I got this error message:
Could not find a version that satisfies the requirement torch==1.0.0 (from -r requirements.txt (line 6)) (from versions: 0.1.2, 0.1.2.post1)
No matching distribution found for torch==1.0.0 (from -r requirements.txt (line 6))
@manneshiva how did you run "pip install -r requirements.txt". I got this error message:
Could not find a version that satisfies the requirement torch==1.0.0 (from -r requirements.txt (line 6)) (from versions: 0.1.2, 0.1.2.post1) No matching distribution found for torch==1.0.0 (from -r requirements.txt (line 6))
I am not sure the reason. Maybe you need to follow the official installation instruction on the pytorch website then.
Sorry for the late response. I didn't have time to fully train and evaluate the model with the PyTorch code. I will work on the prediction code once I have time, but for now you may want to refer to the testOneEpoch function under train.py. You only need to change the data loading part in that function for inference.
@chenliu-wustl Hi! Can you tell me what changes I have to do in testOneEpoch in PyTorch code for prediction?
@riti1302 I think I could run this prediction. You need to add try except in the source code below because by default, this code tries to load annotation data. Then make train.txt and test.txt in FloorplanTransformation/data directory. In test.txt, you can write the file that you want to make prediction, a prediction will be saved in pytorch/floorplan/test directory. Make sure you have downloaded the weights in pytorch/floorplan/checkpoint.pth https://github.com/art-programmer/FloorplanTransformation/blob/929e7a309e300fbf1d8c77fb2277e5744cdca43e/pytorch/datasets/floorplan_dataset.py#L284-L301