Lab Assignment 3 - GeoSnipes/Big-Data GitHub Wiki

Sub-Team Members

5-2 15 Naga Venkata Satya Pranoop Mutha

5-2 23 Geovanni West

Lab 3 Part 1

Use the project dataset for Image Classification or Object Detection Problem. Handle fuzzy classification/ object detection task using at least two classification algorithms (e.g., Decision Tree, Random Forest, Naïve Bayes). Report the accuracy and confusion matrix obtained.In the Wiki Page, include a brief description of your dataset and your approach and results for image classification.

Decision Tree Model

Decision Trees (DTs) are a form of non-parametric supervised learning method used in classification and regression machine learning. The main objective is to develop a model that predicts the value of a target variable by learning simple decision rules inferred from the data features.

Random Forest Model

Random forests use forms an ensemble technique for either classification or regression problems. They operate by creating numerous decision tree and give you the best tree with the best result.

Naive Bayes Model

Naive Bayes classifiers are a family of simple probabilistic classifiers based on applying Bayes theorem with strong independence assumptions between the features.

Confusion Matrix

A confusion matrix is a tabular representation of the performance of a classification model on a set of test data for which the true values are known.

First, we ran our feature extraction on our three categories of training images: pizza, fries, and hamburgers. These categories are just a small sample of what will be in our final project

And these produced this features file.

We then ran our object detection program on our sample video. It successfully found the images and showed them in a box. An example of object detection is:

Now we ran the decision tree model and confusion matrix and accuracy was generated based on our model.

Now we ran the random forrest model and confusion matrix and accuracy was generated based on our model.

Now we ran the naive bayes model and confusion matrix and accuracy was generated based on our model.

Note: Models need a lot more training data to actually produce a good accuracy rating. Based on our dataset, based on our dataset, the accuracies given are not acceptable. A lot more training dataset is needed.

Lab 3 Part 2

a. Image classification/object detection using Clarifai API

Clarifai API: This is a powerful visual recognition API. Its main features are:

  • Automatically tag our images and video by content. It searches and analyzes our visual data without relying on additional text descriptions.
  • We can even find similar images too.

To generate the API key for Clarifai, we go to

This is the source code in Android for calling Clarifai API:

Home Page:

Selecting Photos from Gallery or Local:

Outputs for various examples:

Output 1: Driving License Board

Output 2: Place with flag

Output 3: Bicycle

Click here for Source Code

⚠️ ** Fallback** ⚠️