diff --git a/docs/source/templates/gallery_cv.ejs b/docs/source/templates/gallery_cv.ejs index 16ac30093776..1e74cfc8031b 100644 --- a/docs/source/templates/gallery_cv.ejs +++ b/docs/source/templates/gallery_cv.ejs @@ -65,5 +65,10 @@ cards: - Image Classification image: "/images/templates-misc/multi-image-classification.png" url: "/templates/multi-image_classification.html" - +- title: Medical Image Classification and Segmentation + categories: + - Image Classification + - object detection + image: "/images/templates/medical-image-classification.png" + url: "/templates/medical_imaging_classification.html" --- \ No newline at end of file diff --git a/docs/source/templates/medical_imaging_classification.md b/docs/source/templates/medical_imaging_classification.md new file mode 100644 index 000000000000..2a7d94de7e32 --- /dev/null +++ b/docs/source/templates/medical_imaging_classification.md @@ -0,0 +1,87 @@ +--- +title: Medical Image Classification with Bounding Boxes +type: templates +category: Computer Vision +cat: computer-vision +order: 155 +meta_title: Medical Image Classification with Bounding Boxes Template +meta_description: Template for classifying medical images and using bounding boxes for image segmentation. +--- + + + + +This template interface allows annotators to: +- Draw bounding boxes around areas identified as tumors in the image using the "Tumor" label. +- Classify the entire image by selecting one of "Benign", "Malignant", or "Normal". + +This setup is useful in medical imaging tasks where you need to localize tumors and also provide an overall assessment of the image. + +## Labeling configuration + +```xml + + + + + + + + + + +``` + +## About the labeling configuration + +#### Image + +```xml + +``` + +This displays the image. The `value="$image"` means it will use the image field from your task data. + +!!! info Tip + For example images, you can use a sample dataset available from [kaggle](https://www.kaggle.com/datasets/aryashah2k/breast-ultrasound-images-dataset?resource=download). + + +#### Bounding boxes + +```xml + + +``` +This defines the image segmentation you can use. In this template, you're drawing rectangles (bounding boxes). + +- The `RectangleLabels` tag creates a tool for drawing bounding boxes, and `toName="image"` means that the boxes will be associated with the tag named `image` (which in this example is the name assigned to the `` tag). +- The `Label` tag specifies that the bounding boxes represent "Tumor" regions, displayed with a green background. + +For more information about working with bounding boxes, see [Object Detection with Bounding Boxes](image_bbox). + +#### Classification + +```xml + + + + + +``` + +This adds image-level classification choices. + +- The `` tag provides a set of options for annotators to select. +- `toName="image"` applies these choices to the entire image. +- Annotators can classify the image as "Benign", "Malignant", or "Normal". + +You can change these classification options by editing them, adding more, or deleting them. If your needs are more complex, you can also use [nested choices](image_classification#Enhance-classification-templates-with-nested-choices). + + +## Related tags + +- [Image](/tags/image.html) +- [RectangleLabels](/tags/rectanglelabels.html) +- [Choices](/tags/choices.html) diff --git a/label_studio/core/static/templates/medical-image-classification.png b/label_studio/core/static/templates/medical-image-classification.png new file mode 100644 index 000000000000..a9f6c7f950ea Binary files /dev/null and b/label_studio/core/static/templates/medical-image-classification.png differ