Intel Neural Compute Stick + ASI Biont: Edge AI Object Detection Without Cloud Dependency

Introduction

Edge AI is reshaping how we deploy computer vision. Sending every frame to the cloud is expensive, slow, and raises privacy concerns. The Intel Neural Compute Stick 2 (NCS2) lets you run inference locally on a Raspberry Pi or any Linux host using OpenVINO. But managing the NCS2 – writing code, handling USB resets, coordinating triggers – still takes time.

Enter ASI Biont. Instead of manually coding an integration script, you describe what you need in a chat. The AI agent writes the Python code, connects to your device via SSH (or execute_python), deploys OpenVINO models, and starts processing frames. You get a live feed of detections and can control the pipeline with natural language commands. No dashboards, no API endpoints to build – just you and an AI doing the heavy lifting.

Why Intel Neural Compute Stick + ASI Biont?

The NCS2 is a USB‑accelerator for deep learning inference. Connected to a Raspberry Pi 4, it can run MobileNet‑SSD or YOLO at 10–30 FPS. Pairing it with ASI Biont gives you:
- Zero‑code setup: AI writes and deploys the inference script.
- Remote control: start/stop detection, change models, adjust thresholds via Telegram or chat.
- Data logging: detections are sent to ASI Biont for analysis, alerts, or dashboarding.
- Failover handling: AI monitors USB errors and reinitialises the stick automatically.

How ASI Biont Connects to the NCS2

ASI Biont does not plug directly into a USB port – the NCS2 lives on your local machine. The AI connects via SSH to the host computer (Raspberry Pi or Linux box) that has the NCS2 attached. It then executes a Python script on that host using execute_python (which runs in ASI Biont’s sandbox) or – for real‑time interaction – uses the industrial_command tool with the SSH protocol.

Example workflow:
1. User tells ASI Biont: “Connect to my Raspberry Pi at 192.168.1.100, user pi, install OpenVINO, and start detecting people with the NCS2.”
2. AI writes a paramiko script that SSHes into the Pi, checks for the NCS2 (using lsusb), installs dependencies (openvino, opencv-python), downloads a model (e.g., person-detection-retail-0013), and runs inference.
3. Results are streamed back to ASI Biont via MQTT or WebSocket (the AI chooses the best channel).
4. User can then ask: “Send me a Telegram alert when a person is detected after 10 PM.”

Step‑by‑Step: Real Integration Example

1. Pre‑requisites

  • Raspberry Pi 4 (or any x86_64 Linux) with lsusb showing the NCS2.
  • OpenVINO installed (see Intel’s guide).
  • ASI Biont account (free tier works).
  • API key generated from Devices → Create API Key – download bridge.py (only from the dashboard).

2. Let ASI Biont Write the Code

In the ASI Biont chat, type:

Connect to my Raspberry Pi at 192.168.1.100:22, user pi, password *. Then start the NCS2 inference script for people detection. Send detections to MQTT topic sensors/camera.*

The AI will generate and run a paramiko script similar to:

import paramiko
import json

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('192.168.1.100', username='pi', password='********')

# Check NCS2 device
stdin, stdout, stderr = ssh.exec_command('lsusb | grep -i neural')
if not stdout.read().decode():
    print("NCS2 not found")
    exit(1)

# Deploy inference script (example)
script = """
import cv2
from openvino.inference_engine import IECore
import paho.mqtt.publish as publish

ie = IECore()
net = ie.read_network(model='person-detection-retail-0013.xml', weights='person-detection-retail-0013.bin')
exec_net = ie.load_network(network=net, device_name='MYRIAD')  # MYRIAD = NCS2

cap = cv2.VideoCapture(0)
while True:
    ret, frame = cap.read()
    if not ret:
        break
    # preprocess, infer, draw boxes...
    detections = exec_net.infer(inputs={'data': frame})
    # send to MQTT broker
    publish.single('sensors/camera', json.dumps(detections), hostname='broker.hivemq.com')
"""

# Write script to Pi
stdin, stdout, stderr = ssh.exec_command('cat > /home/pi/ncs_detection.py <<\'EOF\'\n' + script + '\nEOF')
# Run in background
ssh.exec_command('nohup python3 /home/pi/ncs_detection.py &')

print("Inference started. Use 'python3 /home/pi/ncs_detection.py' to stop manually.")

3. Control via Chat

Now you can interact:
- “Stop detection.” – AI kills the process via SSH.
- “Switch to car detection model.” – AI downloads a new model and restarts.
- “Plot detection counts over the last hour.” – AI reads MQTT history and generates a matplotlib chart (run in execute_python sandbox).

Comparison: Edge vs Cloud Inference

Feature Cloud (e.g., AWS Rekognition) Edge with NCS2 + ASI Biont
Latency per frame 200–500 ms (network) 30–100 ms (local)
Cost per 1M frames ~$5 (API calls) $0 (no data transfer)
Privacy Images leave device All data stays local
Internet required Yes No (after setup)
Model update API‑dependent Download new model via SSH
Automation Needs manual glue AI writes full pipeline

Pitfalls to Avoid

  • USB power: NCS2 draws ~2.5W. On a Pi 4, use a powered USB hub to avoid crashes. The AI can monitor /sys/class/hwmon/hwmon1/temp1_input to detect thermal throttling.
  • MYRIAD plugin missing: OpenVINO must be compiled with MYRIAD support. The AI can detect this and guide installation.
  • while True in execute_python: Never write infinite loops in sandbox scripts (30 s timeout). Use SSH to deploy background processes instead.
  • Firmware: NCS2 firmware updates are needed for some models. The AI can check with vpu_compile --version.

Why You Don’t Need to Wait for “Official Integrations”

ASI Biont connects to any device through execute_python. You just describe the device and parameters – port, IP, baud rate, API key – and the AI writes a Python script using pyserial, paramiko, paho-mqtt, pymodbus, aiohttp or opcua-asyncio. No dashboard, no “add device” button. The entire integration happens in a chat conversation.

For the NCS2, this means you can have a working edge‑AI pipeline in under two minutes. No need to wait for a developer to package a library – the AI does it on the fly.

Real‑World Use Case

A smart‑city project used ASI Biont + NCS2 on ten Raspberry Pi cameras to count pedestrians. When a count exceeded a threshold, the AI triggered a Modbus command to adjust traffic lights. The integration was built in a single chat session. The team later added Telegram alerts and weekly CSV reports without writing a line of code themselves.

Call to Action

Stop sending video to the cloud and paying for every inference. Try ASI Biont today – connect your Intel Neural Compute Stick and run real‑time object detection on the edge. Go to asibiont.com, create an account, and start the conversation.

P.S. The bridge.py you need is only available in the dashboard under Devices → Create API Key – no GitHub repositories, no external downloads.

← All posts

Comments