All Projects → amr4i → EmotionDetection

amr4i / EmotionDetection

Licence: other
An emotion extraction system for images, that extracts emotion which will be felt by the user of viewing the image, representing them in a 2-Dimensional space that represents Arousal and Valence.

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to EmotionDetection

react-simple-image-viewer
Simple image viewer component for React
Stars: ✭ 44 (+69.23%)
Mutual labels:  images
spaceholder
🌅 Download placeholder images from public domain sources blazingly fast
Stars: ✭ 24 (-7.69%)
Mutual labels:  images
Image-Processing-Library
Library for processing and manipulating images.
Stars: ✭ 36 (+38.46%)
Mutual labels:  images
Duplicate-Image-Finder
difPy - Python package for finding duplicate or similar images within folders
Stars: ✭ 187 (+619.23%)
Mutual labels:  images
cineast
Cineast is a multi-feature content-based mulitmedia retrieval engine. It is capable of retrieving images, audio- and video sequences as well as 3d models based on edge or color sketches, textual descriptions and example objects.
Stars: ✭ 51 (+96.15%)
Mutual labels:  images
icons
a collection of custom icons for use with the notion-enhancer's "icon sets" integration
Stars: ✭ 29 (+11.54%)
Mutual labels:  images
android-doc-picker
A simple and easy to use documents Picker android library. Choose any documents like pdf, ppt, text, word or media files from your device
Stars: ✭ 37 (+42.31%)
Mutual labels:  images
wp-github-gos
利用 github api 实现的一个存储图片/附件的 wordpress 插件
Stars: ✭ 42 (+61.54%)
Mutual labels:  images
ImageUI
A photo browser inspired by Apple Photos app
Stars: ✭ 44 (+69.23%)
Mutual labels:  images
Waifu2x-Image-Saver
A Firefox extension to download any image and process them with Waifu2x with one click.
Stars: ✭ 13 (-50%)
Mutual labels:  images
cybernode-archive
🚀 Manager of docker images for cybernomics
Stars: ✭ 20 (-23.08%)
Mutual labels:  images
sora
A simple library to display images in Jupyter notebooks
Stars: ✭ 15 (-42.31%)
Mutual labels:  images
Project-Padoru
Collection of Padoru Images
Stars: ✭ 20 (-23.08%)
Mutual labels:  images
imgs-upload-srv
【Released】🌁一款以图片管理为核心的图床。在众多上传的图片中管理自己的图片,分类它们,贴上标签...以便以后精确管理。提供简单分享&在线外链("仅存储"&UI2.x功能正在进行中)。🌹
Stars: ✭ 73 (+180.77%)
Mutual labels:  images
gatsby-remark-images-anywhere
Handle images with relative, absolute & remote path for gatsby-transformer-remark & gatsby-plugin-mdx
Stars: ✭ 22 (-15.38%)
Mutual labels:  images
Walt
🎬 A Swift 3 library for creating gifs and videos from a series of images
Stars: ✭ 44 (+69.23%)
Mutual labels:  images
django-content-gallery
A Django application allows to attach a collection of images to objects of any model in any app
Stars: ✭ 18 (-30.77%)
Mutual labels:  images
image-storage
🌠 Image storage for Nette framework
Stars: ✭ 27 (+3.85%)
Mutual labels:  images
docker-bakery
Dockerfile hierarchy management tool with automatic rebuilding of dependent images when parent changes
Stars: ✭ 30 (+15.38%)
Mutual labels:  images
car-logos-dataset
Collection of 374 car logos images with few variations of sizes and JSON file for better usability.
Stars: ✭ 47 (+80.77%)
Mutual labels:  images

EmotionDetection

This is a python implementation for extracting arousal and valence values from images, as presented in the work: Building Emotional Machines: Recognizing Image Emotions through Deep Neural Networks by Hye-Rin Kim, Yeong-Seok Kim, Seon Joo Kim, In-Kwon Lee.

Pre-requisites

  1. Make sure openCV is installed on both python and C++. Here is a tutorial to installing OpenCV on C++.
  2. Tensorflow
  3. scikit-learn

Instructions

Training

  1. To avoid loading of model weights again and again, we first pre-compute certain features for all images, that will be used in making the feature vector of the image.

    • GIST Feature Extraction:

      • Run the code segment:
       	cd GIST 
       	make IMAGEPATH=<path_to_directory_containing_all_images>
       	make clean
      
      • This will create a file in the main folder named gists.txt, that contains the GIST descriptor of each image, one per line, in the format: <FILENAME>:<GIST_Descriptor>
    • VGG Object Feature Extraction:

      • For the following command, imageFile = a file containing names of images and their A/V values separated by a comma, and imagesDir = the folder containing all training images. Run the code segment:

         	cd VGG
         	python vgg16.py <imageFile> <imagesDir> <VGG_weights>
        
      • This will create a pickle in the main folder named vgg.pickle, that holds a python dictionary with names of images being mapped to their VGG object features.

      • More information about this VGG Descriptor can be found here.

    • Semantic Features Extraction:

      • Run the file test.py in the semantic_features folder, providing 4 python arguments, namely: test_img_file, test_img_directory, weights_encoder and weights_decoder.
  2. Now, using these extracted features, and more (LBP features), we will be constructing a feature vector for each training image.

  3. Set the training parameters in the file params.json, as required.

  4. Run the training file:

	python train.py <imageFile> <imagesDir>
  1. This will store the model in a modelData named directory, in the parent directory of the current folder. The name of folder in which contains a timestamp that will be used to recognise the stored model during the prediction.

Prediction

  1. Again, go through the entire process of feature exrraction for the images for which the prediction needs to be made.

  2. Set the prediction parameters in the file test_params.json, as required.

  3. Run the prediction code:

	python predict.py <testImageFile> <testImgDir> <timestamp>

where testImageFile=file containing names of all images to be predicted for, testImgDir=directory containing all images to predicted for, timestamp=the timestamp of the model to be used for prediction.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].