Spaces:
Sleeping
Sleeping
|
Download README.md from npisb/PIPECOUNTv2: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/spaces/npisb/PIPECOUNTv2/resolve/main/README.md
- Command line
-
hf download hf://spaces/npisb/PIPECOUNTv2/README.md
-
curl -L -o README.md https://huggingface.co/spaces/npisb/PIPECOUNTv2/resolve/main/README.md
2.17 kB
A newer version of the Gradio SDK is available: 6.32.0
metadata
title: PIPECOUNTv2
emoji: π―
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 5.47.2
app_file: app.py
pinned: false
license: mit
PVC Pipe Counter
PVC pipe counting web application powered by a custom Ultralytics ONNX model. The interface mirrors the CountThings workflow with guided settings, annotated visual QA, and export-friendly results, ready for deployment on Hugging Face Spaces.
Key Features
- π§ ONNX-powered detection β wraps
model/best.onnxwith ONNX Runtime for fast CPU inference. - π― CountThings-inspired UX β upload, tune thresholds, and view highlighted detections with running totals.
- π Structured output β per-pipe coordinate table for downstream auditing or exporting.
- βοΈ Space-ready β Gradio front end with requirements and configuration for automatic builds.
Project Structure
.
βββ app.py # Gradio Blocks UI and event wiring
βββ pipe_counter/ # Inference helpers
β βββ __init__.py
β βββ inference.py # Letterbox preprocessing, ONNX Runtime session, post-processing
βββ model/
β βββ best.onnx # Trained Ultralytics YOLO model (single PVC class)
βββ requirements.txt # Runtime dependencies for Spaces / local use
βββ huggingface.yaml # Hugging Face Space metadata (Gradio SDK)
βββ README.md
Local Development
- Create and activate a Python 3.10 environment.
- Install dependencies:
pip install -r requirements.txt - Run the app locally:
Gradio launches a local server and prints the URL for testing.python app.py
Deployment Notes
- Upload or push all repository contents (including
model/best.onnx) to the Space;.gitattributesis already configured for Git LFS so large models sync correctly. - The ONNX metadata indicates Ultralytics YOLO v8 (
stride=32,imgsz=640). Adjust the confidence/IoU sliders in the UI to suit different camera angles or lighting conditions. - For markedly different bundle layouts, fine-tune the model and replace
model/best.onnxwith the new weights.