Spaces:
Sleeping
Sleeping
metadata
title: 2D Floorplan Vectorizer
emoji: ποΈ
colorFrom: blue
colorTo: green
sdk: docker
app_file: Dockerfile
pinned: false
2D Floorplan Vectorizer
A Streamlit 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.
How to Run the App
Clone the repository:
git clone <this-repo-link> cd inovonics-ui-vectorizerInstall the required Python packages:
pip install -r requirements.txtDownload the pretrained model:
Download
model_final.pthfrom Google Drive here.Place it inside:
inovonics-ui-vectorizer/rcnn_model/output/model_final.pth
Run the app:
streamlit run app.pyOpen your browser at http://localhost:8501 to start using the app!
Project Structure
inovonics-ui-vectorizer/
βββ app.py # Streamlit frontend app
βββ public/
β βββ logo.png # App logo
βββ rcnn_model/
β βββ extraction/ # Extract information from uploaded png image
β β βββ annotation_builder.py
β β βββ floorplan_sampler.py
β β βββ from_labelme_runner.py
β β βββ svg_to_json.py
β βββ output/ # Empty folder while cloning. Place the pth file here
β βββ preprocessing/ # Preprocess the image before sending to model
β β βββ cleaning_images.py
β β βββ cleaning_single_image.py
β β βββ splitting_dataset.py
β β βββ svg_to_yolo.py
β βββ results/ # Empty folder while cloning. The resulting image and JSON will be stored here
β βββ sample/ # Sample images for the model
β βββ scripts/ # Model training, evaluation and inference. Streamlit runs the rcnn_run.py file from the frontend
β β βββ rcnn_config.py
β β βββ rcnn_eval.py
β β βββ rcnn_full_tuner.py
β β βββ rcnn_run.py
β β βββ rcnn_train.py
β βββ uploads/ # Temporary folder for streamlit to store the user uploaded image
β βββ utils/ # Utility functions during model train and preprocessing
β β βββ coco_to_inovonics_json.py
β β βββ floorplan_vectorizer_utils.py
β β βββ inovonics_ann_builder.py
βββ README.md # (this file)
βββ requirements.txt # Python dependencies
βββ .gitignore # Files to ignore during Git commits