質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
ちゃんと読み込めてはいると思うのですが。。。
|
4
4
|
```
|
5
5
|
DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
|
6
|
-
target_diff = np.count_nonzero(result_img != target_img)
|
6
|
+
target_diff = np.count_nonzero(result_img != target_img)
|
7
7
|
00257_00264_00.png out00_01.png 0 0
|
8
8
|
・
|
9
9
|
・
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
下のコードを実行すると、以下のエラー分と出力結果が出てきます。
|
2
|
-
|
2
|
+
1.0と出力されている部分がおかしいです。
|
3
3
|
ちゃんと読み込めてはいると思うのですが。。。
|
4
4
|
```
|
5
5
|
DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
|
@@ -8,8 +8,8 @@
|
|
8
8
|
・
|
9
9
|
・
|
10
10
|
・
|
11
|
-
|
11
|
+
1.0 #マスク画像と比較
|
12
|
-
|
12
|
+
434 #隣と比較
|
13
13
|
```
|
14
14
|
```python
|
15
15
|
import pathlib
|
@@ -64,12 +64,16 @@
|
|
64
64
|
prev_diff = 0
|
65
65
|
prev_img = None
|
66
66
|
for i in range(img_num):
|
67
|
-
result_img = result_imgs[i]
|
67
|
+
result_img = result_imgs[i] & 1
|
68
|
-
target_img = target_imgs[i] * 255
|
68
|
+
# target_img = target_imgs[i] * 255
|
69
|
+
target_img = target_imgs[i] & 1
|
69
70
|
|
71
|
+
# print(result_img.shape)
|
72
|
+
# print(target_img.shape)
|
73
|
+
|
70
|
-
target_diff = np.count_nonzero(result_img != target_img)
|
74
|
+
target_diff = np.count_nonzero(result_img != target_img)
|
71
75
|
if i > 0:
|
72
|
-
prev_diff = np.count_nonzero(result_img != prev_img)
|
76
|
+
prev_diff = np.count_nonzero(result_img != prev_img)
|
73
77
|
|
74
78
|
print(f"{result_names[i].name} {target_names[i].name} {target_diff} {prev_diff}")
|
75
79
|
target_sum += target_diff
|