This is the felinemotion repo for CSE583 project
The domestic cat (Feliscatus) is one of the most attractive pets in the world, and it generates mysterious kinds of sound according to its mood and situation.In this software, we deal with the automatic classification of cat emotions using machine learning.
The pet animals are close friends of the human from the time of human evolution, and they deliver their messages by producing some identical sounds. Most pets spend their whole time in human peripheries, thus sound analysis of pet animals is important. Domestic cat is one of the most widely loved pet animals in the world, and the whole population is around 88.3 million, according to the report of Live Science (2013).Understanding cat's emotion can be helpful for human beings in terms of security, prediction of behaviors, and intimate interactions if we are able to recognize them properly.
Due to the time limitation, training data were manually downloaded from youtubes. The video will first be divided into audio dataset and image data sets. After that, CNN and Haar Casade Algorithm are used to extract the required data. Audio datasets and image dataset will then be converted into pixel arrays. Lastly, both datasets will be merged into one csv file.
Support vector machines (SVMs) are a set of supervised learning methods used for classification, regression and outliers detection. The advantages of support vector machines are: 1) Effective in high dimensional spaces; 2) Still effective in cases where number of dimensions is greater than the number of samples; 3) Uses a subset of training points in the decision function (called support vectors), so it is also memory efficient; and 4) Versatile: different Kernel functions can be specified for the decision function. Common kernels are provided, but it is also possible to specify custom kernels.
Linear Support Vector Classification (LinearSVC) is able to perform multi-class classification on a dataset. Similar to SVC with parameter kernel=’linear’, but implemented in terms of liblinear rather than libsvm, so it has more flexibility in the choice of penalties and loss functions and should scale better to large numbers of samples.
Felinemotion (master)
|---Data
|---vid
|---trainingSet
|---raw
|---img
|---trainingSet
|---raw
|---Examples
|---example.ipynb
|---Felinemotion
|---trainingData
|---userData
|---frames
|---audio_test.csv
|---data_test.csv
|---image_test.csv
|userInput.wav
|---cat_detect.py
|---image_analysis.py
|---random_pick_3.py
|---image_output.py
|---main.py
|---audio_create_model.py
|---audio_input.py
|---audio_training.py
|---video_input.py
|---svm.py
|---tests
|---__init__.py
|---unittests.py
|---doc
|---technical_review.pdf
|---Felinemotion_final.pdf
|---functional_specifications.ipynb
|---component_specifications.ipynb
|---DATA_DESCRIPTION.md
|---LICENSE.txt
|---README.md
- Clone the repo
- Install environment
conda env create -f felinemotion.yml
The software are ready to be run.
- Run main.py to let the Python script run in background
- Open Felinemotion.html and upload the video
- After uploading the video, ther will be a notice to open image.html in templates directory
- After open image.html, select and confirm the best image expressing the emotion
- The software will outout an emotion best fit from the data