Git Product home page Git Product logo

macon's Introduction

MaCon

Implementation and dataset of AAAI 2019 paper: Hashtag Recommendation for Photo Sharing Services

Intro

MaCon is a deep neural network model used to recommend hashtags for posts in photo sharing services (e.g., Instagram). It takes image, text, and user id as inputs and outputs top K tag recommendations.

In this repository, we provide the code of MaCon, as well as the dataset crawled from Instagram.These materials are also used in experiments reported in our AAAI paper.

Details

  • MaCon.py

The main program of our model. It contains data loading module, training module, as well as test module. After all the data get prepared, you can directly execute this script.

  • img_feature.py

Image feature extraction program. Image feature extraction is part of the data pre-processing. This program process all the images in the dataset and extracts their feature vectors with pre-trained VGG-16 network provided by Keras, which is trained on ImageNet.

The feature vectors are stored in a h5 file and key is the filename of each image file.

  • selfDef.py

Some self-defined Keras layers and functions used in MaCon.

  • data

All data needed in our model.

Usage

  • Data split:

In this step, we will divide the data into training set, test set and user history sample set. Make sure that dataSplit.py and Instagram.data are under the same dictionary. Execute the python script:

python dataSplit.py
  • Image feature extraction:

We extract feature vector of all images in this dataset with img_feature.py.

python img_feature.py

The feature vectors are stored in a h5 file which can be indexed with filename.

  • Training and evaluation

When data preparations are done, run Macon.py:

python MaCon.py

Evaluation metrics in training process are recorded in record_userHist_EMBED_NUMHIST.txt And model is stored in model_best_EMBED_NUMHIST.h5

Requirements

  • Python 3.6
  • TensorFlow >= 1.7
  • Keras >= 2.1.5
  • h5py >= 2.7.1

Citing

If you find our work or dataset useful in your research, please cite the following paper:

@inproceedings{zhangMaCon2018,
 author = {Suwei Zhang, Yuan Yao, Feng Xu, Hanghang Tong, Xiaohui Yan, Jian Lu},
 title = {Hashtag Recommendation for Photo Sharing Services},
 booktitle = {33rd AAAI Conference on Artificial Intelligence},
 year = {2019},
}

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.