Create README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,34 @@
|
|
| 1 |
---
|
| 2 |
-
title: Construction Detection
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
-
|
| 8 |
-
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Construction Detection API
|
| 3 |
+
emoji: 🏗️
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: true
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Construction Detection API
|
| 12 |
+
|
| 13 |
+
Detects construction elements (beam, column, door, floor, stairs, wall, window) and measures their dimensions.
|
| 14 |
+
|
| 15 |
+
## API Endpoints
|
| 16 |
+
|
| 17 |
+
| Endpoint | Method | Description |
|
| 18 |
+
|---|---|---|
|
| 19 |
+
| `/` | GET | API info |
|
| 20 |
+
| `/health` | GET | Health check |
|
| 21 |
+
| `/detect` | POST | Upload image → get detections |
|
| 22 |
+
| `/calibrate` | POST | Set reference for real-world units |
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
import requests
|
| 28 |
+
|
| 29 |
+
r = requests.post(
|
| 30 |
+
"https://dipangshuborah-construction-detection-api.hf.space/detect",
|
| 31 |
+
files={"file": open("image.jpg", "rb")}
|
| 32 |
+
)
|
| 33 |
+
print(r.json())
|
| 34 |
+
```
|