Giter VIP home page Giter VIP logo

nlp2021's Introduction

nlp2021

Final project of DL4NLP 2021 ZJU

preprocess

image

Extract object-detection features of each image using fast r-cnn model

The tidy process Refers to def process_image_feature

Zipped File contains features of:

train_set: 32077 images

val_set: 15682 images

test_set: 15718 images

feature shape: (2048, 36)

# to download the Zip file
# visit https://pan.zju.edu.cn/share/c7fb4d569d8efd00b55014ed33
# unzip and use h5py to read

text

Process the question and answer text Refers to def process_vocab and def encode_question and def encode_answer

The vocab file will be saved at ./vocab/*.json

mindspore dataset

Generate mindspore dataset and Save to Mindrecord file Refers to def gen_mindspore_dataset

A single sample format will be:

{
    'question_id': 393226002, 
    'image_id': 393226, 
    'question': array([3, 14, 1, 113, 7, 1, 68, 1192, 4877, 4877, 4877,4877, 4877, 4877, 4877, 4877, 4877, 4877, 4877]), 
    'answer': [489, 489, 489, 489, 489, 489, 489, 489, 489, 489], 
    'answer_counter': {489: 10}, 
    'answer_label': 489
}

nlp2021's People

Contributors

qianlonglonglong avatar rsgok avatar mccarrtney avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

wheltz

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.