Skip to content

invalid version names in megadetector init #612

@podgorki

Description

@podgorki

Search before asking

  • I have searched the Pytorch-Wildlife issues and found no similar bug report.

Bug

The default version string for megadetectorv6, megadetectorv6-mit, megadetectorv6-apache and megadetectorv6-distributed are incorrect raising a value error when loading without passing a string.

Fix is to update each string in the constructor to a valid version to match the if else statements

Image

Environment

No response

Minimal Reproducible Example

from PytorchWildlife.models import detection as pw_detection

# each call will fail
detection_model = pw_detection.MegaDetectorV6MIT(
    device="cuda",
    pretrained=True,
)
detection_model = pw_detection.MegaDetectorV6_Distributed(
    device="cuda",
    pretrained=True,
)
detection_model = pw_detection.MegaDetectorV6_Distributed(
    device="cuda",
    pretrained=True,
)
detection_model = pw_detection.MegaDetectorV6(
    device="cuda",
    pretrained=True,
)

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions