Skip to content

Commit

Permalink
final touch?
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Shilkrot committed Aug 24, 2011
1 parent b7a438c commit 4ba20bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions FoodcamClassifier.xcodeproj/project.pbxproj
Expand Up @@ -158,6 +158,7 @@
D79318141404316D00C2209B /* predict_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = predict_common.cpp; sourceTree = "<group>"; };
D79319E01404990F00C2209B /* foodcam_predict.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = foodcam_predict.cpp; sourceTree = "<group>"; };
D79319F01404991200C2209B /* FoodcamClassifier */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = FoodcamClassifier; sourceTree = BUILT_PRODUCTS_DIR; };
D7931A181404A0EA00C2209B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
D7BC00A313FEE61A004D115F /* libopencv_ml.2.3.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libopencv_ml.2.3.1.dylib; path = usr/local/lib/libopencv_ml.2.3.1.dylib; sourceTree = SDKROOT; };
D7BC014013FF0035004D115F /* FoodcamClassifier */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = FoodcamClassifier; sourceTree = BUILT_PRODUCTS_DIR; };
D7BC01BD13FF3F9F004D115F /* train_bovw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = train_bovw.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -299,6 +300,7 @@
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
D7931A181404A0EA00C2209B /* README */,
D7BC060C1402DB35004D115F /* train_SVM_alone.cpp */,
D7BC02691400182B004D115F /* training.txt */,
08FB7796FE84155DC02AAC07 /* main.cpp */,
Expand Down
7 changes: 6 additions & 1 deletion README
Expand Up @@ -51,7 +51,12 @@ Train the classifiers:

Test your work:
./test-classifiers
(it will output the confusion matrix in neighbors list form)
(it will output a whole lotta things, and then the confusion matrix in neighbors list form)


Put it to work!:
./foodcam-predict some_640x480_image_of_food.png
Will output either one or two found classes of food, based on how close the prediction is.


Notes
Expand Down
1 change: 1 addition & 0 deletions test_classifiers.cpp
Expand Up @@ -25,6 +25,7 @@ int main(int argc, char** argv) {
cout << "total " << lines.size() << " samples to scan" <<endl;

FoodcamPredictor predictor;
predictor.setDebug(true);

map<string,CvSVM>& classes_classifiers = predictor.getClassesClassifiers();
map<string,map<string,int> > confusion_matrix;
Expand Down

0 comments on commit 4ba20bb

Please sign in to comment.