https://github.com/tiagosiebler/caffeclassifiermac
Xcode project implementing the C++ caffe classification sample to build a standalone executable.
https://github.com/tiagosiebler/caffeclassifiermac
caffe cpp image-classification image-recognition machine-learning opencv3
Last synced: 8 months ago
JSON representation
Xcode project implementing the C++ caffe classification sample to build a standalone executable.
- Host: GitHub
- URL: https://github.com/tiagosiebler/caffeclassifiermac
- Owner: tiagosiebler
- Created: 2017-10-05T20:14:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-05T20:19:08.000Z (almost 9 years ago)
- Last Synced: 2024-12-28T04:44:40.305Z (over 1 year ago)
- Topics: caffe, cpp, image-classification, image-recognition, machine-learning, opencv3
- Language: C++
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Card Classifier
Use pretrained neural networks to estimate what playing card is currently given via image. Output returns top 5 matches, each with degree of certainty.
Example output:
```[
{ "value": 0.9929, "match":"8c"}
,
{ "value": 0.0071, "match":"8s"}
,
{ "value": 0.0000, "match":"8h"}
,
{ "value": 0.0000, "match":"8d"}
,
{ "value": 0.0000, "match":" noise"}
]
```
## Prerequisites
- OpenCV 3
- Caffe
- libboost_system (brew install boost)
- libglog (brew install glog)
### Caffe Notes
In the Makefile.config, ensure the following is present and uncommented:
```CPU_ONLY := 1
OPENCV_VERSION := 3
BLAS_INCLUDE := $(shell brew --prefix openblas)/include
BLAS_LIB := $(shell brew --prefix openblas)/lib
```
Then:
```make all -j8
make test -j8
make runtest
make distribute -j8
```
## Usage
`CaffeClassifier deploy.prototxt network.caffemodel mean.binaryproto labels.txt targetImage.jpg`
## Notes
- This process is too slow to be used in a live scenario, but can be used to build a dictionary for later access. Assuming there is a limited dataset.
- This Xcode project is heavily based on the C++ classification example from the Caffe repo by the Berkeley Vision and Learning Center: https://github.com/BVLC/caffe/blob/master/examples/cpp_classification/classification.cpp