Skip to content

prajacta-nagraj/Indoor-Outdoor-Scene-Classification

Repository files navigation

Indoor-Outdoor-Scene-Classification

One of the application of image classification is to classify scenes and recognize them according to category. It's use can be ranged from autonomous vehicle navigation to video games.

Dependencies

  • ffmpeg
  • Python
  • Keras(Tensorflow Backend)

Data Handling

To start with the challenge first thing to do is prepare a neat data library with the given classes as outdoor and indoor. Data was taken from Youtube-8m dataset, at first videos were parsed categorically (Ref-https://github.com/gsssrao/youtube-8m-videos-frames) then frames were extracted using ffmpeg. Finally the data was split into train, test and validation sets.

Usage

  • Save the videos categorically in folders indoor and outdoor respectively. Go to each folder and run the Frames bash file with first argument as path and second as number of frames per second.
  • Use Split_data.py file with path to input and output folders.

Training

After the data is prepared, I used CNN to classify images and train the model. Using Image data generator to augment the data and convert image size to 64*64. It neatly takes in the data according to classes. Following model is used to train and validate the images:

Alt text

After trial/error and using early stopping method overfitting was reduced and the model showed accuracy of 80% for test data.

Alt text

Image Classification

To finally test the image run Scene-Classification.py file and provide the test image name when prompted.( test image should be in the current directory with othe saved model). $ python Scene-Classification.py

Future Work

As seen from the above model few changes can be made to increase accuracy of the model including increasing the training data,image augmentation, L1/L2 regularization. We can also include more layers of Dropout in the end.

References

-Youtube-8m dataset -Keras/tensorflow blogs and tutorials on modeling a CNN.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published