Downloads · 30 days
15
4% of all-time downloads
JayRay5/convnext-tiny-224-cyprus-fish-cls
convnext-tiny-224-cyprus-fish-cls is a image classification model from JayRay5. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of facebook/convnext-tiny-224 on the Cyprus Fish Dataset. It is designed to classify fish species commonly found in the waters around Cyprus.
Downloads · 30 days
15
4% of all-time downloads
All-time downloads
366
Public
Parameters
27.8M
557 MB on disk
Likes
0
Public
Click a slice to open those files.
.onnx111 MB · 50%
From the Hugging Face model README
This model is a fine-tuned version of facebook/convnext-tiny-224 on the Cyprus Fish Dataset. It is designed to classify fish species commonly found in the waters around Cyprus.
This model is part of a complete End-to-End MLOps project including CI/CD, Docker containerization, and a deployed FastAPI application.
Make sure your transformers>=4.57.3
from transformers import ConvNextImageProcessor,AutoImageProcessor,AutoModelForImageClassification
from PIL import Image
processor = AutoImageProcessor.from_pretrained("JayRay5/convnext-tiny-224-cyprus-fish-cls")
model = AutoModelForImageClassification.from_pretrained("JayRay5/convnext-tiny-224-cyprus-fish-cls")
image = Image.open("path_to_your_image/image.png").convert("RGB")
inputs = (
processor(images=image, return_tensors="pt").to(model.device).to(model.dtype)
)
with torch.inference_mode():
outputs = model(**inputs)
id2label = model.config.id2label
results = {}
for idx, prob in enumerate(probs):
idx_int = idx
label_name = id2label[idx_int]
results[label_name] = float(prob)
print(results)
Training data can be found at Cyprus Fish Dataset.
The hyperparameters have been validated using a k-fold validation strategy. <br> For more details about the training process, refer to the GitHub repository.
As the test set is small, the evaluation may be biased.
Accuracy: 0.95
The Cyprus Fish Dataset is a non-exhaustive dataset.
Thus, the model will not be able to classify species that are not in the dataset.