ACCID baseline is a zero-shot framework for character recognition. It extracts radical information (including radical categories and relative structural relations between radicals) via neural networks, then performs character recognition by exploiting this information for reasoning in a character knowledge graph.
- train.py: Model training pipeline
- ger_RPs_SP.py: predict radical predictions (RPs) and structural relation predictions (SP).
- CR.py: reasoning in the character dictionary via RPs and SP, now the dictionary are shown as a knowledge dictionary graph.
- oracle_779_KG.owl: an example of an oracle character knowledge graph.
- radical_train.txt: a txt file with images path and their radical annotation information, generated by the voc_annotation.py.
- radical_annotation.py: generating radical_train.txt, which is used for training models.
- GenerateXMLforSingleRadical: automatically generate the XML files for characters with a single radical, which helps to alleviate the annotation cost.
- nets: models and layers.
- RSE.py: main network used to extract radical categories and relative structural relations between radicals in parallel.
- DAL.py: building an attention layer.
- radical_loss.py: the loss function of RSE.
- utils: Helpers and tools.
- config.py: offer some parameters used in RSE.
- dataloader.py: loading images from the target path.
- utils.py: some function used in RSE.
- Datasets\ACCID2023: a subset of the proposed dataset, including character-level and radical-level annotations. Here we show an subset of the proposed dataset because of the space limitations.
- CUDA==10.2
- cudnn==8.0
- python==3.6
- torch==1.8.0
- torchvision==0.9.0
- DNN-printer==0.0.2
- numpy
- rdflib
- collections
- PIL
- tqdm
- wmi (optional)