Instructions to use FriedParrot/fish-segmentation-simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FriedParrot/fish-segmentation-simple with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="FriedParrot/fish-segmentation-simple")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageSegmentation processor = AutoImageProcessor.from_pretrained("FriedParrot/fish-segmentation-simple") model = AutoModelForImageSegmentation.from_pretrained("FriedParrot/fish-segmentation-simple", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from FriedParrot/fish-segmentation-simple: direct link, hf CLI and curl.
- Browser
- Download file 2.11 kB
-
https://huggingface.co/FriedParrot/fish-segmentation-simple/resolve/main/README.md
- Command line
-
hf download hf://FriedParrot/fish-segmentation-simple/README.md
-
curl -L -o README.md https://huggingface.co/FriedParrot/fish-segmentation-simple/resolve/main/README.md
2.11 kB
| library_name: transformers | |
| license: creativeml-openrail-m | |
| base_model: | |
| - facebook/detr-resnet-50-panoptic | |
| datasets: | |
| - FriedParrot/a-large-scale-fish-dataset | |
| language: | |
| - en | |
| # Model Card for Fish Segmentation (Fine-Tuned DETR) | |
| This is a **fine-tuned DETR model (`facebook/detr-resnet-50-panoptic`)** adapted for **fish detection and segmentation**. | |
| The model performs **multi-task prediction** including: | |
| * **Classification** (fish species recognition) | |
| * **Bounding Box prediction** | |
| * **Segmentation masks** | |
| It has **42.9M parameters** and is trained on the **[A Large Scale Fish Dataset](https://www.kaggle.com/datasets/crowww/a-large-scale-fish-dataset)** from Kaggle. | |
| The copy of this dataset on hugging face is available [here](https://huggingface.co/datasets/FriedParrot/a-large-scale-fish-dataset) | |
| ## Model Sources | |
| * **Base model**: [facebook/detr-resnet-50-panoptic](https://huggingface.co/facebook/detr-resnet-50-panoptic) | |
| * **Fine-tuned model**: [FriedParrot/fish-segmentation-simple](https://huggingface.co/FriedParrot/fish-segmentation-simple) | |
| * **Training dataset**: [A Large Scale Fish Dataset](https://www.kaggle.com/datasets/crowww/a-large-scale-fish-dataset) | |
| * **Source code & tutorials**: [GitHub Repository](https://github.com/FRIEDparrot/fish-segmentation) | |
| > [!note] | |
| > This model is fully compatible with `AutoModelForObjectDetection`, `AutoProcessor`, and Hugging Face Trainer. | |
| > Unlike the first model (`fish-segmentation-model`), this one does **not** require custom config classes. | |
| ## Training Details | |
| * **Hardware**: NVIDIA RTX 4090 (48GB VRAM) | |
| * **CUDA**: 12.8 | |
| * **Framework**: PyTorch + Hugging Face Transformers | |
| * **Batch size**: use 8 as train batch sizes | |
| * **Training strategy**: Direct fine-tuning of DETR with minimal modifications | |
| ## Results & Example Predictions | |
| Since its a fine-tuned model, the accuracy is really high, and also classification accuracy can reach about 100%. | |
| The predicted bounding box and masks are also very accurate : | |
|  | |