Spaces:
Running
Running
Dharini Baskaran
commited on
Commit
Β·
84736b7
1
Parent(s):
0872418
updated readme
Browse files
README.md
CHANGED
|
@@ -10,11 +10,11 @@ pinned: false
|
|
| 10 |
|
| 11 |
# 2D Floorplan Vectorizer
|
| 12 |
|
| 13 |
-
A
|
| 14 |
|
| 15 |
---
|
| 16 |
|
| 17 |
-
## How to Run the App
|
| 18 |
|
| 19 |
1. **Clone the repository:**
|
| 20 |
|
|
@@ -35,24 +35,26 @@ A Streamlit web app that allows you to upload 2D floorplan images and automatica
|
|
| 35 |
- Place it inside:
|
| 36 |
|
| 37 |
```plaintext
|
| 38 |
-
|
| 39 |
```
|
| 40 |
|
| 41 |
4. **Run the app:**
|
| 42 |
|
| 43 |
```bash
|
| 44 |
-
|
| 45 |
```
|
|
|
|
| 46 |
|
| 47 |
-
5. Open your browser at [http://localhost:
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
## Project Structure
|
| 52 |
|
|
|
|
| 53 |
```plaintext
|
| 54 |
-
|
| 55 |
-
βββ app.py #
|
| 56 |
βββ public/
|
| 57 |
β βββ logo.png # App logo
|
| 58 |
βββ rcnn_model/
|
|
@@ -83,3 +85,10 @@ inovonics-ui-vectorizer/
|
|
| 83 |
βββ README.md # (this file)
|
| 84 |
βββ requirements.txt # Python dependencies
|
| 85 |
βββ .gitignore # Files to ignore during Git commits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# 2D Floorplan Vectorizer
|
| 12 |
|
| 13 |
+
A Gradio web app that allows you to upload 2D floorplan images and automatically vectorize them into COCO-style annotations using a trained Mask R-CNN model. The app runs inside a Docker container and is deployed on HuggingFace Spaces for easy public access. It detects and annotates key elements like rooms, walls, doors, and windows.
|
| 14 |
|
| 15 |
---
|
| 16 |
|
| 17 |
+
## How to Run the App in Local
|
| 18 |
|
| 19 |
1. **Clone the repository:**
|
| 20 |
|
|
|
|
| 35 |
- Place it inside:
|
| 36 |
|
| 37 |
```plaintext
|
| 38 |
+
floorplan-vectorizer/rcnn_model/output/model_final.pth
|
| 39 |
```
|
| 40 |
|
| 41 |
4. **Run the app:**
|
| 42 |
|
| 43 |
```bash
|
| 44 |
+
python app.py
|
| 45 |
```
|
| 46 |
+
- This is the instruction for running the model in local, this will open up the app in localhost.
|
| 47 |
|
| 48 |
+
5. Open your browser at [http://localhost:xxxx](http://localhost:xxxx) to start using the app!
|
| 49 |
|
| 50 |
---
|
| 51 |
|
| 52 |
## Project Structure
|
| 53 |
|
| 54 |
+
---
|
| 55 |
```plaintext
|
| 56 |
+
floorplan-vectorizer/
|
| 57 |
+
βββ app.py # Gradio frontend app
|
| 58 |
βββ public/
|
| 59 |
β βββ logo.png # App logo
|
| 60 |
βββ rcnn_model/
|
|
|
|
| 85 |
βββ README.md # (this file)
|
| 86 |
βββ requirements.txt # Python dependencies
|
| 87 |
βββ .gitignore # Files to ignore during Git commits
|
| 88 |
+
```
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
## Huggingface Model
|
| 92 |
+
|
| 93 |
+
The model is currently running in this [HuggingFace Space](https://huggingface.co/spaces/Dharini27/floorplan-vectorizer)
|
| 94 |
+
Upload the floorplan image and click on "Run Vectorizer" button, once the model prediction is completed, the floorplan image with detected rooms and the corresponding json will be displayed and ready for download too.
|
app.py
CHANGED
|
@@ -90,7 +90,7 @@ with gr.Blocks() as demo:
|
|
| 90 |
with gr.Column():
|
| 91 |
uploaded_file = gr.File(label="Upload your Floorplan Image", type="filepath")
|
| 92 |
uploaded_image_display = gr.Image(label="Uploaded Image", visible=True)
|
| 93 |
-
run_button = gr.Button("Run Vectorizer
|
| 94 |
|
| 95 |
with gr.Column():
|
| 96 |
output_image = gr.Image(label="Output Vectorized Image")
|
|
|
|
| 90 |
with gr.Column():
|
| 91 |
uploaded_file = gr.File(label="Upload your Floorplan Image", type="filepath")
|
| 92 |
uploaded_image_display = gr.Image(label="Uploaded Image", visible=True)
|
| 93 |
+
run_button = gr.Button("Run Vectorizer")
|
| 94 |
|
| 95 |
with gr.Column():
|
| 96 |
output_image = gr.Image(label="Output Vectorized Image")
|