caffe-mobile  by solrex

Optimized Caffe lib for mobile deployment, plus demo app

created 8 years ago
315 stars

Top 86.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an optimized Caffe library for iOS and Android, focusing on reduced size and improved speed for mobile deployment. It targets developers building on-device machine learning applications who need a lightweight Caffe backend.

How It Works

The library is a fork of the original Caffe, heavily modified for mobile environments. Key optimizations include disabling features like HDF5, LevelDB, Boost, and backward computation, resulting in a smaller footprint and faster inference. It utilizes CMake for building and includes JNI code for Android integration.

Quick Start & Requirements

  • iOS: Clone the repository, run ./tools/build_ios.sh, and then build the CaffeSimple Xcode project. Requires a pre-trained LeNet model.
  • Android: Clone the repository, set NDK_HOME, and run ./tools/build_android.sh. Requires Android NDK r15 or earlier. Build the CaffeSimple Android Studio project.
  • macOS/Ubuntu: Install protobuf, libprotobuf-dev, protobuf-compiler, libatlas-dev (Ubuntu) or gflags (macOS). Build with CMake.
  • Windows: Requires Git for Windows, TDM-GCC, and CMake 3.8.2. Build via Git Bash.

Highlighted Details

  • Optimized for size and speed by disabling non-essential Caffe features.
  • Includes out-of-the-box demo applications for iOS and Android.
  • Supports conversion of .prototxt files to .protobin for mobile loading.
  • Build scripts leverage CMake for cross-platform compilation.

Maintenance & Community

This project appears to be a personal fork with limited recent activity. There are no links to community channels or roadmaps provided in the README.

Licensing & Compatibility

The project is based on Caffe, which is typically under a BSD-style license. However, the specific licensing for this fork is not explicitly stated in the README. Compatibility with commercial or closed-source applications would require verification of the license.

Limitations & Caveats

NDK versions r16 and later are not supported due to compatibility issues with header changes. The build process for Android requires a specific NDK version (r15 or earlier). The project's maintenance status and community support are unclear.

Health Check
Last commit

7 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.