All Projects → nanoporetech → Fast Ctc Decode

nanoporetech / Fast Ctc Decode

Licence: mit
Blitzing Fast CTC Beam Search Decoder

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Fast Ctc Decode

minimal-nmt
A minimal nmt example to serve as an seq2seq+attention reference.
Stars: ✭ 36 (-41.94%)
Mutual labels:  beam-search
Image Captioning
Image Captioning using InceptionV3 and beam search
Stars: ✭ 290 (+367.74%)
Mutual labels:  beam-search
Tf Seq2seq
Sequence to sequence learning using TensorFlow.
Stars: ✭ 387 (+524.19%)
Mutual labels:  beam-search
Image-Caption
Using LSTM or Transformer to solve Image Captioning in Pytorch
Stars: ✭ 36 (-41.94%)
Mutual labels:  beam-search
neural-chat
An AI chatbot using seq2seq
Stars: ✭ 30 (-51.61%)
Mutual labels:  beam-search
Seq2seq chatbot
基于seq2seq模型的简单对话系统的tf实现,具有embedding、attention、beam_search等功能,数据集是Cornell Movie Dialogs
Stars: ✭ 308 (+396.77%)
Mutual labels:  beam-search
TS3000 TheChatBOT
Its a social networking chat-bot trained on Reddit dataset . It supports open bounded queries developed on the concept of Neural Machine Translation. Beware of its being sarcastic just like its creator 😝 BDW it uses Pytorch framework and Python3.
Stars: ✭ 20 (-67.74%)
Mutual labels:  beam-search
Chatlearner
A chatbot implemented in TensorFlow based on the seq2seq model, with certain rules integrated.
Stars: ✭ 528 (+751.61%)
Mutual labels:  beam-search
captioning chainer
A fast implementation of Neural Image Caption by Chainer
Stars: ✭ 17 (-72.58%)
Mutual labels:  beam-search
Tf chatbot seq2seq antilm
Seq2seq chatbot with attention and anti-language model to suppress generic response, option for further improve by deep reinforcement learning.
Stars: ✭ 369 (+495.16%)
Mutual labels:  beam-search
transformer
Neutron: A pytorch based implementation of Transformer and its variants.
Stars: ✭ 60 (-3.23%)
Mutual labels:  beam-search
ai-n-queens
Solving and GUI demonstration of traditional N-Queens Problem using Hill Climbing, Simulated Annealing, Local Beam Search, and Genetic Algorithm.
Stars: ✭ 30 (-51.61%)
Mutual labels:  beam-search
Pytorch Chatbot
Pytorch seq2seq chatbot
Stars: ✭ 336 (+441.94%)
Mutual labels:  beam-search
deepQA
a Deep learning based chatbot implemented by Tensorflow with beam search (forked from Conchylicultor/DeepQA)
Stars: ✭ 17 (-72.58%)
Mutual labels:  beam-search
Ctcdecode
PyTorch CTC Decoder bindings
Stars: ✭ 442 (+612.9%)
Mutual labels:  beam-search
rnnt decoder cuda
An efficient implementation of RNN-T Prefix Beam Search in C++/CUDA.
Stars: ✭ 60 (-3.23%)
Mutual labels:  beam-search
Tensorflow end2end speech recognition
End-to-End speech recognition implementation base on TensorFlow (CTC, Attention, and MTL training)
Stars: ✭ 305 (+391.94%)
Mutual labels:  beam-search
Ctcdecoder
Connectionist Temporal Classification (CTC) decoding algorithms: best path, prefix search, beam search and token passing. Implemented in Python.
Stars: ✭ 529 (+753.23%)
Mutual labels:  beam-search
Lightseq
LightSeq: A High Performance Inference Library for Sequence Processing and Generation
Stars: ✭ 501 (+708.06%)
Mutual labels:  beam-search
Im2latex
Image to LaTeX (Seq2seq + Attention with Beam Search) - Tensorflow
Stars: ✭ 342 (+451.61%)
Mutual labels:  beam-search

fast-ctc-decode

test-fast-ctc-decode PyPI version

Blitzing fast CTC decoding library.

$ pip install fast-ctc-decode

Usage

>>> from fast_ctc_decode import beam_search, viterbi_search
>>>
>>> alphabet = "NACGT"
>>> posteriors = np.random.rand(100, len(alphabet)).astype(np.float32)
>>>
>>> seq, path = viterbi_search(posteriors, alphabet)
>>> seq
'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT'
>>>
>>> seq, path = beam_search(posteriors, alphabet, beam_size=5, beam_cut_threshold=0.1)
>>> seq
'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT'

Benchmark

Implementation Time (s) URL
Viterbi (Rust) 0.0003 nanoporetech/fast-ctc-decode
Viterbi (Python) 0.0022
Beam Search (Rust) 0.0033 nanoporetech/fast-ctc-decode
Beam Search (C++) 0.1034 parlance/ctcdecode
Beam Search (Python) 3.3337 githubharald/CTCDecoder

Developer Quickstart

$ git clone https://github.com/nanoporetech/fast-ctc-decode.git
$ cd fast-ctc-decode
$ pip install --user maturin
$ make test

Note: You'll need a recent rust compiler on your path to build the project.

By default, a fast (and less accurate) version of exponentiation is used for the 2D search. This can be disabled by passing --cargo-extra-args="--no-default-features" to maturin, which provides more accurate calculations but makes the 2D search take about twice as long.

Credits

The original 1D beam search implementation was developed by @usamec for deepnano-blitz.

The 2D beam search is based on @jordisr and @ihh work in their pair consensus decoding paper.

Licence and Copyright

(c) 2019 Oxford Nanopore Technologies Ltd.

fast-ctc-decode is distributed under the terms of the MIT License. If a copy of the License was not distributed with this file, You can obtain one at https://github.com/nanoporetech/fast-ctc-decode/

Research Release

Research releases are provided as technology demonstrators to provide early access to features or stimulate Community development of tools. Support for this software will be minimal and is only provided directly by the developers. Feature requests, improvements, and discussions are welcome and can be implemented by forking and pull requests. However much as we would like to rectify every issue and piece of feedback users may have, the developers may have limited resource for support of this software. Research releases may be unstable and subject to rapid iteration by Oxford Nanopore Technologies.

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