{ "cells": [ { "cell_type": "markdown", "id": "intro", "metadata": {}, "source": [ "# Running Predictions on Images, Volumes, and Videos\n", "\n", "You trained a 2D segmentation model on plain PNG images.\n", "But what happens when someone sends a CT scan or a video clip to the server?\n", "\n", "Datamint handles this automatically. If your model implements `predict_image`,\n", "the library unlocks all of these modes without any extra code from you:\n", "\n", "| Mode | Input | What happens |\n", "|---|---|---|\n", "| `image` | PNG / JPEG | your model receives the image directly |\n", "| `slice` | 3D volume | one axial slice is extracted → your model receives it as a 2D image |\n", "| `volume` | 3D volume (CT, MRI) | every axial slice is processed → your model is called once per slice |\n", "| `frame` | video | one frame is extracted → your model receives it as a 2D image |\n", "| `all_frames` | video | every frame is processed → your model is called once per frame |\n", "\n", "This notebook shows all of this in action using a real model trained on breast ultrasound images." ] }, { "cell_type": "markdown", "id": "setup-header", "metadata": {}, "source": [ "## Setup" ] }, { "cell_type": "code", "execution_count": 2, "id": "setup", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/luan/Desktop/Datamint/Codes/datamint-python-api/datamint/env/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] }, { "data": { "text/html": [ "
| Name | \n", "\n", " deeplabv3plus_Segmentation_Tutorial\n", " | \n", "
|---|---|
| Created At | \n", "\n", " 2026-06-01T12:48:44.168Z\n", " | \n", "
| Created By | \n", "\n", " lucasmello.research@gmail.com\n", " | \n", "
| Archived | \n", "\n", " False\n", " | \n", "
| Resource Count | \n", "\n", " 780\n", " | \n", "