Commit cbf65e3
import cv2 inside class (#5659)
The line `optional_import("cv2")` causes the security light of my macOS
to light up in green, even for the lowest level command e.g., `import
monai`. I was worried I had a virus until I realised what was causing
it! To avoid worrying other users, I suggest we only import when a user
is using the `VideoDataset`.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com>1 parent e457a5a commit cbf65e3
2 files changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
| 1094 | + | |
1097 | 1095 | | |
1098 | 1096 | | |
1099 | 1097 | | |
1100 | 1098 | | |
1101 | 1099 | | |
1102 | 1100 | | |
1103 | | - | |
| 1101 | + | |
1104 | 1102 | | |
1105 | 1103 | | |
1106 | 1104 | | |
| |||
1141 | 1139 | | |
1142 | 1140 | | |
1143 | 1141 | | |
1144 | | - | |
1145 | | - | |
| 1142 | + | |
1146 | 1143 | | |
1147 | 1144 | | |
1148 | 1145 | | |
| |||
1173 | 1170 | | |
1174 | 1171 | | |
1175 | 1172 | | |
1176 | | - | |
| 1173 | + | |
1177 | 1174 | | |
1178 | 1175 | | |
1179 | 1176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
0 commit comments