lab6assignment - naveenanallamotu/Big-Data-Analytics-Lab-Assignments GitHub Wiki
This project is about classifying the images with fuzzy classification
Fuzzy Classification: Fuzzy classification is the process of grouping elements into a fuzzy set[1] whose membership function is defined by the truth value of a fuzzy propositional function
Fuzzy propositional function: A fuzzy propositional function is, analogous to,[5] an expression containing one or more variables, such that, when values are assigned to these variables, the expression becomes a fuzzy proposition in the sense of.
Dataset: My data set consists of images of cars, aeroplane, and people and also included the sample video which contains all of the three. By feature extraction program we need to extract the feature descriptor from the project and save them in a text file. Input Data folder contains the video and the related images to the video
Output for feature extraction: The output folder contains the text files which have features describing the images Aeroplane.txt Car.txt people.txt
Image classification:
The image classification contains the fuzzy classification of the file with two algorithms, Decision tree, and the Random Forest model
we are giving the feature descriptor we extracted from the above program.
Decision tree: A decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm.
Random forest model: Random forests or random decision forests[1][2] are an ensemble learning method for classification, regression and other tasks, that operate by constructing a multitude of decision trees at training time and outputting the class that is the mode of the classes (classification) or mean prediction (regression) of the individual trees. Random decision forests correct for decision trees' habit of overfitting to their training set
Data: It contain two types of data, test data and the train data
Test data have the feature extraction of * aeroplane.txt
*car.txt
*people.txt
We did this by using two algorithms
decision tree model:
output confusion matrix:
2.0 : (0,58.74439461883408);
(1,21.076233183856502);
(2,20.179372197309416)
0.0 : (0,63.082778306374884);
(1,18.458610846812558);
(2,18.458610846812558)
1.0 : (0,85.32544378698225);
(1,6.627218934911243);
(2,8.04733727810651)
(0.0,0.0)
(0.0,1.0)
(0.0,2.0)
Accuracy:0.3333333333333333
Confusion Matrix:
1.0 0.0 0.0
1.0 0.0 0.0
1.0 0.0 0.0
Random forest model:
output confusion matrix
2.0 : (0,54.7085201793722);
(1,24.2152466367713);
(2,21.076233183856502)
0.0 : (0,68.03044719314939);
(1,13.225499524262608);
(2,18.744053282588013)
1.0 : (0,90.05917159763314);
(1,2.9585798816568047);
(2,6.982248520710059)
(0.0,0.0)
(0.0,1.0)
(0.0,2.0)
Accuracy:0.3333333333333333
Confusion Matrix:
1.0 0.0 0.0
1.0 0.0 0.0
1.0 0.0 0.0
The accuracy of the both model is 0.333
Android App image classification
This project is creating the android app which classifies the image with Clarifai API
In this Clarifai API has its default model and the test data I send is car and airplane images and it predicted correctly outputs are included in the outputlab6screenshots folder
Image detection in mobile through spark API
A server is running on my computer and the Client program needs to run in the mobile. for this, I connect my server to the mobile through Android APP
First, we need to open a port for 8081 for npm web client and need to run the program in Android Studio and image classification model. The images in client need to be predicted Input: Breeds of dogs. Output: prediction of breed of given dog(Screenshot will be given in the output screenshots folder)
For this, we need to train the data
training data set contains breeds of dogs like the * labrador *Yorkshire *german shep *bulldog I the testing data same file with different images were given and in the mobile browser it is predicting the images