joshi-bharat / deep_underwater_localization

Source Code for "DeepURL: Deep Pose Estimation Framework for Underwater Relative Localization", IROS 2020
GNU General Public License v3.0
24 stars 11 forks source link

I run the train.py and then I got these errors. The environments are the same as README.md. #3

Closed julingers closed 3 years ago

julingers commented 3 years ago

/home/juling/anaconda3/envs/py37/bin/python3.7 /home/juling/PycharmProjects/deepURL/train.py WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:23: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From /home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py:1475: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:37: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version. Instructions for updating: tf.py_func is deprecated in TF V2. Instead, there are two options available in V2.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:44: The name tf.data.Iterator is deprecated. Please use tf.compat.v1.data.Iterator instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:44: DatasetV1.output_types (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.data.get_output_types(dataset). WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:44: DatasetV1.output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.data.get_output_shapes(dataset). WARNING:tensorflow:From /home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py:347: Iterator.output_types (from tensorflow.python.data.ops.iterator_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.data.get_output_types(iterator). WARNING:tensorflow:From /home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py:348: Iterator.output_shapes (from tensorflow.python.data.ops.iterator_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.data.get_output_shapes(iterator). WARNING:tensorflow:From /home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py:350: Iterator.output_classes (from tensorflow.python.data.ops.iterator_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.data.get_output_classes(iterator). WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:63: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

WARNING:tensorflow:From /home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/contrib/layers/python/layers/layers.py:1057: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version. Instructions for updating: Please use layer.__call__ method instead. WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/utils/layer_utils.py:86: The name tf.image.resize_nearest_neighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/model.py:294: The name tf.log is deprecated. Please use tf.math.log instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:72: The name tf.losses.get_regularization_loss is deprecated. Please use tf.compat.v1.losses.get_regularization_loss instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:75: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:78: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:91: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/utils/misc_utils.py:146: The name tf.train.piecewise_constant is deprecated. Please use tf.compat.v1.train.piecewise_constant instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/utils/misc_utils.py:154: The name tf.train.MomentumOptimizer is deprecated. Please use tf.compat.v1.train.MomentumOptimizer instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:107: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

Saving optimizer parameters to checkpoint! Remember to restore the global_step in the fine-tuning afterwards. WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:120: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:123: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2021-07-22 15:39:40.089153: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2021-07-22 15:39:40.110998: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2699905000 Hz 2021-07-22 15:39:40.111317: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55bbbe9d3ae0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2021-07-22 15:39:40.111347: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2021-07-22 15:39:40.113514: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1 2021-07-22 15:39:40.226792: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-07-22 15:39:40.227612: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55bbbda483c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2021-07-22 15:39:40.227627: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce 940MX, Compute Capability 5.0 2021-07-22 15:39:40.227814: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-07-22 15:39:40.228522: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: GeForce 940MX major: 5 minor: 0 memoryClockRate(GHz): 1.189 pciBusID: 0000:01:00.0 2021-07-22 15:39:40.228620: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228674: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228735: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228799: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228849: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228898: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228949: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory 2021-07-22 15:39:40.228956: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2021-07-22 15:39:40.228967: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2021-07-22 15:39:40.228973: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2021-07-22 15:39:40.228978: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:124: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:124: The name tf.local_variables_initializer is deprecated. Please use tf.compat.v1.local_variables_initializer instead.

INFO:tensorflow:Restoring parameters from /home/juling/PycharmProjects/deepURL/data/darknet_weights/yolov3.ckpt WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:126: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.

WARNING:tensorflow:From /home/juling/PycharmProjects/deepURL/train.py:127: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.

----------- start to train -----------

0%| | 0/8228 [00:00<?, ?it/s]2021-07-22 15:40:42.426605: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:42.426959: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:42.428550: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:43.336065: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

0%| | 0/8228 [00:38<?, ?it/s] 2021-07-22 15:40:43.340091: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:43.340477: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:43.537734: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

2021-07-22 15:40:43.742177: W tensorflow/core/framework/op_kernel.cc:1639] Invalid argument: TypeError: '>=' not supported between instances of 'NoneType' and 'int' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 250, in random_brightness return np.clip(img, 0, 255)

File "<__array_function__ internals>", line 6, in clip

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2084, in clip return _wrapfunc(a, 'clip', a_min, a_max, out=out, **kwargs)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc return _wrapit(obj, method, *args, **kwds)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 47, in _wrapit result = getattr(asarray(obj), method)(*args, **kwds)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/_methods.py", line 132, in _clip um.clip, a, min, max, out=out, casting=casting, **kwargs)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/_methods.py", line 85, in _clip_dep_invoke_with_casting return ufunc(*args, out=out, **kwargs)

TypeError: '>=' not supported between instances of 'NoneType' and 'int'

2021-07-22 15:40:43.742373: W tensorflow/core/framework/op_kernel.cc:1639] Invalid argument: TypeError: '>=' not supported between instances of 'NoneType' and 'int' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 250, in random_brightness return np.clip(img, 0, 255)

File "<__array_function__ internals>", line 6, in clip

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2084, in clip return _wrapfunc(a, 'clip', a_min, a_max, out=out, **kwargs)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc return _wrapit(obj, method, *args, **kwds)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 47, in _wrapit result = getattr(asarray(obj), method)(*args, **kwds)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/_methods.py", line 132, in _clip um.clip, a, min, max, out=out, casting=casting, **kwargs)

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/numpy/core/_methods.py", line 85, in _clip_dep_invoke_with_casting return ufunc(*args, out=out, **kwargs)

TypeError: '>=' not supported between instances of 'NoneType' and 'int'

2021-07-22 15:40:43.937299: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

Traceback (most recent call last): File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.UnknownError: {{function_node __inference_Datasetmap_146}} AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

 [[{{node PyFunc}}]]
 [[IteratorGetNext]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/juling/PycharmProjects/deepURL/train.py", line 143, in feed_dict={is_training: True}) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run run_metadata_ptr) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run run_metadata) File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: {{function_node __inference_Datasetmap_146}} AttributeError: 'NoneType' object has no attribute 'astype' Traceback (most recent call last):

File "/home/juling/anaconda3/envs/py37/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 266, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52, singleshot, y_true_13_mask,y_true_26_mask, y_true_52_mask = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize, nV=nV)

File "/home/juling/PycharmProjects/deepURL/utils/data_utils.py", line 195, in parse_data img = random_color_distort(img)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 253, in random_color_distort img = random_brightness(img, brightness_delta)

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32)

AttributeError: 'NoneType' object has no attribute 'astype'

 [[{{node PyFunc}}]]
 [[IteratorGetNext]]

Process finished with exit code 1

julingers commented 3 years ago

Hi, I read your paper accepted in IROS 2020 and I am interested in your research. But when I'm going to reproduce your paper, I met some problems.Can you help me? Thanks!

joshi-bharat commented 3 years ago

@julingers Looks like it is not getting images. Can you print the image filename and check if the image is there?

julingers commented 3 years ago

@julingers Looks like it is not getting images. Can you print the image filename and check if the image is there?

I print the image and image_ids that added after line 48 of train.py. And the console outputs the following information.

Tensor("IteratorGetNext:0", dtype=int64) Tensor("IteratorGetNext:1", dtype=float32)

So I think maybe images have been read. But I don't know what went wrong. And I haven't changed the source code. So is it a source code problem? I am not sure.

joshi-bharat commented 3 years ago

@julingers Looks like it is not getting images. Can you print the image filename and check if the image is there?

I print the image and image_ids that added after line 48 of train.py. And the console outputs the following information.

Tensor("IteratorGetNext:0", dtype=int64) Tensor("IteratorGetNext:1", dtype=float32)

So I think maybe images have been read. But I don't know what went wrong. And I haven't changed the source code. So is it a source code problem? I am not sure.

joshi-bharat commented 3 years ago

@julingers I am sure the images are not loading and you do not need CycleGAN to run this as I have already created the dataset. Just to be sure you need TensorFlow 1.

File "/home/juling/PycharmProjects/deepURL/utils/data_aug.py", line 247, in random_brightness img = img.astype(np.float32) AttributeError: 'NoneType' object has no attribute 'astype' This means there is no image read.

You need to go to data/my-data/final-train.txt and change the location of images there to the folder you downloaded. Also, please double-check that all the images in this file are in the data folder you downloaded from https://drive.google.com/drive/folders/1F0TxTIQDR1GJoZxdCPi6o5IMV-UyL0FL. You need to download synthetic.zip for training.

julingers commented 3 years ago

@joshi-bharat Thank you for your detailed reply! I check the final_train.txt (32915 lines) and I found that txt only has 26902 tags with corresponding images in the synthetic dataset. Therefore, there are 6013 tags in the final_train.txt that do not have corresponding pictures in the synthetic dataset. Then I delete those 6013 tags and errors were solved.

joshi-bharat commented 3 years ago

@joshi-bharat Thank you for your detailed reply! I check the final_train.txt (32915 lines) and I found that txt only has 26902 tags with corresponding images in the synthetic dataset. Therefore, there are 6013 tags in the final_train.txt that do not have corresponding pictures in the synthetic dataset. Then I delete those 6013 tags and errors were solved.

Thanks, I will check again that all the images are in zip file.