Instructions to use FriedParrot/fish-segmentation-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FriedParrot/fish-segmentation-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="FriedParrot/fish-segmentation-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("FriedParrot/fish-segmentation-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from FriedParrot/fish-segmentation-model: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/FriedParrot/fish-segmentation-model/resolve/main/README.md
- Command line
-
hf download hf://FriedParrot/fish-segmentation-model/README.md
-
curl -L -o README.md https://huggingface.co/FriedParrot/fish-segmentation-model/resolve/main/README.md
2.14 kB
| library_name: transformers | |
| license: creativeml-openrail-m | |
| language: | |
| - en | |
| base_model: | |
| - facebook/detr-resnet-50-panoptic | |
| pipeline_tag: image-segmentation | |
| tags: | |
| - biology | |
| datasets: | |
| - FriedParrot/a-large-scale-fish-dataset | |
| # Fish-segmentation-model | |
| This is a Model using `ResNet-50` backbone and customized Multi-task Head and loss to make classification, boundary box prediction and segmentation (24.7M parameters). | |
| Note that I only use processor of `detr-resnet-50-panotic` and `resnet-50` backbone of the base model, not use transformers. All the model, task heads and loss are self-defined. | |
| Another model by directly fine-tuning DETR model can be found at https://huggingface.co/FriedParrot/fish-segmentation-simple | |
| This model use kaggle dataset [A Large Scale Fish Dataset](https://www.kaggle.com/datasets/crowww/a-large-scale-fish-dataset) as dataset for training. And for convenience, I also made a copy version for this dataset available on [huggingface](https://huggingface.co/datasets/FriedParrot/a-large-scale-fish-dataset), this is just for making it easier for u to use. | |
| Tasks : | |
| - Classification | |
| - BBoxes prediction, and | |
| - Segmentation | |
| > [!warning] | |
| > Since this model include customized type, then `AutoModel()` and `AutoConfig()` may fail, but `AutoProcessor()` will work correctly (Since I use a DetrImageProcessor for this) | |
| > | |
| > If you want using this model, you can **go to my source code below** and look for `FishSegmentationModel` and `FishSegmentModelConfig` for load these models correctly. | |
| > | |
| ### Model Sources | |
| For **source code & Tutorials** : check [my github](https://github.com/FRIEDparrot/fish-segmentation) | |
| --- | |
| ### Results and test | |
| I trained this model in my pc(RTX4060 8GB + cu126), and those are some pictures tested in fish datase : | |
|  | |
|  | |
| (The model predicted the mullet a shrip lol😂 since classification head of this model is not very accurate😂) |