vision_ai_animals 0.1.1
vision_ai_animals: ^0.1.1 copied to clipboard
On-device animal detection, species/breed classification, and pure-Dart analytics for Flutter, built on the vision_ai engine.
0.1.1 #
- Bumped to require
vision_ai^0.4.0 (which adds the body-pose engine). No change to animal detection, analytics, or this package's API.
0.1.0 #
Initial release — on-device animal detection for Flutter, built on vision_ai ^0.3.0.
Detection & classification #
- Animal detection — bounding box + COCO class label + score per animal, via the MediaPipe Object Detector (EfficientDet-Lite0, LIVE_STREAM).
- Breed / species classification (
AnimalConfig.detectBreed) — MediaPipe Image Classifier (EfficientNet-Lite, ImageNet) on each classifiable detection. AnimalVision.create(...)ergonomic session wrapper (start / stop / results /updateAnimalConfig/switchCamera/ dispose);AnimalModels.ensureLoaded()copies the bundled models into app storage and returns their paths.
Analytics (pure Dart, zero model weight) #
AnimalTracker— stable cross-frame tracking IDs (greedy IoU).AnimalCounter— per-class + total counts.AnimalPresenceDetector— enter/exit events.AnimalMotionTracker— velocity, direction, andActivityLevel(still/active/running).AnimalProximityEstimator— far / near / approaching.ZoneAlertDetector— enter/leave events for rectangular zones.cocoAnimalLabelspreset,animalKindOf()/AnimalGrouping(pet/wildlife/other).
Overlays #
AnimalCameraView,AnimalBoxPainter,AnimalLabel, andAnimalOverlayStyle(boxes, class/breed labels, confidence bar, zones).
Bring your own model #
AnimalVision.create(customDetectorPath:, customClassifierPath:)swaps in your own TFLite models (skips the bundled-asset copy);allowAllCategoriesreports every class a custom (non-COCO) model emits.
Full model-capability utilization #
- Breed classifier honors
breedScoreThreshold,breedAllowedCategories,breedDeniedCategories— drop low-confidence guesses and constrain a general (ImageNet) classifier to the labels you care about. breedClassifiableCategoriesnow includesbirdby default, so parrots/birds are classified out of the box.displayNamesLocalereturns localized category/breed names;rotationDegreessupports BYO models whose input isn't pre-oriented.AnimalResultcarriescategoryIndexand a localizeddisplayName.
Bundled models #
object_detector.tflite(EfficientDet-Lite0) andbreed_classifier.tflite(EfficientNet-Lite). float32 variants; swap to int8 or your own to shrink.
Platforms #
- Verified working on Android and on a physical iOS device (iPhone 16 Pro Max); broader iOS device coverage welcome.