How ahmedesammohmaed/pretrained_model works
This is a Streamlit architectural floor-plan analyzer that turns an uploaded PDF or image into a segmented overlay and a structural JSON hierarchy with estimated wall thickness, material, and RF loss. The main path is upload and image conversion, model inference and geometry analysis, then display/download. The RF classification helper is a useful internal layer. pretrain_model.py also contains a Colab-style upload and analysis workflow. The excerpts show these behaviors, but not a separate trained-model implementation; model loading references a Hugging Face model.
Main entry points: app.py Mask2Former inference · pretrain_model.py Colab analysis workflow
Components 9
User interface
- Upload and controls
app.py - Image conversion
app.py
Floor-plan analysis
- Mask2Former inference
app.py - Geometry extraction
app.py - RF classification
app.py - Colab analysis workflow
pretrain_model.py
Analysis results
- Overlay and hierarchy
app.py
Other components
- Floor-plan user
- Hugging Face model
Connections 10
- Floor-plan user → Upload and controls: uploads plan
app.py - Upload and controls → Image conversion: passes file
app.py - Image conversion → Mask2Former inference: passes image
app.py - Mask2Former inference → Hugging Face model: loads weights
app.py - Mask2Former inference → Geometry extraction: provides segments
app.py - Geometry extraction → RF classification: classifies walls
app.py - Geometry extraction → Overlay and hierarchy: builds hierarchy
app.py - RF classification → Overlay and hierarchy: adds RF properties
app.py - Overlay and hierarchy → Upload and controls: returns for display
app.py - Floor-plan user → Colab analysis workflow: uploads plan
pretrain_model.py