Comments (8)
Besides, I would ask about how can I extract the log probabilies of the recognized frames in order to decode them using a decoder software.
Thanks.
from returnn.
Hi,
the [1,2] and [2,1] entries in data and sizes should better not be touched. the 79 means we have 79 characters (excluding the CTC blank), so yes, it's correct to change it to 107 if you have 107 characters.
To extract posteriors, you can use the config_fwd of the mdlstm example.
Then you can do a very simple decoding (without language model, or lexicon) using decode.py to see if it is working.
from returnn.
Hi, thank you for your response.
I have used this code to decode:
`#!/usr/bin/env python
import h5py
import numpy
with open("chars.txt") as f:
chars = [l.strip() for l in f.readlines()]
print chars
with h5py.File("mdlstm_real_test.h5", "r") as f:
x = f["inputs"][...]
x = numpy.argmax(x, axis=1)
print 'x: ', x
x = [chars[idx] for idx in x]
**print 'char:' , x**
lens = f["seqLengths"][...]
tags = f["seqTags"][...]
start = 0
for tag, len_ in zip(tags, lens):
y = []
last_char = None
for c in x[start:start+len_]:
if last_char != c:
y.append(c)
last_char = c
y = [" " if c == "|" else c for c in y]
output = "".join(y).strip()
print tag, output
start += len_`
the char list : ['', '', 'aaA', 'aaE', 'aeA', 'aeE'.....]
But, x contains: char: ['|', '|', '|', '|', '|', '|', '|', '|', '|', '|',................
and no result in the decoding, no output
from returnn.
Hi,
please first make sure that the demo including decoding (using the original set of characters) works for you. Is this the case?
from returnn.
I did not test it, I will verify, thanks
from returnn.
I have just a question, when we train the MDLSTM for line images which are written from right to left,
is there some parameters to change in the code or config??
such the case of Arabic text,
Thanks
from returnn.
We don't have such an option unfortunately. One possibility would be to explicitly flip the images and overwrite them with the flipped versions, or do the flipping when converting the raw images to hdf5.
from returnn.
I have done this when I convert to hdf5:
img = imread(img_name)
rimg = cv2.flip(img, 1)
....................
from returnn.
Related Issues (20)
- CUDA error: initialization error HOT 3
- MultiProcDataset inside PyTorch DataLoader with num_workers>0, multiple issues HOT 4
- RuntimeError: CUDA error: unspecified launch failure HOT 2
- NonDaemonicSpawnProcess hangs at exit HOT 2
- High memory usage with datasets (specifically when multi procs are used)
- Hang at exit in TDL worker in multiprocessing `_run_finalizers`, deadlock in `_wait_for_tstate_lock`? HOT 6
- Hang HOT 2
- Returnn Native after using different apptainer uses old compilation HOT 6
- MetaDataset with sequence list filter file
- HDFDataset (or generic dataset) post processing HOT 15
- Dataset batching like ESPnet support
- torch.nn.functional.conv2d: RuntimeError: GET was unable to find an engine to execute this computation HOT 1
- TensorFlow 2.14 degradation in WER HOT 2
- Updates for recent TensorFlow version
- Hang in dataset iterator HOT 5
- Log GPU device for torch backend HOT 2
- torch.onnx.export requires input_names and output_names to be in order HOT 12
- RF weight dropout HOT 6
- Support for larger scale datasets HOT 33
- RuntimeError: CUDA error: unknown error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from returnn.