veteroner commited on
Commit
f2d14f2
Β·
verified Β·
1 Parent(s): 25c4fd5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +71 -14
README.md CHANGED
@@ -11,25 +11,30 @@ app_port: 7860
11
 
12
  # Teknova AI Animal Tracking πŸ„
13
 
14
- AI-powered animal detection and re-identification system.
15
 
16
- ## Features
17
- - πŸ” Real-time animal detection (YOLOv8)
18
- - πŸ†” Automatic individual identification (Re-ID)
19
- - πŸ“Š Animal gallery management
20
- - πŸ‘ Supports: Cow, Sheep, Horse, Dog, Cat, Bird, etc.
 
 
21
 
22
- ## API Endpoints
23
 
24
  | Endpoint | Method | Description |
25
  |----------|--------|-------------|
 
26
  | `/health` | GET | Health check |
27
- | `/api/v1/detection/process-frame` | POST | Process image (multipart/form-data) |
28
- | `/api/v1/detection/gallery` | GET | Get all registered animals |
29
- | `/api/v1/detection/reset` | POST | Reset gallery |
 
30
 
31
- ## Usage
32
 
 
33
  ```python
34
  import requests
35
 
@@ -43,8 +48,60 @@ with open("cow.jpg", "rb") as f:
43
  result = response.json()
44
  print(f"Detected {result['animal_count']} animals")
45
  for animal in result['animals']:
46
- print(f" - {animal['animal_id']}: {animal['class_name']}")
47
  ```
48
 
49
- ## Developed by
50
- **Teknova** - AI Solutions for Agriculture
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  # Teknova AI Animal Tracking πŸ„
13
 
14
+ AI-powered animal detection, tracking and re-identification system for smart farming.
15
 
16
+ ## 🌟 Features
17
+ - πŸ” **Real-time Detection**: YOLOv8-based animal detection
18
+ - πŸ†” **Re-Identification**: Automatic individual animal recognition
19
+ - πŸ“Š **Gallery Management**: Track and manage animal database
20
+ - πŸƒ **Behavior Analysis**: Activity and movement tracking
21
+ - πŸ₯ **Health Monitoring**: Health status indicators
22
+ - πŸ‘ **Multi-species Support**: Cow, Sheep, Horse, Dog, Cat, Bird, etc.
23
 
24
+ ## πŸ“‘ API Endpoints
25
 
26
  | Endpoint | Method | Description |
27
  |----------|--------|-------------|
28
+ | `/` | GET | API documentation |
29
  | `/health` | GET | Health check |
30
+ | `/api/v1/detection/process-frame` | POST | Process image for detection |
31
+ | `/api/v1/detection/gallery` | GET | Get registered animals |
32
+ | `/api/v1/detection/reset` | POST | Reset animal gallery |
33
+ | `/api/v1/detection/stats` | GET | Get detection statistics |
34
 
35
+ ## πŸš€ Quick Start
36
 
37
+ ### Python Example
38
  ```python
39
  import requests
40
 
 
48
  result = response.json()
49
  print(f"Detected {result['animal_count']} animals")
50
  for animal in result['animals']:
51
+ print(f" - {animal['animal_id']}: {animal['class_name']} ({animal['confidence']:.2%})")
52
  ```
53
 
54
+ ### JavaScript Example
55
+ ```javascript
56
+ const formData = new FormData();
57
+ formData.append('file', imageFile);
58
+
59
+ const response = await fetch('https://your-space.hf.space/api/v1/detection/process-frame', {
60
+ method: 'POST',
61
+ body: formData
62
+ });
63
+
64
+ const result = await response.json();
65
+ console.log(`Detected ${result.animal_count} animals`);
66
+ ```
67
+
68
+ ## πŸ”§ Configuration
69
+
70
+ | Parameter | Default | Description |
71
+ |-----------|---------|-------------|
72
+ | `CONFIDENCE_THRESHOLD` | 0.4 | Minimum detection confidence |
73
+ | `SIMILARITY_THRESHOLD` | 0.92 | Re-ID similarity threshold |
74
+ | `MAX_GALLERY_SIZE` | 500 | Maximum animals in gallery |
75
+
76
+ ## πŸ“¦ Deployment
77
+
78
+ ### HuggingFace Spaces
79
+ 1. Fork this repository
80
+ 2. Create a new Space with Docker SDK
81
+ 3. Upload the `huggingface/` directory
82
+ 4. Wait for build to complete
83
+
84
+ ### Local Docker
85
+ ```bash
86
+ cd huggingface
87
+ docker build -t animal-tracking .
88
+ docker run -p 7860:7860 animal-tracking
89
+ ```
90
+
91
+ ## πŸ”— Related Projects
92
+ - **Frontend**: Next.js dashboard for visualization
93
+ - **Backend**: FastAPI server with full API
94
+ - **Mobile**: React Native mobile app
95
+
96
+ ## πŸ“Š Performance
97
+ - Detection: ~15 FPS on CPU, ~30+ FPS on GPU
98
+ - Re-ID Accuracy: >85%
99
+ - Supported formats: JPG, PNG, BMP, WebP
100
+
101
+ ## 🏷️ License
102
+ MIT License - See LICENSE file
103
+
104
+ ## πŸ‘¨β€πŸ’» Developed by
105
+ **Teknova** - AI Solutions for Smart Farming
106
+
107
+ 🌐 [GitHub](https://github.com/veteroner/ai-animal-tracking) | πŸ“§ Contact: teknova@example.com