All Projects β†’ KleinYuan β†’ Caffe2 Ios

KleinYuan / Caffe2 Ios

Licence: mit
Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.

Programming Languages

swift
15916 projects
swift3
66 projects

Projects that are alternatives of or similar to Caffe2 Ios

Yolo tensorflow
πŸš– Object Detection (YOLOv1) implentation in tensorflow, with training, testing and video features.
Stars: ✭ 45 (-79.64%)
Mutual labels:  object-detection, classification, yolo, real-time
Easy Yolo
Yolo (Real time object detection) model training tutorial with deep learning neural networks
Stars: ✭ 98 (-55.66%)
Mutual labels:  object-detection, tutorial, yolo, real-time
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (+17.65%)
Mutual labels:  object-detection, deep-neural-networks, opencv, real-time
Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (+133.03%)
Mutual labels:  object-detection, deep-neural-networks, yolo, real-time
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (-8.6%)
Mutual labels:  object-detection, opencv, yolo
Realtime Detectron
Real-time Detectron using webcam.
Stars: ✭ 42 (-81%)
Mutual labels:  object-detection, demo, real-time
Mobilnet ssd opencv
MobilNet-SSD object detection in opencv 3.4.1
Stars: ✭ 64 (-71.04%)
Mutual labels:  deep-neural-networks, opencv, caffe
Caffe2
Caffe2 is a lightweight, modular, and scalable deep learning framework.
Stars: ✭ 8,409 (+3704.98%)
Mutual labels:  ai, deep-neural-networks, caffe2
Deep Dream In Pytorch
Pytorch implementation of the DeepDream computer vision algorithm
Stars: ✭ 90 (-59.28%)
Mutual labels:  ai, deep-neural-networks, caffe2
Learnopencv
Learn OpenCV : C++ and Python Examples
Stars: ✭ 15,385 (+6861.54%)
Mutual labels:  ai, deep-neural-networks, opencv
Deepstream Yolo
NVIDIA DeepStream SDK 5.1 configuration for YOLO models
Stars: ✭ 166 (-24.89%)
Mutual labels:  object-detection, deep-neural-networks, yolo
Face Mask Detection
Face masks are crucial in minimizing the propagation of Covid-19, and are highly recommended or even obligatory in many situations. In this project, we develop a pipeline to detect unmasked faces in images. This can, for example, be used to alert people that do not wear a mask when entering a building.
Stars: ✭ 37 (-83.26%)
Mutual labels:  classification, tutorial, opencv
Tensorflow object counting api
πŸš€ The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+332.58%)
Mutual labels:  object-detection, deep-neural-networks, opencv
Yolo annotation tool
Annotation tool for YOLO in opencv
Stars: ✭ 17 (-92.31%)
Mutual labels:  object-detection, opencv, yolo
Yolo V3 Iou
YOLO3 εŠ¨ζΌ«δΊΊθ„Έζ£€ζ΅‹ (Based on keras and tensorflow) 2019-1-19
Stars: ✭ 116 (-47.51%)
Mutual labels:  object-detection, yolo, real-time
Bmw Yolov4 Inference Api Cpu
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.
Stars: ✭ 180 (-18.55%)
Mutual labels:  object-detection, deep-neural-networks, opencv
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+233.94%)
Mutual labels:  object-detection, tutorial, yolo
Imodels
Interpretable ML package πŸ” for concise, transparent, and accurate predictive modeling (sklearn-compatible).
Stars: ✭ 194 (-12.22%)
Mutual labels:  ai, tutorial, demo
Yolo Tf2
yolo(all versions) implementation in keras and tensorflow 2.4
Stars: ✭ 695 (+214.48%)
Mutual labels:  object-detection, deep-neural-networks, yolo
Openlabeling
Label images and video for Computer Vision applications
Stars: ✭ 706 (+219.46%)
Mutual labels:  object-detection, opencv, yolo

Slack Channel for Deep Learning Communication:

https://deep-learning-geeks-slack.herokuapp.com/

Caffe2-iOS

This is a project to demo how to use Caffe2/OpenCV 2 to build an iOS application doing real time object classification.

  • [X] iOS (Swift/Objective-C/C++) with Caffe2

  • [X] Test build in models (tinyYolo, SqueezeNet) with your own photo

  • [X] Memory Consumption and Time Elapse Data

  • [X] Live (Real Time) detection

  • [X] Download your own model on the fly! And test it!

  • [X] Manage models locally on your iPhone

  • [X] Overall control on every layer (from beginger to expert)

  • [X] Warm community and welcome to contribute

  • [X] Star us if you like

Demo

If you are too lazy to build this repo, I also put this in App Store:

Check it out

  • If it navigates you to a different country's app store, you just search Deep Learning Pro.

Wiki

Check our Wiki

Feel free to ask any questions from prepare environment to debug on Xcode and we are happy to help you.

For both Beginners and Experts

We provide two stable versions in here with:

Static Classifier Real Time Classifier Model Downloader
static realtime downloader
  • [X] Lite stable version for beginners to experience how the wrapper work and play with the demo
Static Classifier Real Time Classifier
static realtime
  • Note that the number of FPS is subjective to the size you send to the device as well as type of the device. Those numbers were obtained with Height*Width = 227 * 227 on an iPhone 7 Plus.

Dependencies

You have to use a Mac with Xcode >= 8.0 (macOS Sierra) to keep going

iOS 10

Caffe2

OpenCV 2

LFS Clone

brew install git-lfs
git lfs install
git lfs clone https://github.com/KleinYuan/Caffe2-iOS

Step by Step Tutorial

  • [X] Notice, after this commit, I put all large files in git LFS and make sure when you clone use lfs clone

  • [X] Clone this repo into a folder, let's say ~/Desktop/, then you will have ~/Desktop/Caffe2-iOS when clone is done

  • [X] Navigate to ~/Desktop/Caffe2-iOS/src folder and run bash ./setup.sh, which will automatically download and build iOS Caffe2 in a paralleled folder besides ~/Desktop/Caffe2-iOS/src/caffe2-ios called caffe2 (it's important to make sure this step is done and it may take around 20-30 min to finish)

  • [X] When previous step is done, open ~/DesktopCaffe2-iOS/src/caffe2-ios with Xcode (>8.0)

  • [X] Disable Bitcode like this

  • [X] (by default should be done) Adding $(inherited) -force_load caffe2-ios/libCaffe2_CPU.a to Build Settings/Linking/Other Linker Flags . For this issue

  • [X] Build with your iPhone plugged in

  • [X] Open the app and press Run to check the result of a pre-loaded image (cute Panda!) and press live to go to live mode

Validation and debug

There are some potential issues that you will have (I will keep adding if I sense some in issues):

Caffe2 iOS Build failed

1-a. Error Message 1: When build project in Xcode you see this error Cannot find caffe2/proto/caffe2.pb.h

1-b. Error Message 2: When running setup.sh you see this in terminal ${YOUR_PATH}/Caffe2-iOS/src/caffe2/third_party/protobuf/cmake: is a directory

  1. Description: Those two are related and all because that you failed to build the caffe2 ios and check this folder architecture to validate your build (you should be able to see the caffe2.pb.h)

  2. Debug and how to fix it: Mostly, the root cause is that your cmake is broken (not broken broken, more like configuration/path changed by other services/software) and you probably wanna run brew install cmake to reinstall it

Load model failed or thread killed in the mid

  1. Error Message: Reading dangerously large protocol message. If the message turns out to be larger than 67108864 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.

  2. Description: As you can see in the caffe2 repo, that they reduced the protobuf, which is the tool they use to hanlde the communication down to version 3.1.0 and only have 64MB limit. Therefore, when you load a model larger than that, boooooomb, memory exploed and thread got killed.

  3. Debug and how to fix it:

    • [X] After you download and build the caffe2, hold on and modify something to increase the limit first

    • [X] Find this file, which is the tool they use to hanlde the communication down to version 3.1.0 and only have 64MB and change the limit to whatever you want (also change the warning limit)

    • [X] Then build caffe2-ios and Tada

    • [X] Alternative method see here

Performance

The initial slope is for a static 4KB image, around 50 MB and Note that memory usage in live mode might not be the same as the one shown in Xcode (slightly different). And also, remember the memory data in the app is aggregated and therefore, if you are really interested in checking performance of a specific process, open Xcode :)

memorycomsuptionhighres

More Caffe2 Mobile Models

Check here

Future Work

We have a clear scope for this repo below:

Scope

OtherUseful resources links

Caffe2-on-iOS-install

Caffe2-repo

License

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].