Skip to main content

Crowd Tracking & Counting

This guide is for NVIDIA Jetson Ubuntu 22 + JetPack 6.x environments, helping you quickly complete the deployment.

📋 Environment Requirements

  • Device: NVIDIA Jetson series (Nano, Xavier, Orin, etc.)
  • System: Ubuntu 22.x + JetPack 6.x
  • Network: Able to access GitHub and Docker Hub
  • Permissions: sudo privileges

If your device is not yet installed with the proper system environment, please refer to the official flashing guide for system installation and environment preparation:
JetPack Flashing Tutorial (Seeed Studio)

⚡ One-Click Deployment

Run the following command on your Jetson device terminal:

curl -fsSL https://raw.githubusercontent.com/Seeed-Studio/SenseCraft-AI_Server/refs/heads/jetson/scripts/install.sh | bash

💡 The script supports idempotent execution, meaning it is safe to run multiple times.

🔍 Deployment Process

The script automatically performs the following steps:

  1. Install Docker (27.x)

    • Check if Docker is installed
    • If installed but not version 27.x → automatically uninstall and reinstall
    • Configure NVIDIA Container Toolkit
    • Set Docker default runtime to nvidia
  2. Install MQTT Broker

    • Install mosquitto and mosquitto-clients

    • Configure to allow external access:

      listener 1883 0.0.0.0
      allow_anonymous true
  3. Deploy SenseCraft AI Server

    • Clone the specified branch to ~/sensecraft-ai_server
    • Run scripts/run.sh to start the service
    • Download YOLOv11 model to ~/sensecraft-ai_server/models/yolo11n.pt

🛡 Exception Handling

  • Idempotent execution:
    • Most issues (e.g., network interruptions, partial installation failures) can be fixed by simply re-running the script
    • The script checks software versions and configurations, only installing missing or incorrect parts
  • Rare issues (e.g., permanent apt source failure, unreachable external repository) require manual intervention

🖥 Starting & Accessing the Service

  1. Start the service

    cd ~/sensecraft-ai_server
    sudo bash scripts/run.sh

📷 Command Line Output (Example)

Command
  1. Access the main page
    • In your browser:

      http://<JETSON_IP>:46654
    • Default parameters are preconfigured; start to see results

📷 Web Interface (Example)

  1. Access the configuration page
    • In your browser:

      http://<JETSON_IP>:46654/config.html
    • Here you can adjust video sources, models, inference parameters, etc., and save them to the server

⚙ Configuration Page Overview

📷 Configuration Page (Example)

Configuration

Video Source

  • Supports local video files, USB cameras (default first device), RTSP streams
  • Supports MP4, AVI, MOV, MKV uploads
  • View and delete uploaded video sources

AI Model

  • Select from available AI inference models
  • Supports .pt, .pth, .onnx, .engine formats
  • View and delete uploaded models

Inference Parameters

  • Confidence threshold: 0.1–1.0
  • Max detections: 1–1000
  • Half-precision inference: boosts speed (minimal difference for small models)

Display

  • Show detection boxes (customizable color, default orange)
  • Timestamp & FPS always enabled

Tracking

  • Enable multi-object tracking
  • Show trajectory lines with customizable length, thickness, and color

Tripwire Detection

  • Supports horizontal or vertical tripwire (vertical recommended)
  • Draw start/end points; enable display for real-time debugging
  • Tolerance: 1–20 pixels
  • Customizable color & thickness
  • Show/hide and reset counter (resets when service restarts)

Configuration Management

  • Save current config to the server (loaded at runtime)
  • Export/import configuration files
  • Restore default settings

🛠 Common Issues

IssueCauseSolution
Docker installation failedUnstable network or sourceCheck network and re-run the script
Mosquitto cannot connectFirewall/config issueEnsure /etc/mosquitto/mosquitto.conf contains listener 1883 0.0.0.0
YOLO model not downloadedNetwork interruptionDelete ~/sensecraft-ai_server/models/yolo11n.pt and re-run the script

📦 Uninstalling the Service

# Uninstall MQTT
sudo apt remove -y mosquitto mosquitto-clients

# Uninstall Docker
sudo apt-get purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras

# Remove service directory
rm -rf ~/sensecraft-ai_server

📚 References

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...