-
Notifications
You must be signed in to change notification settings - Fork 60
add ABINet [WIP, don't merge yet] #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大量文件位置错误,请先修改下~
configs/rec/abinet/abinet.yaml
Outdated
@@ -0,0 +1,173 @@ | |||
system: | |||
mode: 0 # 0 for graph mode, 1 for pynative mode in MindSpore | |||
distribute: true #2023.06.12 modify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean #2023.06.12 modify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
configs/rec/abinet/abinet.yaml
Outdated
drop_overflow_update: False | ||
|
||
common: | ||
character_dict_path: &character_dict_path #改charset_36.txt mindocr/utils/dict/en_dict.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean #改charset_36.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
configs/rec/abinet/abinet.yaml
Outdated
|
||
model: | ||
type: rec | ||
pretrained : "/home/gaohan/code/abinet/mindocr_ckpt.ckpt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path 不要用自己地址,参考crnn config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据地址还没有改,为了方便本地调试。
configs/rec/abinet/abinet.yaml
Outdated
name: RecCTCLabelDecode | ||
character_dict_path: *character_dict_path | ||
use_space_char: *use_space_char | ||
#postprocess和metirc需要改 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#需要改 这种无意义的comment 需要去掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
configs/rec/abinet/abinet.yaml
Outdated
opt: adam | ||
|
||
|
||
# loss_scaler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要loss_scaler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为没有使用混合精度,所以应该不需要使用loss_scaler。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不属于backbone,请摆在合适位置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
# # {'feature': attn_vecs, 'logits': logits, 'pt_lengths': pt_lengths, | ||
# # 'attn_scores': attn_scores, 'loss_weight':self.loss_weight, 'name': 'vision'} | ||
|
||
# all_l_res, all_a_res = [], [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大量comment请删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src 命名改成 blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src 命名改成 blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loss 不属于backbone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
e94f7a1
to
a69c5d5
Compare
主要修改了文件位置和中文注释的问题 |
mindocr/data/abinet_dataset.py
Outdated
|
||
return self._next_image(lmdb_idx) | ||
|
||
# 这里的image是PIL.Image类型的,没法用Mindspore直接加载,因此用np转换了一下 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些中文注释请修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
mindocr/data/abinet_dataset.py
Outdated
warnings.simplefilter("ignore", UserWarning) # EXIF warning from TiffPlugin | ||
image = PIL.Image.open(buf).convert(self.convert_mode) | ||
if self.is_training and not self._check_image(image): | ||
# logging.info(f'Invalid image is found: {self.name}, {idx}, {label}, {len(label)}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释掉的代码块,如果不需要,请删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
mindocr/models/rec_abinet.py
Outdated
"name": "ABINet_Head", | ||
}, | ||
} | ||
model = ABINet_Model_Test(model_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个为什么加test?不如直接叫模型的名字
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
configs/rec/abinet/abinet.yaml
Outdated
dataset: | ||
type: ABINet_Dataset | ||
path: [/home/gaohan/data/abinet_data/train/MJ/MJ_test,'/home/gaohan/data/abinet_data/train/MJ/MJ_train','/home/gaohan/data/abinet_data/train/MJ/MJ_valid','/home/gaohan/data/abinet_data/train/ST'] | ||
dataset_root: /home/gaohan/data/abinet_data/train/ # Optional, if set, dataset_root will be used as a prefix for data_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据集路径记得改成通用的。自己调试在本地改回去即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外请提供对应的README文件
mindocr/data/abinet_dataset.py
Outdated
__all__ = ["ABINet_Dataset"] | ||
|
||
|
||
class ABINet_Dataset: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ABINet_Dataset 读图内容为 mindocr/data/rec_lmdb_dataset.py 中的LMDBDataset格式,请用LMDBDataset 代替。label转换,图片normalization 等皆用现有的transform内容代替。可参考CRNN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是指ABINet_Dataset类的话,因为在__getitem__方法中做了特殊处理,因此没法直接用LMDBDataset 代替,不过应该有可以简化代码的地方,后续可以进行修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
重合的地方可以继承复用,做了特殊处理可以覆盖
__all__ = ["ABINet_Transforms"] | ||
|
||
|
||
class ABINet_Transforms(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class命名无需下划线
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
@@ -0,0 +1,4626 @@ | |||
from __future__ import absolute_import, division |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本身仅支持python3.7+,不需要 from __future__ import absolute_import, division
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
_default_tfmer_cfg = dict( | ||
d_model=512, nhead=8, d_inner=2048, dropout=0.1, activation="relu" # 1024 | ||
) | ||
__all__ = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只需要 export ABINetIter_Backbone
和 abinet_backbone
,其他不要再__all__里面。 ABINetIter_Backbone
去除下划线
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大量内容和mindspore.nn.transformer及mindspore.nn (例如mindspore.nn.MultiheadAttention)极为相似,请直接import mindspore对应module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
开发过程中,发现mindspore.nn.transformer中的内容不能直接使用,比如TransformerEncoder和TransformerDecoder,现有功能不满足模型的需求。因此在mindspore.transformer的基础上进行了改动以满足模型需求,因此虽然相似但是没法直接import。MultiheadAttention也许可以import,我忘了当初有没有改这个了,如果发现没有修改可以import。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯请复用code,使用继承等方式修改需要改的地方,避免大量copy paste
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,后续我查一下代码,可以精简的地方简化一下。
mindocr/models/necks/abinet_neck.py
Outdated
import mindspore as ms | ||
from mindspore import nn | ||
|
||
from ..backbones.rec_abinet_backbone import Model, PositionalEncoding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同样不应该引用backbone内容
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上述问题
} | ||
model = ABINet_Model(model_config) | ||
|
||
# load pretrained weights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretrain那段需保留,请按crnn方式修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
mindocr/models/rec_abinet.py
Outdated
|
||
default_cfgs = { | ||
# 'abinet': | ||
"crnn_resnet34": _cfg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内容不对
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为现在还没有上传abinet的ckpt到mindspore上,所以此处只是做了个标记,后续会更改url的内容。
mindocr/utils/dict/charset_36.txt
Outdated
@@ -0,0 +1,36 @@ | |||
0 a | |||
1 b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这字典跟default字典重叠,不需要额外提供,把character_dict_path设成none即可,参考crnn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此模型最好需要一个这样格式的dict,虽然默认的dict包含更多字符,但还需额外处理。上面有问题提到可以把需要复用的代码放到一个文件夹里,这个dict也可以作为此模型专用的字典放置进去。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
requirements.txt
Outdated
@@ -16,3 +16,4 @@ xml-python>=0.4.3 | |||
packaging | |||
Cython | |||
lanms>=1.0.2 | |||
pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哪里需要用到pandas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
88491b2
to
d0026eb
Compare
根据意见已修改,README暂时还未添加。 |
configs/rec/abinet/abinet.yaml
Outdated
|
||
model: | ||
type: rec | ||
pretrained : "/tmp_rec/pretrain/mindocr_ckpt.ckpt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议补充说明下这个pretrained模型怎么准备
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,后续在README中会添加。
mindocr/data/abinet_dataset.py
Outdated
__all__ = ["ABINet_Dataset"] | ||
|
||
|
||
class ABINet_Dataset: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
重合的地方可以继承复用,做了特殊处理可以覆盖
mindocr/losses/abinet_loss.py
Outdated
|
||
if i == 2: | ||
pt_logits = output["logits"] | ||
weight = 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if条件底下的 weight = 1.0
是不是可以删掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
# load pretrained weights | ||
if pretrained: | ||
raise NotImplementedError | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotImplementedError 可以加一下message哈,可参考rec_resnet.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
self.loss_weight = 1.0 | ||
self.out_channels = 512 | ||
self.backbone = ResTranformer() | ||
mode = "nearest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mode
变量只在48行用到,可直接在48行 mode='nearest'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
mindocr/models/necks/abinet_neck.py
Outdated
zeroo = ms.ops.Zeros() | ||
zeros = zeroo((96, 26, 512), ms.float32) | ||
zeros = zeros.transpose(1, 0, 2) | ||
qeury = self.pos_encoder(zeros) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
变量名是否改成 query
更准确?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢,已修改。
已删掉abinet_dataset |
4cd3f1c
to
f90d7f7
Compare
已尽量复用数据变换部分,Transformer部分留下了TransformerEncoder、TransformerDecoder、TransformerEncoderLayer、TransformerDecoderLayer部分,因为这四部分相对于mindspore.nn.transformer做了修改。 |
ab07941
to
ea5e2ba
Compare
configs/rec/abinet/README.md
Outdated
|
||
| **Model** | **Context** | **Avg Accuracy** | **Train T.** | **FPS** | **Recipe** | **Download** | | ||
| :-----: | :-----------: | :--------------: | :----------: | :--------: | :--------: |:----------: | | ||
| ABINet | D910x8-MS1.9-G | 92.23% | 20076 s/epoch | 99 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en_34aeaf96.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
权重文件命名不符合规范,请更正:
abinet_resnet45_en-34aeaf96.ckpt
en后是-,不是_.
另外,yaml的文件名应与 ckpt保持一致:abinet_resnet45_en.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
configs/rec/abinet/README_CN.md
Outdated
|
||
| **Model** | **Context** | **Avg Accuracy** | **Train T.** | **FPS** | **Recipe** | **Download** | | ||
| :-----: | :-----------: | :--------------: | :----------: | :--------: | :--------: |:----------: | | ||
| ABINet | D910x8-MS1.9-G | 92.23% | 20076 s/epoch | 99 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en_34aeaf96.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
@@ -43,6 +43,9 @@ | |||
import os | |||
import sys | |||
|
|||
import mindspore as ms | |||
|
|||
ms.set_context(device_id=5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device_id=5 删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
configs/rec/abinet/abinet.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ABINet 是使用了预训练模型了吗,我看config没有?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加,谢谢。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
怎么产生预训练模型和如何使用,README需要补充下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
预训练模型从原作者repo中得到,会在README补充如何使用。
configs/rec/abinet/README_CN.md
Outdated
|
||
在这里,我们使用 `train/` 文件夹下的数据集进行训练,我们使用 `evaluation/` 下的数据集来评估模型的准确性。 | ||
|
||
**Train:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据集大小需要补充下,参考CRNN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已补充,谢谢。
@@ -86,7 +88,7 @@ def main(cfg): | |||
) | |||
else: | |||
device_id = cfg.system.get("device_id", 0) | |||
ms.set_context(device_id=device_id) | |||
# ms.set_context(device_id=device_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个修改要改回去
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
mindocr/losses/abinet_loss.py
Outdated
super().__init__() | ||
self.ce = SoftCrossEntropyLoss() | ||
self.bce = nn.BCELoss(reduction="mean") | ||
self.losses = ms.Parameter([]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.losses 还有 last_losses 似乎没用到,否则可删去
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
已按照意见修改。 |
configs/rec/abinet/README.md
Outdated
|
||
| **Model** | **Context** | **Avg Accuracy** | **Train T.** | **FPS** | **Recipe** | **Download** | | ||
| :-----: | :-----------: | :--------------: | :----------: | :--------: | :--------: |:----------: | | ||
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 86 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 86 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) | |
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 86 | [yaml](abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文readme同步修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,谢谢。
CVRescale, | ||
) | ||
|
||
_logger = Logger("mindocr") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方需要修改一下, Logger这个函数已经去掉了,所以需要删掉from mindocr.utils.logger import Logger
, 参考其他脚本,使用import logging
, _logger = logging.getLogger(__name__)
打印信息
configs/rec/abinet/README.md
Outdated
|
||
| **Model** | **Context** | **Avg Accuracy** | **Train T.** | **FPS** | **Recipe** | **Download** | | ||
| :-----: | :-----------: | :--------------: | :----------: | :--------: | :--------: |:----------: | | ||
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 86 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 86 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) | |
| ABINet | D910x8-MS1.9-G | 92.53% | 22993 s/epoch | 628.11 | [yaml](https://github.com/safeandnewYH/ABINet_Figs/blob/main/abinet_resnet45_en.yaml) | [ckpt](https://download.mindspore.cn/toolkits/mindocr/abinet/abinet_resnet45_en-41e4bbd0.ckpt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原值是单卡FPS,此处填写八卡FPS,约等于单卡FPS乘以8。中文readme同步修改
import cv2 | ||
import numpy as np | ||
import PIL | ||
import six |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use six
! six
is needed for backward compatibility with python 2.x. Our minimum supported version of python is 3.7!
Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:
Motivation
(Write your motivation for proposed changes here.)
Test Plan
(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)
Related Issues and PRs
(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)