|
Download README.md from drmzero/ascon-bubble: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/drmzero/ascon-bubble/resolve/main/README.md
- Command line
-
hf download hf://drmzero/ascon-bubble/README.md
-
curl -L -o README.md https://huggingface.co/drmzero/ascon-bubble/resolve/main/README.md
1.66 kB
| license: apache-2.0 | |
| library_name: onnx | |
| pipeline_tag: object-detection | |
| tags: | |
| - comics | |
| - speech-bubbles | |
| - yolox | |
| # Ascon bubble detector | |
| A small detector for speech bubbles and lettering on comic pages, made for Ascon's on-device translation. It is YOLOX-tiny, fine-tuned from the COCO weights and stored as static int8 ONNX, 5.6 MB. | |
| ## Classes | |
| | Id | Class | | |
| |---|---| | |
| | 0 | bubble | | |
| | 1 | text_bubble, lettering inside a bubble | | |
| | 2 | text_free, lettering outside a bubble | | |
| ## Input and output | |
| - Input `images`: float32 `[1, 3, 448, 448]`, BGR, values 0 to 255, the piece resized to fit and padded at the right and bottom. | |
| - Output: `[1, 4116, 8]`, one row per anchor: centre x, centre y, width and height in input pixels, objectness, then the three class scores. A box's score is objectness times its best class score. Remove overlaps per class after scoring. | |
| The final decode step is kept in float; the rest is int8. | |
| ## Training | |
| - Labels came from [ogkalu/comic-text-and-bubble-detector](https://huggingface.co/ogkalu/comic-text-and-bubble-detector), Apache-2.0, used as the teacher, run on about 3,200 pages cut into about 8,400 pieces. | |
| - 60 epochs at 448 px on one T4. | |
| ## Results | |
| On 33 held-out pages, whole pages after Ascon's merge of pieces, against the teacher's boxes scored 0.5 and above, at a minimum score of 0.4: | |
| | | Found | Precision | | |
| |---|---|---| | |
| | Any lettering | 95.4% | 88.7% | | |
| | Bubbles | 93.2% | 81.2% | | |
| On a phone with a MediaTek MT6877 with 2 CPU threads, a piece takes about 55 ms, against about 375 ms for the teacher's int8 file. | |
| ## License | |
| Apache-2.0, as are YOLOX's code and COCO weights and the teacher model. | |