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