Coder Social home page Coder Social logo

deepsentibank's Introduction

Use under BSD Lisence.
Run python sentiBank.py, it will explain itself. CPU/GPU are both supported.
You can run the example image by:
python sentiBank.py test_image.jpg

The output should be a json file, containing 2,089 ranked concept scores, and a 4096-dimension feature (fc7).

Under windows 7+, you can probably run above command directly. Otherwise you may need to compile Caffe. 
Before compiling, put the extract_nfeatures.cpp under caffe/tools. After compiling, copy/link caffe/build/tools/extract_nfeatures.bin or exe to DeepSentiBank folder.
There is also a .m file that can read the raw feature file (fc7.dat prob.dat) generated from the executable extract_nfeatures. into matlab.

Please cite:
@article{chen2014deepsentibank,
  title={Deepsentibank: Visual sentiment concept classification with deep convolutional neural networks},
  author={Chen, Tao and Borth, Damian and Darrell, Trevor and Chang, Shih-Fu},
  journal={arXiv preprint arXiv:1410.8586},
  year={2014}
}

ubuntu 17.04 or greater {

sudo apt-get install libboost-dev
sudo apt-get install libcaffe-cpu-dev
sudo apt-get install libgflags-dev
sudo apt install libgoogle-glog-dev

}

nvcc extract_nfeatures.cpp -o extract_nfeatures -lprotobuf -lglog -lpthread -lboost_system -lcaffe

python sentiBank.py test_vso/image_path_list.txt GPU 0

GPU LIB REQ:
cuda 10.2
cublas
cudnn 7.5 for 10.2

caffe compilation requires latest version of cmake.

caffe installtion link
https://caffe.berkeleyvision.org/install_apt.html

Original Source Code and weight files are available at 
https://www.dropbox.com/sh/kzqkd7c94aarijd/AADzE0r19XpvzBw_K5Bbeq1Da?dl=0&file_subpath=%2FDeepSentiBank&preview=DeepSentiBank_works_with_Caffe_rc2.zip

For multiple Images:
Usage: python sentiBank.py image_path/image_path_list.txt [CPU/GPU] [DEVICE_ID=0]

deepsentibank's People

Contributors

stephen-pilli avatar

Watchers

James Cloos avatar

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.