File size: 1,112 Bytes
be12cc9
 
 
 
 
 
 
 
b6be18b
 
 
 
 
 
 
 
be12cc9
 
b6be18b
be12cc9
b6be18b
be12cc9
b6be18b
be12cc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os

qdrant_location = os.getenv('QDRANT_URL', "localhost")
qdrant_api_key = os.getenv('QDRANT_API_KEY')

description = """This is a Kanji image search demo. Draw or upload an image of an individual Kanji character."""

article = """
### Getting better results

Try different brush sizes. 
Try to draw it centered in the middle of the canvas, both horizontally and vertically. 
You may want to try using an external tool to draw then import a file.

The results is sorted by estimated distance from the input, but will rarely give the exact Kanji you are searching for as the first result

### About this project

It uses the "kha-white/manga-ocr-base" Vision Transformer Encoder model to create embeddings, then uses a vector database (qdrant) to find similar characters.

You can find the code used to create the embeddings as well as more information in https://github.com/etrotta/kanji_lookup

The database has been populated with over 10000 characters from [The KANJIDIC project](https://www.edrdg.org/wiki/index.php/KANJIDIC_Project), each rendered in multiple fonts downloaded from Google Fonts
"""