Giter Site home page Giter Site logo

cs8524-pictureteller's Introduction

cs8524-pictureteller

This project lets user upload images and return a related sentence.

Getting Started

Prerequisites

Java 8
Maven
Python 2.7
Numpy
PyTorch
pycocotools

Built With

  • Maven - Dependency Management

Download Pretrained model and Vocabulary

If you do not want to train the model from scratch, you can use a pretrained model. You can download the pretrained model here and the vocabulary file here. You should extract pretrained_model.zip to ./image_caption/models/ and vocab.pkl to ./image_caption/data/ using unzip command.

How to run an example?

First of all, git clone --recurse-submodules -j8 our project and cd to the current project,

git clone --recurse-submodules -j8 https://github.com/yaodongyu/cs8524-pictureteller.git
cd cs8524-pictureteller

0. Download Pretrained model and Vocabulary

Download the pretrained model here and the vocabulary file here.

Extract pretrained_model.zip to ./image_caption/models/ and vocab.pkl to ./image_caption/data/ using unzip command.

1. Package this project

mvn package

2. Move the .jar file under cs8524-pictureteller/

mv target/pictureteller-0.0.1-SNAPSHOT.jar .

3. Deployment

java -jar pictureteller-0.0.1-SNAPSHOT.jar

4. Open a browser and have fun

1). To browse the landing page, type

localhost:8080

2). To initialize a new user, type

localhost:8080/user/new

3). To add an image to user #id, such as user 1, type

localhost:8080/user/1/image

4). To show an image of user #id, such as user 1, type

localhost:8080/user/1/show

5. How to use the h2 database?

1). Open h2 console

localhost:8080/h2-console

2). Enter user name and related information, where

spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.url=jdbc:h2:file:c:/temp/rcp_h2
spring.datasource.username=sa
spring.datasource.password=

cs8524-pictureteller's People

Contributors

yaodongyu avatar minggong94 avatar betterkaren 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.