--- 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