A lightweight web application that detects doors and windows in architectural floor plans.
This application has been built using Streamlit for the front-end and supports three YOLO variants for the prediction, namely:
- YOLOv8n
- YOLOv8s
- YOLOV8m
- Upload blueprint images in the form of either '.jpg', '.jpeg', or '.png'.
- Select from different YOLOv8 variants.
- Visual detection output along with bounding boxes.
- Output includes label, confidence scores, and bounding box coordinates.
git clone https://github.com/akshathmangudi/doors-and-windows.git
cd doors-and-windows/python -m venv <env_name>
source <env_name>/bin/activate # On Windows use 'venv\Scripts\activateconda create -n <env_name> python=3.10
conda activate <env_name>pip install -r requirements.txtstreamlit run app.pyThis app will launch in your browser at http://localhost:7860
If you're running the backend as an API:
uvicorn src.main:app --host 0.0.0.0 --port 8000 --reloadAnd view the API in http://0.0.0.0:8000/docs
To ensure the code has been maintained properly and professionally, we use pylint, black and isort for linting, formatting and import sorting respectively.
Go to the link that's present in the "About" section or click here.
POST /detect
Content-Type: multipart/form-data| Field | Type | Description |
|---|---|---|
image |
file | Floorplan image (JPG/PNG) |
model_name |
string | Model variant (e.g. yolov8n) |
{
"filename": "image.jpg",
"detections": [
{
"label": "door",
"confidence": 0.848,
"bbox": [852.94, 467.47, 975.9, 613.08]
},
{
"label": "door",
"confidence": 0.842,
"bbox": [378.89, 268.19, 504.86, 414.77]
},
],
"total_detections": 2,
"confidence_threshold": 0.5,
"image_shape": [1021, 1143, 3]
}├── app.py
├── config.yaml
├── contract.yaml
├── Dockerfile
├── __init__.py
├── LICENSE
├── model_comparison.txt
├── models
│ ├── onnx
│ │ ├── yolov8m.onnx
│ │ ├── yolov8n.onnx
│ │ └── yolov8s.onnx
│ └── pt
│ ├── yolov8m.pt
│ ├── yolov8n.pt
│ └── yolov8s.pt
├── README.md
├── requirements.txt
└── src
├── config.py
├── detection.py
├── __init__.py
├── main.py
└── utils.pySee the LICENSE file or more info.