Git Product home page Git Product logo

sketch-r2cnn's Introduction

Sketch-R2CNN: An RNN-Rasterization-CNN Architecture for Vector Sketch Recognition

By Lei Li, Changqing Zou, Youyi Zheng, Qingkun Su, Hongbo Fu, and Chiew-Lan Tai. (TVCG 2020)

Sketches in existing large-scale datasets like the recent QuickDraw collection are often stored in a vector format, with strokes consisting of sequentially sampled points. However, most existing sketch recognition methods rasterize vector sketches as binary images and then adopt image classification techniques. In this paper, we propose a novel end-to-end single-branch network architecture RNN-Rasterization-CNN (Sketch-R2CNN for short) to fully leverage the vector format of sketches for recognition. Sketch-R2CNN takes a vector sketch as input and uses an RNN for extracting per-point features in the vector space. We then develop a neural line rasterization module to convert the vector sketch and the per-point features to multi-channel point feature maps, which are subsequently fed to a CNN for extracting convolutional features in the pixel space. Our neural line rasterization module is designed in a differentiable way for end-to-end learning. We perform experiments on existing large-scale sketch recognition datasets and show that the RNN-Rasterization design brings consistent improvement over CNN baselines and that Sketch-R2CNN substantially outperforms the state-of-the-art methods.

pipeline

Link

Paper

Citation

@article{Li_2020_TVCG,
    title = {{Sketch-R2CNN}: An RNN-Rasterization-CNN Architecture for Vector Sketch Recognition},
    author = {Li, Lei and Zou, Changqing and Zheng, Youyi and Su, Qingkun and Fu, Hongbo and Tai, Chiew-Lan},
    journal = {IEEE Transactions on Visualization and Computer Graphics},
    year = {2020},
    volume = {},
    pages = {1--1},
    doi = {10.1109/TVCG.2020.2987626},
}

Instructions

Dependencies

  • CUDA
  • Docker: use docker/build.sh to build a Docker image that includes a complete running environment.

(Or you may create a Python3 environment according to the instructions in docker/Dockerfile.)

QuickDraw Dataset

Training

Download the QuickDraw data from here. Use tools/quickdraw_to_hdf5.ipynb to preprocess the data and generate corresponding hdf5 files.

Go to folder scripts. Fill the paths in quickdraw_r2cnn_train.sh and then run

sh quickdraw_r2cnn_train.sh

A copy of the trained weights can be downloaded from here (file TrainedWeights.zip).

Evaluation

The preprocessed data can be downloaded from here (folder QuickDraw). If you use these data in your work, please consider citing [1].

Go to folder scripts. Fill the paths in quickdraw_r2cnn_eval.sh and then run

sh quickdraw_r2cnn_eval.sh

TUBerlin Dataset

Download the preprocessed data from here (file TUBerlin.pkl). If you use these data in your work, please consider citing [2].

Training

Go to folder scripts. Fill the paths in tuberlin_r2cnn_train.sh and then run

sh tuberlin_r2cnn_train.sh

A copy of the trained weights can be downloaded from here (file TrainedWeights.zip).

Evaluation

Go to folder scripts. Fill the paths in tuberlin_r2cnn_eval.sh and then run

sh tuberlin_r2cnn_eval.sh

References

  1. Ha and Eck. A Neural Representation of Sketch Drawings. ICLR 2018.
  2. Eitz et al. How Do Humans Sketch Objects? TOG 2012.
  3. Kato et al. Neural 3D Mesh Renderer. CVPR 2018.

sketch-r2cnn's People

Contributors

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