Giter VIP home page Giter VIP logo

fashion-mmt's Introduction

Product-oriented Machine Translation with Cross-modal Cross-lingual Pre-training

This repository contains the Fashion-MMT dataset and PyTorch implementation of our paper Product-oriented Machine Translation with Cross-modal Cross-lingual Pre-training (ACMMM 2021 Oral).

Requirements

  • Python 3.6
  • Java 15.0.2
  • PyTorch 1.1
  • numpy, tqdm, h5py, scipy, six

Fashion-MMT Dataset

Annotations

Annotations of Fashion-MMT(C) and Fashion-MMT(L) datasets can be downloaded from BaiduNetdisk (code: i55n).

JSON Format:
[
  {
    "id": int,
    "split": str,
    "en": str,
    "zh": str,
    "images": [str],
    "category": str,
    "attr": [str]
  }
]

The images can be downloaded from the url https://n.nordstrommedia.com/id/sr3/image_name with image_names.

Features

We also provide the image features of ResNet101 pretrained on ImageNet and finetuned on Fashion-MMT at BaiduNetdisk (code: i55n)ļ¼ˆ~57Gļ¼‰. Decompress and merge the downloaded features into one folder:

$ cat resnet101.finetune.tar.gz* | tar -xz

Training & Inference

Start training

  1. Pre-train the model with three pre-training tasks
$ CUDA_VISIBLE_DEVICES=0 python train.py ../results/pretrain/model.json ../results/pretrain/path.json --is_train
  1. Fine-tune the model to MMT
$ CUDA_VISIBLE_DEVICES=0 python train.py ../results/finetune/model.json ../results/finetune/path.json --is_train --resume_file ../results/pretrain/model/step.*.th

Evaluation

$ CUDA_VISIBLE_DEVICES=0 python train.py ../results/finetune/model.json ../results/finetune/path.json --eval_set val --resume_file ../results/finetune/model/step.*.th

Reference

If you find this repo helpful, please consider citing:

@inproceedings{song2021FashionMMT,
  title={Product-oriented Machine Translation with Cross-modal Cross-lingual Pre-training},
  author={Song, Yuqing and Chen, Shizhe and Jin, Qin and Luo, Wei and Xie, Jun and Huang, Fei},
  booktitle={Proceedings of the 29th {ACM} International Conference on Multimedia},
  year={2021}
}

fashion-mmt's People

Contributors

syuqings 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.