# π StreetSignSense Web Demo
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[](https://www.tensorflow.org/js)
[](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5)
[](https://developer.mozilla.org/en-US/docs/Web/CSS)
[](https://onnx.ai/)
[](https://github.com/AlessandroFerrante/StreetSignSense/deployments)
[](LICENSE)
[](https://github.com/AlessandroFerrante/StreetSignSense/)
[](https://github.com/AlessandroFerrante/StreetSignSense)
### Real-Time Client-Side Inference with TensorFlow.js
### π Live Demo Available
#### [π Click here to try StreetSignSense directly in your browser](https://www.google.com/search?q=https://alessandroferrante.github.io/StreetSignSense "null")
*(No installation required)*

π Overview
This directory contains the core assets and logic for the StreetSignSense Web Demo.
The application runs entirely in the browser using TensorFlow.js, leveraging the clientβs GPU (via WebGL) to perform real-time object detection without sending data to a backend server.
β¨ Key Features
- Real-Time Detection: Inference on webcam video streams.
- Image Analysis: Drag-and-drop static image detection.
- Privacy First: No data leaves the userβs device.
- Adjustable Thresholds: Dynamic control over Confidence and IoU (NMS) thresholds.
π Directory Structure
demo/
βββ assets/
βββ css/ # Stylesheets for the UI
βββ js/ # Core application logic
β βββ index.js # Main script (Model loading, Pre/Post-processing, NMS)
βββ models/ # Converted YOLO12 models (TF.js format)
βββ images/ # Sample images for testing
π§ Model Conversion (PyTorch β TF.js)
The models located in assets/models/ are not the original PyTorch weights (.pt). They have been exported to ONNX and then converted to the TensorFlow.js Graph Model format (model.json + binary shards).
This conversion ensures the models are optimized for browser execution.
| Variant |
Path |
Description |
| Nano |
assets/models/yolov12n_web_model/ |
Fastest, lowest latency. |
| Small |
assets/models/yolov12s_web_model/ |
Balanced performance. |
| Medium |
assets/models/yolov12m_web_model/ |
Higher accuracy, requires more GPU resources. |
Note: For original .pt models see here
π How to Run Locally
Due to browser security restrictions (CORS - Cross-Origin Resource Sharing), you cannot simply double-click index.html to run this demo. It must be served via a local HTTP server.
βοΈ Technical Details
- Input Resolution: Models are typically exported at
640x640. The JS logic handles aspect-ratio preserving resizing (letterboxing).
- Post-Processing: The raw output from the model is decoded in
main.js, applying Non-Maximum Suppression (NMS) to remove duplicate bounding boxes.
π¨βπ» Author
Alessandro Ferrante
Email: github@alessandroferrante.net