Lab Assignment 6 Android Application using Spark API and Clarifai API and Image Classification using fuzzy algorithm - rashmitripathi/Big_Data_Analytics_And_Apps GitHub Wiki

1.Write a spark program for the following Machine Learning Task.

##Create your own dataset for Image Classification/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.

As part of this, we have used Decision Tree and Random Forest for image classification and object detection.Fuzzy classification is the process of grouping elements into a fuzzy set.Fuzzy sets are sets whose elements have degrees of membership. The cartoon video is processed against JPG images as shown in below screenshots:

Input Data

Object Detection

Feature extraction for cartoon.jpg file

Confusion Matrix and Accuracy using Random Forest

Accuracy is 33%

Confusion Matrix and Accuracy using Decision Tree

##2.Write an Android application

1) Image classification (fuzzy) and object detection through the Spark API

I have done it using Ionic framework as there was ajax request to localhost. The same has been tested for both android and ios platform. Image classfication has been done using Random forest algorithm and Server returned the image prediction accordingly.

HomePage:

Running Spark API on android:

Output:

Correct Prediction using Spark API:

Incorrect Prediction using Spark API:

2) Image classification/object detection using Clarifai API https://www.clarifai.com/api

The following source code uses Clarifai API for Image Classification.

###Clarifai Android Output

Home Page:

Loading Images from Gallery :

Output:

References

Class tutorial