You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| bboxes |`torch.FloatTensor`| Bounding boxes `[x1, x2, y1, y2]` with the shape `(N, 4)`. |
185
+
| bboxes |`torch.FloatTensor`| Bounding boxes `[x1, y1, x2, y2]` with the shape `(N, 4)`. |
186
186
| labels |`torch.LongTensor`| Instance label with the shape `(N, )`. |
187
187
| texts |`list[str]`| The text content of each instance with the shape `(N, )`,used for e2e text spotting or KIE task. |
188
188
| edge_labels |`torch.IntTensor`| The node adjacency matrix with the shape `(N, N)`. In the KIE task, the optional values for the state between nodes are `-1` (ignored, not involved in loss calculation),`0` (disconnected) and `1`(connected). |
We recommend that users follow our best practices to install MMOCR. However, the whole process is highly customizable. See [Customize Installation](#customize-installation) section for more information.
45
45
46
46
### Best Practices
47
47
48
-
**Step 0.** Install [MMEngine](https://github.com/open-mmlab/mmengine) and [MMCV](https://github.com/open-mmlab/mmcv) using [MIM](https://github.com/open-mmlab/mim).
48
+
**Step 0.** Install [MMEngine](https://github.com/open-mmlab/mmengine), [MMCV](https://github.com/open-mmlab/mmcv) and [MMDetection](https://github.com/open-mmlab/mmdetection) using [MIM](https://github.com/open-mmlab/mim).
49
49
50
50
```shell
51
51
pip install -U openmim
52
52
mim install mmengine
53
53
mim install 'mmcv>=2.0.0rc1'
54
+
mim install 'mmdet>=3.0.0rc0'
54
55
```
55
56
56
-
**Step 1.** Install [MMDetection](https://github.com/open-mmlab/mmdetection) as a dependency.
57
+
**Step 1.** Install MMOCR.
57
58
58
-
```shell
59
-
pip install 'mmdet>=3.0.0rc0'
60
-
```
59
+
If you wish to run and develop MMOCR directly, install it from **source** (recommended).
61
60
62
-
**Step 2.** Install MMOCR.
61
+
If you use MMOCR as a dependency or third-party package, install it with **MIM**.
63
62
64
-
Case A: If you wish to run and develop MMOCR directly, install it from source:
63
+
`````{tabs}
64
+
65
+
````{group-tab} Install from Source
65
66
66
67
```shell
68
+
67
69
git clone https://github.com/open-mmlab/mmocr.git
68
70
cd mmocr
69
71
git checkout 1.x
@@ -72,58 +74,99 @@ pip install -v -e .
72
74
# "-v" increases pip's verbosity.
73
75
# "-e" means installing the project in editable mode,
74
76
# That is, any local modifications on the code will take effect immediately.
77
+
75
78
```
76
79
77
-
Case B: If you use MMOCR as a dependency or third-party package, install it with pip:
80
+
````
81
+
82
+
````{group-tab} Install via MIM
78
83
79
84
```shell
80
-
pip install 'mmocr>=1.0.0rc0'
85
+
86
+
mim install 'mmocr>=1.0.0rc0'
87
+
81
88
```
82
89
83
-
**Step 3. (Optional)** If you wish to use any transform involving `albumentations` (For example, `Albu` in ABINet's pipeline), install the dependency using the following command:
90
+
````
91
+
92
+
`````
93
+
94
+
**Step 2. (Optional)** If you wish to use any transform involving `albumentations` (For example, `Albu` in ABINet's pipeline), install the dependency using the following command:
We recommend checking the environment after installing `albumentations` to
95
119
ensure that `opencv-python` and `opencv-python-headless` are not installed together, otherwise it might cause unexpected issues. If that's unfortunately the case, please uninstall `opencv-python-headless` to make sure MMOCR's visualization utilities can work.
96
120
97
121
Refer
98
-
to ['albumentations`'s official documentation](https://albumentations.ai/docs/getting_started/installation/#note-on-opencv-dependencies) for more details.
122
+
to [albumentations's official documentation](https://albumentations.ai/docs/getting_started/installation/#note-on-opencv-dependencies) for more details.
99
123
100
124
```
101
125
102
126
### Verify the installation
103
127
104
-
We provide a method to verify the installation via inference demo, depending on your installation method. You should be able to see a pop-up image and the inference result upon successful verification.
128
+
You may verify the installation via this inference demo.
0 commit comments