All Projects → PengBoXiangShang → Torchsketch

PengBoXiangShang / Torchsketch

Licence: mit

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Torchsketch

Deep Music Genre Classification
🎵 Using Deep Learning to Categorize Music as Time Progresses Through Spectrogram Analysis
Stars: ✭ 23 (-79.65%)
Mutual labels:  cnn, rnn
Deepseqslam
The Official Deep Learning Framework for Route-based Place Recognition
Stars: ✭ 49 (-56.64%)
Mutual labels:  cnn, rnn
Deepfakes video classification
Deepfakes Video classification via CNN, LSTM, C3D and triplets
Stars: ✭ 24 (-78.76%)
Mutual labels:  cnn, rnn
Mnist Classification
Pytorch、Scikit-learn实现多种分类方法,包括逻辑回归(Logistic Regression)、多层感知机(MLP)、支持向量机(SVM)、K近邻(KNN)、CNN、RNN,极简代码适合新手小白入门,附英文实验报告(ACM模板)
Stars: ✭ 109 (-3.54%)
Mutual labels:  cnn, rnn
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-15.04%)
Mutual labels:  cnn, rnn
Tensorflow cookbook
Code for Tensorflow Machine Learning Cookbook
Stars: ✭ 5,984 (+5195.58%)
Mutual labels:  cnn, rnn
Neural Networks
All about Neural Networks!
Stars: ✭ 34 (-69.91%)
Mutual labels:  cnn, rnn
Deeplearning
深度学习入门教程, 优秀文章, Deep Learning Tutorial
Stars: ✭ 6,783 (+5902.65%)
Mutual labels:  cnn, rnn
Cnn lstm for text classify
CNN, LSTM, NBOW, fasttext 中文文本分类
Stars: ✭ 90 (-20.35%)
Mutual labels:  cnn, rnn
Sleepeegnet
SleepEEGNet: Automated Sleep Stage Scoring with Sequence to Sequence Deep Learning Approach
Stars: ✭ 89 (-21.24%)
Mutual labels:  cnn, rnn
Multi Class Text Classification Cnn Rnn
Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow.
Stars: ✭ 570 (+404.42%)
Mutual labels:  cnn, rnn
Captcharecognition
End-to-end variable length Captcha recognition using CNN+RNN+Attention/CTC (pytorch implementation). 端到端的不定长验证码识别
Stars: ✭ 97 (-14.16%)
Mutual labels:  cnn, rnn
How To Learn Deep Learning
A top-down, practical guide to learn AI, Deep learning and Machine Learning.
Stars: ✭ 544 (+381.42%)
Mutual labels:  cnn, rnn
Eda nlp
Data augmentation for NLP, presented at EMNLP 2019
Stars: ✭ 902 (+698.23%)
Mutual labels:  cnn, rnn
Video Classification
Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
Stars: ✭ 543 (+380.53%)
Mutual labels:  cnn, rnn
Rnn Theano
使用Theano实现的一些RNN代码,包括最基本的RNN,LSTM,以及部分Attention模型,如论文MLSTM等
Stars: ✭ 31 (-72.57%)
Mutual labels:  cnn, rnn
Tsai
Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai
Stars: ✭ 407 (+260.18%)
Mutual labels:  cnn, rnn
Tensorflow Tutorial
Tensorflow tutorial from basic to hard, 莫烦Python 中文AI教学
Stars: ✭ 4,122 (+3547.79%)
Mutual labels:  cnn, rnn
Nlp overview
Overview of Modern Deep Learning Techniques Applied to Natural Language Processing
Stars: ✭ 1,104 (+876.99%)
Mutual labels:  cnn, rnn
Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-14.16%)
Mutual labels:  cnn, rnn

TorchSketch

PyPI

TorchSketch is an open source software library for free-hand sketch oriented deep learning research, which is built on the top of PyTorch.

The project is under continuous update!

1. Installation

TorchSketch is developed based on Python 3.7.

To avoid any conflicts with your existing Python setup, it's better to install TorchSketch into a standalone environment, e.g., an Anaconda virtual environment.

Assume that you have installed Anaconda. Please create a virtual environment before installation of TorchSketch, as follows.

# Create a virtual environment in Anaconda.
conda create --name ${CUSTOMIZED_ENVIRONMENT_NAME} python=3.7

# Activate it.
conda activate ${CUSTOMIZED_ENVIRONMENT_NAME}

1.1 Using pip

Please use the following command to install TorchSketch.

pip install torchsketch

Then, TorchSketch can be imported into your Python console as follows.

import torchsketch

If you are using MacOS, you may need cairo and pango installed. You can install them with homebrew

brew install cairo
brew install pango

1.2 From Source

In addition, TorchSketch also can be installed from source.

# Choose your workspace and download this repository.
cd ${CUSTOMIZED_WORKSPACE}
git clone https://github.com/PengBoXiangShang/torchsketch

# Enter the folder of TorchSketch.
cd torchsketch

# Install.
python setup.py install

2. Major Modules and Features of TorchSketch

2.1 Major Modules

TorchSketch has three main modules, including data, networks, utils, as shown in follows. The documents and example codes are provided in docs.

  • torchsketch
    • data
      • dataloaders: provides the dataloader class files for the frequently-used sketch datasets, e.g., TU-Berlin, Sketchy, QuickDraw.
      • datasets: provides the specific API for each dataset, which integrates a series of functions including downloading, extraction, cleaning, MD5 checksum, and other preprocessings.
    • networks
      • cnn: provides all the SOTA CNNs.
      • gnn: provides the sketch-applicable implementations of GNNs, including GCN, GAT, graph transformer, etc.
      • rnn: provides the sketch-applicable implementations of RNNs.
      • tcn: provides the sketch-applicable implementations of TCNs.
    • utils
      • data_augmentation_utils
      • general_utils
      • metric_utils
      • self_supervised_utils
      • svg_specific_utils
    • docs
      • api_reference
      • examples

These modules and sub-modules can be imported as follows.

import torchsketch.data.dataloaders as dataloaders
import torchsketch.data.datasets as datasets

import torchsketch.networks.cnn as cnns
import torchsketch.networks.gnn as gnns
import torchsketch.networks.rnn as rnns
import torchsketch.networks.tcn as tcns

import torchsketch.utils.data_augmentation_utils as data_augmentation_utils
import torchsketch.utils.general_utils as general_utils
import torchsketch.utils.metric_utils as metric_utils
import torchsketch.utils.self_supervised_utils as self_supervised_utils
import torchsketch.utils.svg_specific_utils as svg_specific_utils

As shown in the following figure, a general PyTorch-based code project mainly includes four blocks, i.e., preparing data, preparing data loader, creating network/model, and training. The functions/APIs built-in torchsketch.utils are designed orienting at all four blocks. When researchers would prepare data and data loader, they could select functions/APIs from torchsketch.data. When researchers would create a network, they could select network classes from torchsketch.networks.

2.2 Major Features

  • TorchSketch supports both GPU based and Python built-in multi-processing acceleration.
  • TorchSketch is modular, flexible, and extensible, without overly complex design patterns and excessive encapsulation.
  • TorchSketch provides four kinds of network architectures that are applicable to sketch, i.e., CNN, RNN, GNN, TCN.
  • TorchSketch is compatible to not only numerous datasets but also various formats of free-hand sketch, e.g., SVG, NumPy, PNG, JPEG, by providing numerous format-convert APIs, format-specific APIs, etc.
  • TorchSketch supports self-supervised learning study for sketch.
  • TorchSketch, beyond free-hand sketch research, also has some universal components that are applicable to the studies for other deep learning topics.

Citations

If you find this code useful, please cite our paper "Deep Learning for Free-Hand Sketch: A Survey" (https://arxiv.org/abs/2001.02600):

License

This project is licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].