Skip to main content

DemoZoo Container Usage Guide

Last Version: 2025/09/25

This guide explains how to run DemoZoo inside a Docker container on the Bianbu system. It also shows how to test the built-in models using both the terminal and a web interface.

Supported Models in DemoZoo

Image Classification (6 models)

  • EfficientNet – high-efficiency image classification
  • ResNet – Deep residual network for classification
  • MobileNetV2 – Lightweight image classification
  • InceptionV1 – Inception network classification
  • InceptionV3 – Enhanced Inception network classification
  • Swin-Tiny – classification model based on Swin Transformer

Image Segmentation (5 models)

  • CLIP - Text-prompted image segmentation
  • FCN - Fully Convolutional Network semantic segmentation
  • UNet - U-shaped network for image segmentation
  • SAM - Segment Anything Model
  • YOLOv8-Seg - YOLO-based instance segmentation

Object Detection (6 models)

  • YOLOv8 - Latest YOLO object detection model
  • YOLOv8-Pose - Pose detection
  • YOLOv5 - 5th-generation YOLO
  • YOLOv5-Face - Face detection
  • YOLOv6 - 6th-generation YOLO
  • YOLOv11 - 11th-generation YOLO

Face Recognition (1 model)

  • ArcFace - Face recognition similarity calculation

Pulling the Container Image

Before starting, download the DemoZoo image to your local system:

sudo docker pull harbor.spacemit.com/bianbu-robot/spacemit-demo:latest

Starting the Container

Option 1: Direct Startup

sudo docker run  -p 8000:8000  --name spacemit-demo-container --privileged harbor.spacemit.com/bianbu-robot/spacemit-demo:latest 

Running status example:

Option 2: Background Startup

sudo docker run -itd -p 8000:8000  --name spacemit-demo-container --privileged harbor.spacemit.com/bianbu-robot/spacemit-demo:latest 

Running status example:

When running in the background, you can check the container status with:

sudo docker ps -a

Background container status example:

Note:

  • If run with direct startup, the container stops when you close the terminal.
  • If run with background startup, the container keeps running until you manually stop it. Otherwise, it will continue using system resources.

Using DemoZoo

Checking Service Status

# Check all model file statuses
curl http://localhost:8000/models/status

# Get available model list
curl http://localhost:8000/models

# Container health check
curl http://localhost:8000/health

Running Models from the Terminal

# ResNet image classification
curl -X POST "http://localhost:8000/predict/resnet" \
-F "image=@test_image.jpg"

# EfficientNet image classification
curl -X POST "http://localhost:8000/predict/efficientnet" \
-F "image=@test_image.jpg"

# InceptionV3 image classification
curl -X POST "http://localhost:8000/predict/inception_v3" \
-F "image=@test_image.jpg"

# ArcFace face similarity calculation
curl -X POST "http://localhost:8000/predict/arcface" \
-F "image1=@face1.jpg" \
-F "image2=@face2.jpg"

# CLIP segmentation with text prompt
curl -X POST "http://localhost:8000/predict/clip" \
-F "image=@test_image.jpg" \
-F "text=dog"

# FCN semantic segmentation
curl -X POST "http://localhost:8000/predict/fcn" \
-F "image=@test_image.jpg"

# UNet segmentation
curl -X POST "http://localhost:8000/predict/unet" \
-F "image=@test_image.jpg"

# SAM image segmentation
curl -X POST "http://localhost:8000/predict/sam" \
-F "image=@test_image.jpg"

# YOLOv8 instance segmentation
curl -X POST "http://localhost:8000/predict/yolov8_seg" \
-F "image=@test_image.jpg"

# YOLOv8 object detection
curl -X POST "http://localhost:8000/predict/yolov8" \
-F "image=@test_image.jpg"

# YOLOv8 post detection
curl -X POST "http://localhost:8000/predict/yolov8_pose" \
-F "image=@test_image.jpg"

# YOLOv5 object detection
curl -X POST "http://localhost:8000/predict/yolov5" \
-F "image=@test_image.jpg"

# YOLOv5 face detection
curl -X POST "http://localhost:8000/predict/yolov5_face" \
-F "image=@test_image.jpg"

The terminal usually returns results in JSON format, for example:

{
"success": true,
"predicted_class": "tabby cat",
"output": "Final Result: \nclass=tabby cat"
}

Running Models from the Web Interface

Open your browser and go to http://localhost:8000/ to access the DemoZoo web page.

Example classification results:

Example detection results: