Skip to content

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

Merged
merged 31 commits into from
Jul 7, 2023
Merged

Conversation

safeandnewYH
Copy link
Collaborator

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)

Copy link
Collaborator

@zhtmike zhtmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大量文件位置错误,请先修改下~

@@ -0,0 +1,173 @@
system:
mode: 0 # 0 for graph mode, 1 for pynative mode in MindSpore
distribute: true #2023.06.12 modify
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

drop_overflow_update: False

common:
character_dict_path: &character_dict_path #改charset_36.txt mindocr/utils/dict/en_dict.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean #改charset_36.txt

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。


model:
type: rec
pretrained : "/home/gaohan/code/abinet/mindocr_ckpt.ckpt"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path 不要用自己地址,参考crnn config

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据地址还没有改,为了方便本地调试。

name: RecCTCLabelDecode
character_dict_path: *character_dict_path
use_space_char: *use_space_char
#postprocess和metirc需要改
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#需要改 这种无意义的comment 需要去掉

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

opt: adam


# loss_scaler:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要loss_scaler?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为没有使用混合精度,所以应该不需要使用loss_scaler。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不属于backbone,请摆在合适位置

Copy link
Collaborator Author

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 = [], []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大量comment请删除

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src 命名改成 blocks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src 命名改成 blocks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loss 不属于backbone

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

@safeandnewYH safeandnewYH force-pushed the main branch 4 times, most recently from e94f7a1 to a69c5d5 Compare June 14, 2023 11:40
@safeandnewYH
Copy link
Collaborator Author

主要修改了文件位置和中文注释的问题


return self._next_image(lmdb_idx)

# 这里的image是PIL.Image类型的,没法用Mindspore直接加载,因此用np转换了一下
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些中文注释请修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

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)}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释掉的代码块,如果不需要,请删除

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

"name": "ABINet_Head",
},
}
model = ABINet_Model_Test(model_config)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个为什么加test?不如直接叫模型的名字

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据集路径记得改成通用的。自己调试在本地改回去即可

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator

@zhtmike zhtmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外请提供对应的README文件

__all__ = ["ABINet_Dataset"]


class ABINet_Dataset:
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是指ABINet_Dataset类的话,因为在__getitem__方法中做了特殊处理,因此没法直接用LMDBDataset 代替,不过应该有可以简化代码的地方,后续可以进行修改。

Copy link
Collaborator

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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class命名无需下划线

Copy link
Collaborator Author

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
Copy link
Collaborator

@zhtmike zhtmike Jun 15, 2023

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

Copy link
Collaborator Author

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__ = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只需要 export ABINetIter_Backboneabinet_backbone,其他不要再__all__里面。 ABINetIter_Backbone 去除下划线

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

Copy link
Collaborator

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

Copy link
Collaborator Author

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。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯请复用code,使用继承等方式修改需要改的地方,避免大量copy paste

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,后续我查一下代码,可以精简的地方简化一下。

import mindspore as ms
from mindspore import nn

from ..backbones.rec_abinet_backbone import Model, PositionalEncoding
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样不应该引用backbone内容

Copy link
Collaborator Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretrain那段需保留,请按crnn方式修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。


default_cfgs = {
# 'abinet':
"crnn_resnet34": _cfg(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

内容不对

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为现在还没有上传abinet的ckpt到mindspore上,所以此处只是做了个标记,后续会更改url的内容。

@@ -0,0 +1,36 @@
0 a
1 b
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此模型最好需要一个这样格式的dict,虽然默认的dict包含更多字符,但还需额外处理。上面有问题提到可以把需要复用的代码放到一个文件夹里,这个dict也可以作为此模型专用的字典放置进去。

Copy link
Collaborator Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哪里需要用到pandas?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

@safeandnewYH safeandnewYH force-pushed the main branch 3 times, most recently from 88491b2 to d0026eb Compare June 15, 2023 11:01
@safeandnewYH
Copy link
Collaborator Author

根据意见已修改,README暂时还未添加。


model:
type: rec
pretrained : "/tmp_rec/pretrain/mindocr_ckpt.ckpt"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议补充说明下这个pretrained模型怎么准备

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,后续在README中会添加。

__all__ = ["ABINet_Dataset"]


class ABINet_Dataset:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重合的地方可以继承复用,做了特殊处理可以覆盖


if i == 2:
pt_logits = output["logits"]
weight = 1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if条件底下的 weight = 1.0 是不是可以删掉

Copy link
Collaborator Author

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

Copy link
Collaborator

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

Copy link
Collaborator Author

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"
Copy link
Collaborator

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'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

zeroo = ms.ops.Zeros()
zeros = zeroo((96, 26, 512), ms.float32)
zeros = zeros.transpose(1, 0, 2)
qeury = self.pos_encoder(zeros)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

变量名是否改成 query 更准确?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢,已修改。

@safeandnewYH
Copy link
Collaborator Author

已删掉abinet_dataset

@safeandnewYH safeandnewYH force-pushed the main branch 2 times, most recently from 4cd3f1c to f90d7f7 Compare June 17, 2023 14:52
@safeandnewYH
Copy link
Collaborator Author

已尽量复用数据变换部分,Transformer部分留下了TransformerEncoder、TransformerDecoder、TransformerEncoderLayer、TransformerDecoderLayer部分,因为这四部分相对于mindspore.nn.transformer做了修改。

@zhtmike zhtmike requested a review from hadipash June 19, 2023 08:44
@safeandnewYH safeandnewYH force-pushed the main branch 3 times, most recently from ab07941 to ea5e2ba Compare June 19, 2023 14:31

| **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)
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,谢谢。


| **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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Collaborator Author

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

device_id=5 删除

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,谢谢。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABINet 是使用了预训练模型了吗,我看config没有?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加,谢谢。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

怎么产生预训练模型和如何使用,README需要补充下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

预训练模型从原作者repo中得到,会在README补充如何使用。


在这里,我们使用 `train/` 文件夹下的数据集进行训练,我们使用 `evaluation/` 下的数据集来评估模型的准确性。

**Train:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据集大小需要补充下,参考CRNN

Copy link
Collaborator Author

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个修改要改回去

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,谢谢。

super().__init__()
self.ce = SoftCrossEntropyLoss()
self.bce = nn.BCELoss(reduction="mean")
self.losses = ms.Parameter([])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.losses 还有 last_losses 似乎没用到,否则可删去

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,谢谢。

@safeandnewYH
Copy link
Collaborator Author

已按照意见修改。


| **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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文readme同步修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,谢谢。

CVRescale,
)

_logger = Logger("mindocr")
Copy link
Collaborator

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__)打印信息


| **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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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)

Copy link
Collaborator

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同步修改

@HaoyangLee HaoyangLee merged commit 96fff90 into mindspore-lab:main Jul 7, 2023
import cv2
import numpy as np
import PIL
import six
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants