Image Classification
Transformers
Safetensors
cetaceanet
biology
biodiversity
custom_code
File size: 388 Bytes
b3201aa
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import os
import cv2

os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"

from transformers import AutoModelForImageClassification

if __name__ == "__main__":
    cetacean_classifier = AutoModelForImageClassification.from_pretrained("Saving-Willy/cetacean-classifier", trust_remote_code=True)
    img = cv2.imread("tail.jpg")
    out = cetacean_classifier(img)
    print(out)