質問編集履歴
5
エラーメッセージの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,7 +52,27 @@
|
|
52
52
|
|
53
53
|
```
|
54
54
|
|
55
|
-
|
55
|
+
|
56
|
+
|
57
|
+
C:\pleiades\python\3\lib\site-packages\numpy\core\_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
|
58
|
+
|
59
|
+
return array(a, dtype, copy=False, order=order)
|
60
|
+
|
61
|
+
Exception in Tkinter callback
|
62
|
+
|
63
|
+
Traceback (most recent call last):
|
64
|
+
|
65
|
+
File "C:\pleiades\python\3\lib\tkinter\__init__.py", line 1705, in __call__
|
66
|
+
|
67
|
+
return self.func(*args)
|
68
|
+
|
69
|
+
File "C:\pleiades\workspace\LogicCulc\LogicCulc_Chainer_v2\NetworkCreator\NetworkCreator.py", line 485, in selected_ds
|
70
|
+
|
71
|
+
newtrain_data = np.asarray(train_data)
|
72
|
+
|
73
|
+
File "C:\pleiades\python\3\lib\site-packages\numpy\core\_asarray.py", line 83, in asarray
|
74
|
+
|
75
|
+
return array(a, dtype, copy=False, order=order)
|
56
76
|
|
57
77
|
ValueError: could not broadcast input array from shape (3,150,150) into shape (3)
|
58
78
|
|
4
補足情報を追加した
test
CHANGED
File without changes
|
test
CHANGED
@@ -272,6 +272,6 @@
|
|
272
272
|
|
273
273
|
### 補足情報(FW/ツールのバージョンなど)
|
274
274
|
|
275
|
-
|
276
|
-
|
277
|
-
|
275
|
+
chainerのデータセットの作り方は以下のサイトを参考にしました
|
276
|
+
|
277
|
+
https://qiita.com/tommyfms2/items/c3fa0cb258c17468cb30
|
3
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
リストからnumpy配列に変換できない
|
test
CHANGED
File without changes
|
2
コードを全文入れた
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
現在自作のデータセットを作り、そこからchainerを使って学習しようとしています。
|
3
|
+
現在自作のカラー画像データセットを作り、そこからchainerを使って学習しようとしています。
|
4
4
|
|
5
5
|
画像データセットは以下のように作っています
|
6
6
|
|
@@ -66,6 +66,82 @@
|
|
66
66
|
|
67
67
|
```ここに言語名を入力
|
68
68
|
|
69
|
+
import os
|
70
|
+
|
71
|
+
import numpy as np
|
72
|
+
|
73
|
+
import glob
|
74
|
+
|
75
|
+
import cv2
|
76
|
+
|
77
|
+
import chainer
|
78
|
+
|
79
|
+
import pickle
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
from chainer import cuda, Function, gradient_check, report, training, utils, Variable
|
84
|
+
|
85
|
+
from chainer import datasets, iterators, optimizers, serializers
|
86
|
+
|
87
|
+
from chainer.datasets import tuple_dataset, TupleDataset
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
image_dir0 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\buildings"
|
92
|
+
|
93
|
+
image_dir1 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\forest"
|
94
|
+
|
95
|
+
image_dir2 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\glacier"
|
96
|
+
|
97
|
+
image_dir3 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\mountain"
|
98
|
+
|
99
|
+
image_dir4 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\sea"
|
100
|
+
|
101
|
+
image_dir5 = r"C:\Users\user\Desktop\archive\seg_train\seg_train\street"
|
102
|
+
|
103
|
+
image_dir6 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\buildings"
|
104
|
+
|
105
|
+
image_dir7 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\forest"
|
106
|
+
|
107
|
+
image_dir8 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\glacier"
|
108
|
+
|
109
|
+
image_dir9 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\mountain"
|
110
|
+
|
111
|
+
image_dir10 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\sea"
|
112
|
+
|
113
|
+
image_dir11 = r"C:\Users\user\Desktop\archive\seg_test\seg_test\street"
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
search_pattern = '*.jpg'
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
datas0 = []
|
122
|
+
|
123
|
+
datas1 = []
|
124
|
+
|
125
|
+
datas2 = []
|
126
|
+
|
127
|
+
datas3 = []
|
128
|
+
|
129
|
+
datas4 = []
|
130
|
+
|
131
|
+
datas5 = []
|
132
|
+
|
133
|
+
datas6 = []
|
134
|
+
|
135
|
+
datas7 = []
|
136
|
+
|
137
|
+
datas8 = []
|
138
|
+
|
139
|
+
datas9 = []
|
140
|
+
|
141
|
+
datas10= []
|
142
|
+
|
143
|
+
datas11= []
|
144
|
+
|
69
145
|
#(画像データセットの作り方(これを12個作ります。))
|
70
146
|
|
71
147
|
for image_path in glob.glob(os.path.join(image_dir0,search_pattern)):
|
1
タイトルを変更いたしました
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
chainerを用いた自作画像セット作成
|
test
CHANGED
File without changes
|