Skip to content

Pytorch-Wildlife v1.1.0

Latest
Compare
Choose a tag to compare
@zhmiao zhmiao released this 08 Nov 19:23
· 29 commits to main since this release
4d5946b

🎉🎉🎉 Pytorch-Wildlife Version 1.1.0

MegaDetectorV6 is finally out

After a few months of public beta testing, we are finally ready to officially release our 6th version of MegaDetector, MegaDetectorV6! In the next generation of MegaDetector, we are focusing on computational efficiency, performance, mordernizing of model architectures, and licensing. We have trained multiple new models using different model architectures, including Yolo-v9, Yolo-v11, and RT-Detr for maximum user flexibility. We have a rolling release schedule for different versions of MegaDetectorV6, and in the first step, we are releasing the compact version of MegaDetectorV6 with Yolo-v9 (MDv6-ultralytics-yolov9-compact, MDv6-c in short). From now on, we encourage our users to use MegaDetectorV6 as their default animal detection model.

This MDv6-c model is optimized for performance and low-budget devices. It has only one-sixth (SMALLER) of the parameters of the previous MegaDetectorV5 and exhibits 12% higher recall (BETTER) on animal detection in our validation datasets. In other words, MDv6-c has significantly fewer false negatives when detecting animals, making it a more robust animal detection model than MegaDetectorV5. Furthermore, one of our testers reported that the speed of MDv6-c is at least 5 times FASTER than MegaDetectorV5 on their datasets.

Models Parameters Precision Recall
MegaDetectorV5 121M 0.96 0.73
MegaDetectroV6-c 22M 0.92 0.85

Learn how to use MegaDetectorV6 in our image demo and video demo.

HerdNet in Pytorch-Wildlife

We have incorporated a point-based overhead animal detection model into our model zoo called HerdNet (Delplanque et al. 2022). Two model weights are incorporated in this release, HerdNet-general (their default weights) and HerdNet-ennedi (their model trained on Ennedi 2019 datasets). More details can be found here and in their original repo. This is the first third-party model in Pytorch-Wildlife and the foundation of our expansion to overhead/aerial animal detection and classification. Please see our HerdNet demo on how to use it!

Customed Weights

You can now load custom weights you fine-tuned on your own datasets using the finetuning module directly in the Pytorch-Wildlife pipeline! Please see the demo on how to do it. You can also load it in our Gradio app!

Folder Separation

You can now automatically separate your image detections into folders based on detection results! Please see our folder separation demo on how to do it. You can also test it in our Gradio demo!

Simplified Batch Detection!

We have also simplified the batch detection pipeline. Now we do not need to define pytorch datasets and dataloaders specifically.

Previous:

tgt_folder_path = os.path.join(".","demo_data","imgs")

dataset = pw_data.DetectionImageFolder(
    tgt_folder_path,
    transform=pw_trans.MegaDetector_v5_Transform(target_size=detection_model.IMAGE_SIZE,
                                                 stride=detection_model.STRIDE),
    extension='JPG' 

loader = DataLoader(dataset, batch_size=32, shuffle=False, 
                    pin_memory=True, num_workers=0, drop_last=False)

results = detection_model.batch_image_detection(loader)

Now:

tgt_folder_path = os.path.join(".","demo_data","imgs")

results = detection_model.batch_image_detection(tgt_folder_path, batch_size=16)

Fixes and other updates:

  • Issues #523, #524 and #526 have been solved!
  • PyTorchWildlife is now compatible with Supervision 0.23+ and Python 3.10+!
  • CUDA 12.x compatibility.