← Back to Projects

AI Camera: Raspberry Pi Image-to-Video System

AI Camera: A Raspberry Pi Image-to-Video Generation System

An embedded image-to-video system that combines on-device capture, multimodal prompting, cloud generation, and a serviceable 3D-printed enclosure in one reproducible workflow.

View code

Role
Course Project · Innovative Experiments in Electronic Science III
Period
Sep. 2025 – Jun. 2026
Institution
SUSTech

Design objective

Image-to-video models are usually accessed as isolated web tools, while the capture device, user intent, generated prompt, and final artifact remain disconnected. The design objective was to turn the camera itself into a complete creative instrument and make a failure-prone, multi-service pipeline usable from capture through generation and later retrieval.

My contribution

  • Implemented live preview and capture with Picamera2 and a seven-page PySide6 interface covering capture, narrative input, prompt review, video generation, history, and settings.
  • Designed three creative modes: shoot reality (photo + story), recover a dream (text or voice), and black-box finale (reconstruction from narrative fragments).
  • Built a two-stage prompt pipeline: a vision-language model converts the photo and narrative into a cinematic treatment, and a dedicated optimizer produces concise English prompts for video generation.
  • Integrated real-time speech transcription over WebSocket with volume gating, silence-based submission, maximum segment duration, and retained recordings to stabilize utterance segmentation.
  • Integrated asynchronous Runway jobs across multiple model configurations and moved long-running generation off the UI thread so the device remains responsive.
  • Defined a traceable session structure linking metadata, photos, narratives, prompts, audio, and output videos; designed and printed a three-part enclosure around camera access, cable bend radius, connectivity, and maintenance.

Course project for Innovative Experiments in Electronic Science III. Below: the assembled device, and a screen recording of the interface in use.

The three-part enclosure assembled. A front window exposes the Raspberry Pi Camera module, the ribbon cable folds back inside to the board, and the sides leave power and Ethernet accessible. The window position and cable bend radius were measured off the real board rather than modelled first and forced to fit.
The three-part enclosure assembled. A front window exposes the Raspberry Pi Camera module, the ribbon cable folds back inside to the board, and the sides leave power and Ethernet accessible. The window position and cable bend radius were measured off the real board rather than modelled first and forced to fit.
Another angle.
Another angle.
界面演示

Validation & outcomes

  • Verified all three modes end to end, including photo-plus-story, voice-only dream reconstruction, and narrative-fragment generation.
  • Representative tests produced multiple 5–8 s, 1280×720 video variants while preserving the complete input-to-output session record.
  • Printed and assembled the enclosure, completing the transition from software prototype to an integrated demonstration device.

Methods & tools

  • Raspberry Pi
  • Picamera2
  • PySide6 / Qt
  • OpenAI API
  • Runway API
  • Realtime Speech over WebSocket
  • Multithreading
  • 3D Modelling & Printing