SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.05562 · IJCAI · 2024

Focus on the Whole Character: Discriminative Character Modeling for Scene Text Recognition

Boqiang Zhang, Hongtao Xie, Zicheng Li, Zixiao Wang, Yadong Qu, Bangbang Zhou

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2407.05562.json · badge: /api/ran/2407.05562.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
bang123-box/CFE canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
ConvBNLayer Ran
ran; our contract draft was wrong, not the code
bang123-box/CFE/strhub/models/cfe/modules.py
code served (permissive licence) · get_code("6bde3fc89b83594b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'inchanns': 3,
    'outchanns': 64,
    'kernel': 3,
    'stride': 1,
    'padding': 1,
    'activation': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rotate_every_two Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bang123-box/CFE/strhub/models/cfe/modules.py
code served (permissive licence) · get_code("368e8872aa996b9e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function rotate_every_two takes a tensor x and performs rotations
# on the last dimension. It expects a 4D tensor with shape (batch, dim1, dim2, last_dim)
# where last_dim should be even (since it splits by ::2 and 1::2)

x = torch.randn(2, 3, 4, 6)  # batch=2, dim1=3, dim2=4, last_dim=6 (even)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 6) — shape (2, 3, 4, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
theta_shift Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bang123-box/CFE/strhub/models/cfe/modules.py
code served (permissive licence) · get_code("5d8396d548dcd91a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small test tensors
# x: [batch=2, dim1=3, dim2=4, dim3=8] (last dimension needs to be even for rotate_every_two)
x = torch.randn(2, 3, 4, 8)

# sin and cos: same shape as x for broadcasting
sin = torch.randn(2, 3, 4, 8)
cos = torch.randn(2, 3, 4, 8)

ARGS = {
    "x": x,
    "sin": sin,
    "cos": cos,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 8) — shape (2, 3, 4, 8) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_model Not yet run
unverified (harvested, no recorded run)
bang123-box/CFE/strhub/models/utils.py
code served (permissive licence) · get_code("d3ac19ee3684a0ad")
How it ran

no invocation recorded.

get_pretrained_weights Not yet run
unverified (harvested, no recorded run)
bang123-box/CFE/strhub/models/utils.py
code served (permissive licence) · get_code("83d15f3d9d2da060")
How it ran

no invocation recorded.

load_from_checkpoint Not yet run
unverified (harvested, no recorded run)
bang123-box/CFE/strhub/models/utils.py
code served (permissive licence) · get_code("16bc572b3ef26ada")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
rotate_every_two 5 other papers
5 dated earlier
2206.13517 (2022-06)
ProGen2: Exploring the Boundaries of Protein Language Models
2307.04349 (2023-07)
RLTF: Reinforcement Learning from Unit Test Feedback
2308.10882 (2023-08)
Giraffe: Adventures in Expanding Context Lengths in LLMs
and 2 more not named here
theta_shift 5 other papers
2 dated earlier, 3 later
2309.11523 (2023-09)
RMT: Retentive Networks Meet Vision Transformers
2403.00818 (2024-03)
DenseMamba: State Space Models with Dense Hidden Connection for Efficient Large Language Models
2411.07635 (2024-11)
Breaking the Low-Rank Dilemma of Linear Attention
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recently, scene text recognition (STR) models have shown significant performance improvements. However, existing models still encounter difficulties in recognizing challenging texts that involve factors such as severely distorted and perspective characters. These challenging texts mainly cause two problems: (1) Large Intra-Class Variance. (2) Small Inter-Class Variance. An extremely distorted character may prominently differ visually from other characters within the same category, while the variance between characters from different classes is relatively small. To address the above issues, we propose a novel method that enriches the character features to enhance the discriminability of characters. Firstly, we propose the Character-Aware Constraint Encoder (CACE) with multiple blocks stacked. CACE introduces a decay matrix in each block to explicitly guide the attention region for each token. By continuously employing the decay matrix, CACE enables tokens to perceive morphological information at the character level. Secondly, an Intra-Inter Consistency Loss (I 2 CL) is introduced to consider intra-class compactness and inter-class separability at feature space. I 2 CL improves the discriminative capability of features by learning a long-term memory unit for each character category. Trained with synthetic data, our model achieves state-of-the-art performance on common benchmarks (94.1% accuracy) and Union14M-Benchmark (61.6% accuracy). Code is available at https://github.com/bang123-box/CFE.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2407.05562")
get_code_for_paper("2407.05562")
have("2407.05562")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2407.05562.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2407.05562.svg)](https://syntology.ai/paper/2407.05562)

Connect an agent — have() is free.