Code Monkey home page Code Monkey logo

image_classification's Introduction

Image Classification With Tensorflow

This is a project for the Machine Learning Course by Prof.Luca Iocchi and Prof.Valsamis Ntouskos @ Sapienza University di Roma

Data set used:

Maritime Detection, Classification and tracking data set and can be downloaded from http://www.dis.uniroma1.it/~labrococo/MAR/classification.htm The training set contains images from 24 different categories of boats navigating in the City of Venice (Italy). The .rar file contains a folder for each category. The jpeg files inside the folders are named according to the date, hour, and system track number. The folder "Water" contains false positives

Let's begin!!

Install needed libraries

1.Tensorflow
https://www.tensorflow.org/install/install_linux

2.Pandas
pip install pandas

3.Numpy
pip install numpy

4.clone this repo
git clone [email protected]:adiltirur1/Image_classification.git

Getting the data sets ready

Copy the training and testing data set in to
/image_classifier/supporting_files/data_set

Let's Train the classifier

from the root directory of this repository run the command


python -m code.retrain --bottleneck_dir=supporting_files/bottlenecks --how_many_training_steps=500 --model_dir=supporting_files/models/ --summaries_dir=supporting_files/training_summaries/"${ARCHITECTURE}" --output_graph=supporting_files/retrained_graph.pb --output_labels=supporting_files/retrained_labels.txt --inception_v3 --image_dir=supporting_files/sc5

yesss!! The training is done and it shows you the estimated accuracy

Now Let us check the accuracy with the testing data set

Let us run the classifier on the testing data set and check the output

from the root directory again run the following command from the root directory again run the following command


python -m code.bulk_classify --graph=supporting_files/retrained_graph.pb

As an output of the above program, there will be a csv file created image_classification/supporting_files/results/pre_result.csv

This csv file contain the predicted output and the actual output according to the ground truth seperated by ','

Now calculate the accuracy of the bulk_prediction

navigate to
image_classification/code

Run the command


python accuracy.py


That's it, Now we have the total accuracy and an output file is created.
image_classification/supporting_files/results/final_result.csv that contains the prediction, actual output and the comparison result of actual output with the prediction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.