gitmyhub

DeepVision

Java ★ 1.9k updated 4y ago

在我很多项目中用到的CV算法推理框架应用。

DeepVision: A Framework for Testing Computer Vision Models on Mobile Devices

DeepVision solves a real pain point: algorithm engineers finish training a computer vision model, but then struggle to test it quickly on phones or tablets without help from mobile developers. This framework lets researchers and engineers verify their models work on actual devices without building a separate app for every model. It's built in Java and includes pre-compiled libraries so you can start testing right away.

The framework is organized into three main layers. The bottom layer handles data—it captures video from the camera, lets you load images from your phone's gallery, and can work with 3D model files. The middle layer runs the actual AI models using mobile-friendly inference engines like Qualcomm's SNPE or TensorFlow Lite, which are frameworks designed to run neural networks efficiently on phones. The top layer displays results on screen and provides debugging tools. Think of it as plumbing that connects your camera or images to your model, runs the model, and shows you what happened—all without writing boilerplate code.

The project provides three ways to integrate a model: Native (C/C++) APIs for maximum performance, Java APIs for simpler Android development, and Script APIs that need no coding at all—you just write a configuration file. The framework also includes optimized image processing functions (using OpenCV) that are accelerated for mobile processors, and tools to shrink and compress models so they run faster on devices with limited battery and memory.

What makes this useful in practice: a team working on different computer vision problems—object detection, pose estimation, face recognition—can all use the same framework to test their models instead of each person building their own test app. The author mentions using this framework in his own projects like L-ink (a robotic arm) and a Mars rover simulation, so it's battle-tested. The repository also includes a model zoo with pre-trained examples like YOLO and Openpose that you can use as references or baselines for comparison.