{"id":13419394,"url":"https://github.com/luoyetx/mini-caffe","last_synced_at":"2025-03-15T05:31:09.548Z","repository":{"id":34694664,"uuid":"38669709","full_name":"luoyetx/mini-caffe","owner":"luoyetx","description":"Minimal runtime core of Caffe, Forward only, GPU support and Memory efficiency.","archived":false,"fork":false,"pushed_at":"2020-07-15T04:02:30.000Z","size":32414,"stargazers_count":374,"open_issues_count":28,"forks_count":151,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-07-31T22:47:37.568Z","etag":null,"topics":["android","caffe","cuda","cudnn","forward-only","linux","mini-caffe","openblas","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luoyetx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-07T06:55:19.000Z","updated_at":"2024-07-04T02:28:21.000Z","dependencies_parsed_at":"2022-09-14T18:21:43.864Z","dependency_job_id":null,"html_url":"https://github.com/luoyetx/mini-caffe","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyetx%2Fmini-caffe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyetx%2Fmini-caffe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyetx%2Fmini-caffe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luoyetx%2Fmini-caffe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luoyetx","download_url":"https://codeload.github.com/luoyetx/mini-caffe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690113,"owners_count":20331726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","caffe","cuda","cudnn","forward-only","linux","mini-caffe","openblas","windows"],"created_at":"2024-07-30T22:01:15.395Z","updated_at":"2025-03-15T05:31:09.543Z","avatar_url":"https://github.com/luoyetx.png","language":"C++","funding_links":[],"categories":["Toolbox","TODO scan for Android support in followings"],"sub_categories":["Libraries"],"readme":"Mini-Caffe\n==========\n\n[![Build Status](https://travis-ci.org/luoyetx/mini-caffe.svg?branch=master)](https://travis-ci.org/luoyetx/mini-caffe)\n[![Build status](https://ci.appveyor.com/api/projects/status/x9s2iajv7rtxeo3t/branch/master?svg=true)](https://ci.appveyor.com/project/luoyetx/mini-caffe/branch/master)\n\nMinimal runtime core of [Caffe](https://github.com/BVLC/caffe). This repo is aimed to provide a minimal C++ runtime core for those want to **Forward** a Caffe model.\n\n### What can Mini-Caffe do?\n\nMini-Caffe only depends on OpenBLAS and protobuf which means you can't train model with Mini-Caffe. It also only supports **Forward** function which means you can't apply models like neural art style transform that uses **Backward** function.\n\n### Build on Windows\n\nYou need a VC compiler to build Mini-Caffe. Visual Studio 2013 Community should be fine. You can download from [here](https://www.visualstudio.com/downloads/).\n\n##### OpenBLAS\n\nOpenBLAS library is already shipped with the source code, we don't need to compile it. If you want, you could download other version from [here](https://sourceforge.net/projects/openblas/files/). [v0.2.14](https://sourceforge.net/projects/openblas/files/v0.2.14/) is used for Mini-Caffe.\n\n##### protobuf\n\nprotobuf is a git submodule in Mini-Caffe, we need to fetch the source code and compile it.\n\n```\n$ git submodule update --init\n$ cd 3rdparty/src/protobuf/cmake\n$ mkdir build\n$ cd build\n$ cmake .. -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -G \"Visual Studio 12 2013 Win64\"\n```\n\nUse `protobuf.sln` to compile `Debug` and `Release` version.\n\nWith these two libraries, we can compile Mini-Caffe now. Copy protobuf's include headers and libraries. Generate `caffe.pb.h` and `caffe.pb.cc`.\n\n```\n$ copydeps.bat\n$ generatepb.bat\n$ mkdir build\n$ cd build\n$ cmake .. -G \"Visual Studio 12 2013 Win64\"\n```\n\nUse `mini-caffe.sln` to compile it.\n\n### Build on Linux\n\nInstall OpenBLAS and protobuf library through system package manager. Or you can compile OpenBLAS and protobuf by yourself. Then build Mini-Caffe.\n\n```\n$ sudo apt install libopenblas-dev libprotobuf-dev protobuf-compiler\n$ ./generatepb.sh\n$ mkdir build\n$ cd build\n$ cmake .. -DCMAKE_BUILD_TYPE=Release\n$ make -j4\n```\n\nIf you don't use Ubuntu, then you may need to install OpenBLAS and protobuf through your system package manager if any.\n\n### Build on Mac OSX\n\nInstall OpenBLAS and protobuf library through `brew`.\n\n```\n$ brew install openblas protobuf\n$ ./generate.sh\n$ mkdir build\n$ cd build\n$ cmake .. -DCMAKE_BUILD_TYPE=Release\n$ make -j4\n```\n\n### Build for Android\n\nMini-Caffe now can be cross compiled for Android platform, checkout the document [here](android).\n\n### With CUDA and CUDNN support\n\nInstall [CUDA](https://developer.nvidia.com/cuda-downloads) and [cuDNN](https://developer.nvidia.com/cudnn) in your system, then we can compile Mini-Caffe with GPU support. Run CMake command below.\n\n```\n$ cmake .. -DUSE_CUDA=ON -DUSE_CUDNN=ON\n```\n\nCurrently we only test mini-caffe on CUDA8.0 with cuDNN5.1 and CUDA9.0 with cuDNN7.1.\n\n### With Java support\n\nInstall Java and set environment variable `JAVA_HOME`. Run CMake command below.\n\n```\n$ cmake .. -DUSE_JAVA=ON\n```\n\n### With Python support\n\ncheckout Python API [here](python), install package via `python setup.py install`.\n\n### How to use Mini-Caffe\n\nTo use Mini-Caffe as a library, you may refer to [example](example).\n\n### How to profile your network\n\nThe Profiler in Mini-Caffe can help you profile your network performance, see docs [here](profile.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluoyetx%2Fmini-caffe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluoyetx%2Fmini-caffe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluoyetx%2Fmini-caffe/lists"}