-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
472682d
commit 187524c
Showing
15 changed files
with
1,155 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,8 @@ logs | |
datasets | ||
|
||
.DS_Store | ||
*.log | ||
.vscode | ||
logs_v2 | ||
heatmap | ||
184_checkpoints | ||
.ipynb_checkpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SAM | ||
[Semantic Graph Representation Learning for Handwritten Mathematical Expression Recognition (ICDAR 2023)](https://link.springer.com/chapter/10.1007/978-3-031-41676-7_9) | ||
|
||
The code will be released after the ICDAR2023 meeting! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import torch | ||
import torch.nn as nn | ||
import torch.nn.functional as F | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
import os | ||
|
||
def gen_counting_label(labels, channel, tag): | ||
b, t = labels.size() | ||
counting_labels = torch.zeros((b, channel)) | ||
if tag: | ||
ignore = [0, 1, 107, 108, 109, 110] | ||
else: | ||
ignore = [] | ||
for i in range(b): | ||
for j in range(t): | ||
k = labels[i][j] | ||
if k in ignore: | ||
continue | ||
else: | ||
counting_labels[i][k] += 1 | ||
return counting_labels.detach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
from models.decoder.decoder_v1 import Decoder_v1 | ||
from models.decoder.decoder_v1 import Decoder_v1 | ||
from models.decoder.decoder_v2 import Decoder_v1 as Decoder_v2 | ||
from models.decoder.decoder_v3 import Decoder_v1 as Decoder_v3 | ||
from models.counting import CountingDecoder as counting_decoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.