How rayees1728/sem_boundary_detection works
This repository is a Streamlit SEM/optical micrograph segmentation app. Users upload one or more images, select classical, bootstrap-training, or checkpoint inference, tune preprocessing and boundary cleanup, then inspect comparisons, statistics, and downloadable outputs. The graph includes the documented results and download capabilities, though their implementation details are not sampled; those links are therefore omitted. Edges are limited to calls documented in the README or visible in excerpts and the SOURCE INDEX.
Main entry points: app.py Streamlit interface · predict.py CLI prediction · train.py Model training · preprocessing.py Image preprocessing
Components 14
App workflow
- Streamlit interface
app.py
Classical segmentation
- Image preprocessing
preprocessing.py - Otsu baselines
otsu_baseline.py - Watershed labels
pseudo_labels.py - Advanced boundaries
boundary_v2.py
U-Net learning
- Model training
train.py - Patch and inference data
dataset.py - U-Net model
unet_model.py - CLI prediction
predict.py
Output and evaluation
- Boundary cleanup and metrics
postprocessing.py - Results and comparison
app.py - Cross-image statistics
app.py - Mask and report downloads
app.py
Other components
- Image analyst
Connections 24
- Image analyst → Streamlit interface: uploads and configures
README.md - Streamlit interface → Image preprocessing: preprocesses images
app.py - Image preprocessing → Advanced boundaries: imports utilities
preprocessing.py - Streamlit interface → Otsu baselines: computes baselines
app.py - Otsu baselines → Image preprocessing: imports preprocessing
otsu_baseline.py - Streamlit interface → Watershed labels: generates pseudo-labels
app.py - Streamlit interface → Advanced boundaries: uses boundary methods
app.py - Streamlit interface → Model training: trains bootstrap model
app.py - Streamlit interface → Patch and inference data: runs sliding inference
app.py - Streamlit interface → U-Net model: loads model
app.py - Streamlit interface → Boundary cleanup and metrics: cleans predictions
app.py - Model training → U-Net model: constructs model
train.py - Model training → Patch and inference data: builds patch dataset
train.py - Model training → Image preprocessing: preprocesses training images
train.py - Model training → Watershed labels: creates bootstrap targets
train.py - CLI prediction → U-Net model: loads checkpoint model
predict.py - CLI prediction → Patch and inference data: runs sliding inference
predict.py - CLI prediction → Image preprocessing: preprocesses image
predict.py - CLI prediction → Otsu baselines: computes baseline
predict.py - CLI prediction → Watershed labels: creates fallback reference
predict.py - CLI prediction → Boundary cleanup and metrics: cleans and scores
predict.py - Streamlit interface → Results and comparison: presents results
README.md - Streamlit interface → Cross-image statistics: summarizes images
README.md - Streamlit interface → Mask and report downloads: offers exports
README.md