How venkataraamvg/h2s-dosimeter works
This prototype estimates a Cu-PAN strip’s reaction stage from an image and displays a provisional H₂S value; it is explicitly not a validated safety detector. The main workflow validates an uploaded image, extracts color features, matches Array 2’s CIELAB values to reference stages, then maps the selected stage to a provisional exposure result. The repository also has a Flask/API and browser-based analysis path, plus reference-dataset creation. The HTML template, configuration, and reference-data source were not sampled, so their detailed wiring is limited to what the tree and sampled callers support.
Main entry points: server.py Flask Web API · app.py Streamlit Dashboard · h2s_dataset.csv Feature Dataset · build_dataset.py Reference Builder
Components 15
User Interfaces
- Streamlit Dashboard
app.py - Flask Web API
server.py - Browser UI
templates/index.html - Client CV
static/cv.js
Image Analysis
- Image Validation
src/preprocessing.py - ROI Features
src/feature_extraction.py - Stage Matching
src/color_matching.py
Reference Data
- Reference Builder
build_dataset.py - Stage Crops
data/cropped - Feature Dataset
data/processed/h2s_dataset.csv - Browser References
static/reference_data.js
Stage Results
- Provisional Mapping
src/config.py - Exposure Display
Other components
- Image Uploader
- Sample Image Source
data/cropped
Connections 20
- Image Uploader → Streamlit Dashboard: uploads image
- Streamlit Dashboard → Image Validation: validates image
- Streamlit Dashboard → ROI Features: extracts features
- Streamlit Dashboard → Stage Matching: matches stage
- Streamlit Dashboard → Feature Dataset: loads references
- Streamlit Dashboard → Provisional Mapping: looks up value
- Streamlit Dashboard → Exposure Display: displays result
- Image Uploader → Browser UI: uses browser
- Browser UI → Client CV: runs analysis
- Client CV → Browser References: reads stages
- Image Uploader → Flask Web API: posts image
- Flask Web API → Image Validation: validates image
- Flask Web API → ROI Features: extracts features
- Flask Web API → Stage Matching: matches stage
- Flask Web API → Feature Dataset: loads references
- Flask Web API → Provisional Mapping: looks up value
- Flask Web API → Exposure Display: returns result
- Reference Builder → Stage Crops: writes crops
- Reference Builder → Feature Dataset: writes features
- Flask Web API → Sample Image Source: reads sample