Cannot use builtin datasets for detection training #1830
Labels
ext: references
Related to references folder
framework: pytorch
Related to PyTorch backend
framework: tensorflow
Related to TensorFlow backend
topic: documentation
Improvements or additions to documentation
topic: text detection
Related to the task of text detection
topic: text recognition
Related to the task of text recognition
type: bug
Something isn't working
type: enhancement
Improvement
Milestone
Bug description
I've modified the reference (PyTorch) training code to use
SVHN
dataset.That did not work (see traceback).
By looking at what
DetectionDataset
class is doing and some trial and error, I managed to get it working (or at least running) by restructuring the targets from the dataset as follows:Don't know if this is "valid" fix, though.
Code snippet to reproduce the bug
See https://gist.github.com/KenjiTakahashi/9bb22093d584bb2b203eb003a2bbb414.
Like mentioned, this is mostly the same code as
https://github.com/mindee/doctr/blob/e6bf82d6a74a52cedac17108e596b9265c4e43c5/references/detection/train_pytorch.py
with slight modifications to work with
SVHN
class instead ofDetectionDataset
.Error traceback
Environment
This script does not seem to work well on (my) MacOS, it mostly returns N/A's. Anyway, I run it currently on MacOS 14 with latest doctr (tried both
0.10
release and master ate6bf82d
) and PyTorch.Deep Learning backend
I'm using PyTorch, but same problem happens on TF as well.
The text was updated successfully, but these errors were encountered: