sandbox338 commited on
Commit
33dd850
·
verified ·
1 Parent(s): 26ea88e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +105 -0
README.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - object-detection
5
+ - detectron2
6
+ - wildlife
7
+ - animals
8
+ - faster-rcnn
9
+ - inception
10
+ datasets:
11
+ - custom-wildlife-dataset
12
+ metrics:
13
+ - AP
14
+ - AP50
15
+ - AP75
16
+ model-index:
17
+ - name: inception-wildlife-detector-detectron2
18
+ results:
19
+ - task:
20
+ type: object-detection
21
+ name: Object Detection
22
+ dataset:
23
+ type: custom-wildlife-dataset
24
+ name: Wildlife Detection Dataset
25
+ metrics:
26
+ - type: AP
27
+ value: 45.7
28
+ name: Average Precision
29
+ - type: AP50
30
+ value: 81.8
31
+ name: AP at IoU=0.50
32
+ - type: AP75
33
+ value: 47.7
34
+ name: AP at IoU=0.75
35
+ ---
36
+
37
+ # Wildlife Detector - Detectron2
38
+
39
+ A Faster R-CNN model with optimized Inception v1 backbone for detecting 10 wildlife species.
40
+
41
+ ## Classes
42
+ - Antelope
43
+ - Buffalo
44
+ - Elephant
45
+ - Giraffe
46
+ - Gorilla
47
+ - Leopard
48
+ - Lion
49
+ - Rhino
50
+ - Wolf
51
+ - Zebra
52
+
53
+ ## Performance
54
+
55
+ | Metric | Value |
56
+ |--------|--------|
57
+ | AP | 45.7% |
58
+ | AP50 | 81.8% |
59
+ | AP75 | 47.7% |
60
+
61
+ ### Per-Class Performance (AP)
62
+ | Animal | AP | Animal | AP |
63
+ |----------|-------|----------|-------|
64
+ | Buffalo | 58.9% | Elephant | 58.5% |
65
+ | Gorilla | 51.2% | Leopard | 49.4% |
66
+ | Wolf | 48.0% | Antelope | 46.4% |
67
+ | Rhino | 44.1% | Zebra | 43.7% |
68
+ | Lion | 31.9% | Giraffe | 24.5% |
69
+
70
+ ## Usage
71
+
72
+ ```python
73
+ import torch
74
+ from detectron2.config import get_cfg
75
+ from detectron2.engine import DefaultPredictor
76
+ from detectron2 import model_zoo
77
+ from huggingface_hub import hf_hub_download
78
+
79
+ # Download model
80
+ model_path = hf_hub_download(
81
+ repo_id="mynane/inception-wildlife-detector-detectron2",
82
+ filename="pytorch_model.bin"
83
+ )
84
+
85
+ # Setup config
86
+ cfg = get_cfg()
87
+ cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_C4_3x.yaml"))
88
+ cfg.MODEL.WEIGHTS = model_path
89
+ cfg.MODEL.ROI_HEADS.NUM_CLASSES = 10
90
+ cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5
91
+
92
+ # Create predictor
93
+ predictor = DefaultPredictor(cfg)
94
+
95
+ # Inference
96
+ import cv2
97
+ image = cv2.imread("wildlife_image.jpg")
98
+ outputs = predictor(image)
99
+ ```
100
+
101
+ ## Model Details
102
+ - **Architecture**: Faster R-CNN with Optimized Inception v1 backbone
103
+ - **Framework**: Detectron2
104
+ - **Input Size**: 800x1333 (min x max)
105
+ - **Confidence Threshold**: 0.5