#38 [Model] Add EAST(OCR) model

Merged
Erpim merged 9 commits from ziqi/MSAdapterModelZoo:master into master 9 months ago
ziqi commented 9 months ago
- transfer EAST-pytorch to EAST-msadapter - support train, test, detect function
zoulq reviewed 9 months ago
official/cv/EAST/EAST-msadapter/README.md
@@ -0,0 +14,4 @@
Only tested on
* Anaconda3
* Python 3.7.1
* PyTorch 1.0.1
zoulq commented 9 months ago
源代码是基于pytorch 1.0.1版本? 另外这个readme主要给msadapter用户看的,所以这里应该主要体现msadpate相关信息
ziqi commented 9 months ago
已修改
zoulq reviewed 9 months ago
official/cv/EAST/EAST-msadapter/README.md
@@ -0,0 +71,4 @@
* Change the ```evaluate/gt.zip``` if you test on other datasets.
* Modify the parameters in ```eval.py``` and run:
```
CUDA_VISIBLE_DEVICES=0 python eval.py
zoulq commented 9 months ago
同上,这里的readme使用对象是msadapter的用户,主要描述基于GPU/Ascend的使用方式
zoulq reviewed 9 months ago
@@ -0,0 +1,61 @@
## [EAST Description](#contents)
zoulq commented 9 months ago
这个readme路径是不是和上面的反了?
ziqi commented 9 months ago
已删除两个目录的README文件,公用一个外部的README
Erpim reviewed 9 months ago
official/cv/EAST/EAST-msadapter/model.py
@@ -0,0 +22,4 @@
layers += [conv2d, nn.ReLU(inplace=True)]
# layers += [conv2d, nn.ReLU(inplace=False)] # for graph mode accelerating
in_channels = v
return nn.ModuleList(layers)
Erpim commented 9 months ago
备注下为什么这里和torch的不一致
ziqi commented 9 months ago
已备注
Erpim reviewed 9 months ago
official/cv/EAST/EAST-msadapter/eval.py
@@ -0,0 +16,4 @@

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = EAST(False).to(device)
model.load_state_dict(torch.load(model_name, map_location='cpu'))
Erpim commented 9 months ago
map_location='cpu'可以删除了?
ziqi commented 9 months ago
可以删除,已删除
Erpim reviewed 9 months ago
official/cv/EAST/EAST-msadapter/detect.py
@@ -0,0 +199,4 @@
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = EAST().to(device)
model.load_state_dict(torch.load(model_path, map_location='cpu'))
Erpim commented 9 months ago
map_location='cpu' 可删?
Erpim reviewed 9 months ago
@@ -0,0 +4,4 @@
from PIL import Image
import math
import os
from msadapter.pytorch.utils import data
Erpim commented 9 months ago
这三个引入顺序和torch脚本对齐
ziqi commented 9 months ago
已修改
Erpim merged commit a80820e2e3 into master 9 months ago
The pull request has been merged as a80820e2e3.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.