1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00
Files
opencv/samples
Jorge Velez a49a293d3c Merge pull request #27534 from JorgeV92:gsoc2025-tokenizer
GSoC 2025: Add Tokenizer Support to DNN Module #27534

merge with https://github.com/opencv/opencv_extra/pull/1276

### Summary
This pull request introduces initial support for a tokenizer module under `modules/dnn/src/tokenizer` as part of Google Summer of Code 2025 (Project: Tokenization for OpenCV DNN).

### Status
- [x] Project structure in place
- [x] Initial BPE tokenizer loading
- [x] Regex splitting (in progress)
- [x] Encoding logic for GPT-2 tokenizer (in progress)
- [ ] Documentation (to be improved)

### Goals
The goal is to support Hugging Face-compatible tokenization (e.g., GPT-2) natively in C++ to be integrated with DNN inference pipelines. 

The core pipeline lives in `dnn/src/tokenizer/core_bpe.hpp` and `dnn/src/tokenizer/encoding.hpp`. For Unicode handling I’m using `dnn/src/tokenizer/unicode.hpp`, which is adapted from llama.cpp.


### Feedback
Please share early feedback on:
- General design structure
- Integration strategy with `dnn`
- Code organization or naming conventions

### Reference
Project: https://summerofcode.withgoogle.com/programs/2025/projects/79SW6eNK
2026-04-06 10:46:13 +03:00
..
2025-02-05 09:28:27 +03:00
2026-03-19 11:29:57 +03:00
2026-02-14 15:37:33 +03:00
2025-07-22 09:47:19 +03:00
2025-04-02 13:45:08 -07:00
2025-07-22 09:47:19 +03:00
2025-02-20 13:58:04 +03:00
2026-02-14 15:37:33 +03:00
2021-12-30 21:43:45 +00:00
2025-07-22 09:47:19 +03:00
2025-07-28 10:04:17 +03:00
2025-07-22 09:47:19 +03:00