Skip to content

Used PCA for dimension reduction of a 25x25 animal image dataset. After the feature extraction step, a KNN classifier to distinguish the images in a 3D plane (3PC extraction). PCA and KNN are implemented from scratch. Matplot is used for 3D visualization.

Notifications You must be signed in to change notification settings

shreyash0023/PCA-Based-Image-Classifier-

Repository files navigation

Programming Language Used: Python 3.7 :: Anaconda, Inc.

Requirements

Python ==3.7.1 numpy ==1.11.0 pandas ==0.23.4 Pillow ==6.0.0 matplotlib ==3.0.3

Dataset Structure

Fruit Data Set: In folder resized_fruits. This is subfolders for each fruit category. Animal Data Set: In folder resized. This is subfolders for each animal category.

Testing data: resized_animals_test resized_fruit_test

Code Structure

FOR PCA Based Image Classifier Uses PCA based dimension reduction on the dataset specified. Code for both the datasets is given. Uncomment to specify which dataset are you going to use. The file runs default on animal dataset in the folder resized.

How to run: python <file_name>.py

FOR Image Resizing for PCA Image resizing if needed!

How to run: python <file_name>.py

For a detailed implementaion overview, check PCA Based Animal Recognition.docx

About

Used PCA for dimension reduction of a 25x25 animal image dataset. After the feature extraction step, a KNN classifier to distinguish the images in a 3D plane (3PC extraction). PCA and KNN are implemented from scratch. Matplot is used for 3D visualization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages