public class CaptchaDataset
extends ai.djl.training.dataset.RandomAccessDataset
Dataset featuring captcha images.
Each image is a 160x60 grayscale image featuring 5 or 6 digits where each digit ranges from 0-10. The dataset therefore features 6 labels. Each label ranges from 0-11 where 0-10 represent a recognized digit and 11 indicates that the value is not a digit (size 5 and not 6).
| Modifier and Type | Class and Description |
|---|---|
static class |
CaptchaDataset.Builder
A builder for a
CaptchaDataset. |
| Modifier and Type | Field and Description |
|---|---|
static int |
CAPTCHA_LENGTH |
static int |
CAPTCHA_OPTIONS |
static int |
IMAGE_HEIGHT |
static int |
IMAGE_WIDTH |
| Constructor and Description |
|---|
CaptchaDataset(CaptchaDataset.Builder builder)
Creates a new instance of
CaptchaDataset. |
| Modifier and Type | Method and Description |
|---|---|
protected long |
availableSize() |
static CaptchaDataset.Builder |
builder()
Creates a builder to build a
CaptchaDataset. |
ai.djl.training.dataset.Record |
get(ai.djl.ndarray.NDManager manager,
long index) |
void |
prepare(ai.djl.util.Progress progress) |
getData, getData, getData, getData, randomSplit, size, subDataset, toArraypublic static final int IMAGE_WIDTH
public static final int IMAGE_HEIGHT
public static final int CAPTCHA_LENGTH
public static final int CAPTCHA_OPTIONS
public CaptchaDataset(CaptchaDataset.Builder builder)
CaptchaDataset.builder - a builder with the necessary configurationspublic static CaptchaDataset.Builder builder()
CaptchaDataset.public ai.djl.training.dataset.Record get(ai.djl.ndarray.NDManager manager,
long index)
throws java.io.IOException
get in class ai.djl.training.dataset.RandomAccessDatasetjava.io.IOExceptionprotected long availableSize()
availableSize in class ai.djl.training.dataset.RandomAccessDatasetpublic void prepare(ai.djl.util.Progress progress)
throws java.io.IOException
java.io.IOException