teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

書式の改善

2021/02/16 05:06

投稿

ban.
ban.

スコア4

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,6 @@
1
1
  Windows 10 で YOLOv3 を自前画像で学習させることを行っていますが以下のエラーが出てしまいました。助けてください。
2
2
 
3
- (tf114) C:\Users\std09\Downloads\keras-yolo3\keras-yolo3-master>python train.py
3
+ (tf114) C:\keras-yolo3\keras-yolo3-master>python train.py
4
4
  Using TensorFlow backend.
5
5
  C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
6
6
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
@@ -26,16 +26,73 @@
26
26
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
27
27
  C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
28
28
  np_resource = np.dtype([("resource", np.ubyte, 1)])
29
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:95: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.
30
+
31
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:98: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.
32
+
33
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:102: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.
34
+
35
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.
36
+
37
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
38
+
39
+ 2021-02-16 14:07:39.385171: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
40
+ 2021-02-16 14:07:39.389988: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
41
+ 2021-02-16 14:07:39.392874: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
42
+ 2021-02-16 14:07:39.397734: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: ELNET09
43
+ 2021-02-16 14:07:39.399635: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: ELNET09
44
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:1919: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.
45
+
46
+ Create YOLOv3 model with 9 anchors and 2 classes.
47
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_59 due to mismatch in shape ((1, 1, 1024, 21) vs (255, 1024, 1, 1)).
48
+ weight_values[i].shape))
49
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_59 due to mismatch in shape ((21,) vs (255,)).
50
+ weight_values[i].shape))
51
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_67 due to mismatch in shape ((1, 1, 512, 21) vs (255, 512, 1, 1)).
52
+ weight_values[i].shape))
53
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_67 due to mismatch in shape ((21,) vs (255,)).
54
+ weight_values[i].shape))
55
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_75 due to mismatch in shape ((1, 1, 256, 21) vs (255, 256, 1, 1)).
56
+ weight_values[i].shape))
57
+ C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_75 due to mismatch in shape ((21,) vs (255,)).
58
+ weight_values[i].shape))
59
+ Load weights model_data/yolo_weights.h5.
60
+ Freeze the first 249 layers of total 252 layers.
61
+ WARNING:tensorflow:From C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py:3080: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
62
+ Instructions for updating:
63
+ Use tf.where in 2.0, which has the same broadcast rule as np.where
64
+ Train on 42 samples, val on 4 samples, with batch size 32.
65
+ Epoch 1/50
29
66
  Traceback (most recent call last):
30
67
  File "train.py", line 190, in <module>
31
68
  _main()
32
- File "train.py", line 33, in _main
69
+ File "train.py", line 65, in _main
33
- freeze_body=2, weights_path='model_data/yolo_weights.h5') # make sure you know what you freeze
34
- File "train.py", line 108, in create_model
35
- K.clear_session() # get a new session
70
+ callbacks=[logging, checkpoint])
36
- File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py", line 102, in clear_session
71
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
72
+ return func(*args, **kwargs)
73
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\training.py", line 1418, in fit_generator
74
+ initial_epoch=initial_epoch)
75
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\engine\training_generator.py", line 181, in fit_generator
37
- _GRAPH_LEARNING_PHASES[tf.compat.v1.get_default_graph] = phase
76
+ generator_output = next(output_generator)
77
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\utils\data_utils.py", line 709, in get
78
+ six.reraise(*sys.exc_info())
79
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\six.py", line 703, in reraise
80
+ raise value
81
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\utils\data_utils.py", line 685, in get
82
+ inputs = self.queue.get(block=True).get()
83
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\multiprocessing\pool.py", line 657, in get
84
+ raise self._value
85
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\multiprocessing\pool.py", line 121, in worker
86
+ result = (True, func(*args, **kwds))
87
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\utils\data_utils.py", line 626, in next_sample
88
+ return six.next(_SHARED_SEQUENCES[uid])
38
- NameError: name 'phase' is not defined
89
+ File "train.py", line 175, in data_generator
39
-
90
+ image, box = get_random_data(annotation_lines[i], input_shape, random=True)
91
+ File "C:\keras-yolo3\keras-yolo3-master\yolo3\utils.py", line 39, in get_random_data
92
+ image = Image.open(line[0])
93
+ File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\PIL\Image.py", line 2904, in open
94
+ fp = builtins.open(filename, "rb")
95
+ FileNotFoundError: [Errno 2] No such file or directory: 'image_015'
96
+ 最後のエラーはやるたびにimage_015の数字が変わります。
40
97
  [参考文献]
41
98
  https://rightcode.co.jp/blog/information-technology/learn-yolov3-image-windows10-environment-construction#_YOLOv3

1

書式の改善

2021/02/16 05:05

投稿

ban.
ban.

スコア4

title CHANGED
File without changes
body CHANGED
@@ -35,6 +35,7 @@
35
35
  K.clear_session() # get a new session
36
36
  File "C:\Users\std09\Anaconda3\envs\tf114\lib\site-packages\keras\backend\tensorflow_backend.py", line 102, in clear_session
37
37
  _GRAPH_LEARNING_PHASES[tf.compat.v1.get_default_graph] = phase
38
+ NameError: name 'phase' is not defined
38
39
 
39
40
  [参考文献]
40
41
  https://rightcode.co.jp/blog/information-technology/learn-yolov3-image-windows10-environment-construction#_YOLOv3