File size: 1,514 Bytes
a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d a4bb4c9 80a001d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
---
license: apache-2.0
tags:
- maskformer
- instance-segmentation
- abnormal-detection
- image-segmentation
datasets:
- custom
pipeline_tag: image-segmentation
---
# MaskFormer for Normal/Abnormal Detection
This model is fine-tuned to detect and segment regions classified as either "Normal" or "Abnormal".
## Model description
This is a MaskFormer model fine-tuned on a custom dataset with polygon annotations in COCO format. It has two classes:
- Normal (ID: 0)
- Abnormal (ID: 1)
## Intended uses & limitations
This model is intended for instance segmentation tasks to identify normal and abnormal regions in images.
### How to use in CVAT
1. In CVAT, go to Models → Add Model
2. Select Hugging Face as the source
3. Enter the model path: "{your-username}/maskformer-abnormal-detection"
4. Configure the appropriate mapping for your labels (Normal and Abnormal)
### Usage in Python
```python
from transformers import MaskFormerForInstanceSegmentation, MaskFormerImageProcessor
import torch
from PIL import Image
# Load model and processor
model = MaskFormerForInstanceSegmentation.from_pretrained("{your-username}/maskformer-abnormal-detection")
processor = MaskFormerImageProcessor.from_pretrained("facebook/maskformer-swin-tiny-ade")
# Prepare image
image = Image.open("your_image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Make prediction
with torch.no_grad():
outputs = model(**inputs)
# Process outputs for visualization
# (see example code in model repository)
```
|