All Projects → MiguelMonteiro → CRFasRNNLayer

MiguelMonteiro / CRFasRNNLayer

Licence: MIT license
Conditional Random Fields as Recurrent Neural Networks (Tensorflow)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to CRFasRNNLayer

Open Sesame
A frame-semantic parsing system based on a softmax-margin SegRNN.
Stars: ✭ 170 (+123.68%)
Mutual labels:  crf
keras-crf-ner
keras+bi-lstm+crf,中文命名实体识别
Stars: ✭ 16 (-78.95%)
Mutual labels:  crf
BiLSTM-CRF-NER-PyTorch
This repo contains a PyTorch implementation of a BiLSTM-CRF model for named entity recognition task.
Stars: ✭ 109 (+43.42%)
Mutual labels:  crf
Torchnlp
Easy to use NLP library built on PyTorch and TorchText
Stars: ✭ 233 (+206.58%)
Mutual labels:  crf
Machine Learning Code
《统计学习方法》与常见机器学习模型(GBDT/XGBoost/lightGBM/FM/FFM)的原理讲解与python和类库实现
Stars: ✭ 169 (+122.37%)
Mutual labels:  crf
crfsuite-rs
Rust binding to crfsuite
Stars: ✭ 19 (-75%)
Mutual labels:  crf
Fcn For Semantic Segmentation
Implemention of FCN-8 and FCN-16 with Keras and uses CRF as post processing
Stars: ✭ 155 (+103.95%)
Mutual labels:  crf
korean ner tagging challenge
KU_NERDY 이동엽, 임희석 (2017 국어 정보 처리 시스템경진대회 금상) - 한글 및 한국어 정보처리 학술대회
Stars: ✭ 30 (-60.53%)
Mutual labels:  crf
ChineseNER
中文NER的那些事儿
Stars: ✭ 241 (+217.11%)
Mutual labels:  crf
Gumbel-CRF
Implementation of NeurIPS 20 paper: Latent Template Induction with Gumbel-CRFs
Stars: ✭ 51 (-32.89%)
Mutual labels:  crf
Pytorch Bert Crf Ner
KoBERT와 CRF로 만든 한국어 개체명인식기 (BERT+CRF based Named Entity Recognition model for Korean)
Stars: ✭ 236 (+210.53%)
Mutual labels:  crf
video-quality-metrics
Test specified presets/CRF values for the x264 or x265 encoder. Compares VMAF/SSIM/PSNR numerically & via graphs.
Stars: ✭ 87 (+14.47%)
Mutual labels:  crf
mahjong
开源中文分词工具包,中文分词Web API,Lucene中文分词,中英文混合分词
Stars: ✭ 40 (-47.37%)
Mutual labels:  crf
Fancy Nlp
NLP for human. A fast and easy-to-use natural language processing (NLP) toolkit, satisfying your imagination about NLP.
Stars: ✭ 233 (+206.58%)
Mutual labels:  crf
deepseg
Chinese word segmentation in tensorflow 2.x
Stars: ✭ 23 (-69.74%)
Mutual labels:  crf
Deep Crf
An implementation of Conditional Random Fields (CRFs) with Deep Learning Method
Stars: ✭ 161 (+111.84%)
Mutual labels:  crf
xinlp
把李航老师《统计学习方法》的后几章的算法都用java实现了一遍,实现盒子与球的EM算法,扩展到去GMM训练,后来实现了HMM分词(实现了HMM分词的参数训练)和CRF分词(借用CRF++训练的参数模型),最后利用tensorFlow把BiLSTM+CRF实现了,然后为lucene包装了一个XinAnalyzer
Stars: ✭ 21 (-72.37%)
Mutual labels:  crf
Hierarchical-Word-Sense-Disambiguation-using-WordNet-Senses
Word Sense Disambiguation using Word Specific models, All word models and Hierarchical models in Tensorflow
Stars: ✭ 33 (-56.58%)
Mutual labels:  crf
NLP-paper
🎨 🎨NLP 自然语言处理教程 🎨🎨 https://dataxujing.github.io/NLP-paper/
Stars: ✭ 23 (-69.74%)
Mutual labels:  crf
fastai sequence tagging
sequence tagging for NER for ULMFiT
Stars: ✭ 21 (-72.37%)
Mutual labels:  crf

CRF as RNN Layer

Conditional Random Fields as Recurrent Neural Networks (Tensorflow Implementation)

Implements Conditional Random Fields as Recurrent Neural Networks as in the repository from the original authors. The main differences are:

  1. There is CPU and a GPU kernel;

  2. The code can be used with any number of spatial dimensions, input channels (number of classes) and reference channels (the original code only allows 2D and RGB reference images);

  3. The GPU kernel uses the TensorFlow memory allocator, which is necessary because TensorFlow allocates most of the GPU memory by default and leaves almost none for CUDA (with large images/many channels it can become a problem);

  4. The weights of the CRF are more restricted in this version so that they do not encroach on the compatibility matrix's role;

  5. Support for batch_size >= 1; channel dimension is the last dimension (inputs are of the form (batch_size, ..., n_channels) with an arbitrary number of spatial dimensions in between).

Compilation

To compile the code run:

sh build.sh

See the nested module permutohedral_lattice for more information on compilation for different image types.

See Test for dummy example usages and the original repository to see how to integrate this with a neural network (logits come in this layer and logits come out (do not feed probability or labels as inputs)).

Citing

If you use this work please consider citing our paper as well as the original 2D RGB paper.

Known Issues:

  1. The GPU kernel allocates a fixed size hash table which uses memory proportional to the square of the number of classes. This might use too much memory for some applications if the number of classes is large.

  2. I have built this to use in 3D medical imaging segmentation. Even though the code works as expected, using this layer on top or a neural network or just the neural network alone didn't make a difference (statistically speaking). I don't know if its because MRI and CT images tend to have less defined edges than natural images or some other reason. If you use this and manage to get good results on medical imaging please let me know.

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