xavysp / DexiNed

DexiNed: Dense EXtreme Inception Network for Edge Detection
MIT License
729 stars 156 forks source link

Test cannot be executed #14

Closed hajime-te closed 4 years ago

hajime-te commented 4 years ago

Hi.

When I try the command: python run_model.py --image_width=512 --image_height=512 result file will not be created because the process is completed without any error message.

When I checked it with the VScode debugger, the process ended at the place where saver.restore(session, meta_model_file) in test.py was executed

How can I solve this error?

My environment is as follows OS Windows10 1903 Python 3.7.5 tensorflow 1.15.0 gpu_py37hc3743a6_0 tensorflow-base 1.15.0 gpu_py37h1afeea4_0 tensorflow-estimator 1.15.1 pyh2649769_0 tensorflow-gpu 1.15.0 h0d30ee6_0

Folder structure is as follows

DexiNed
│  run_model.py
│  test.py
│  train.py
│
├─checkpoints
│  └─DXN_BIPED
│      └─train
│          ├─data_lists
│          │  └─MDBD
│          │          test_pair.lst
│          │
│          └─train_1
│                  checkpoint
│                  DXN-149736.data-00000-of-00001
│                  DXN-149736.index
│                  DXN-149736.meta
│
├─data
│      lena_std.tif
│
├─models
│  │  dexined.py
│  │
│  └─__pycache__
│          dexined.cpython-37.pyc
│
├─utls
│  │  dataset_manager.py
│  │  losses.py
│  │  utls.py
│  │
│  └─__pycache__
│          dataset_manager.cpython-37.pyc
│          losses.cpython-37.pyc
│          utls.cpython-37.pyc
...
omit fig, DexiNed-Pytorch,__pycache__ folders and some files

Console message is as follow

(develop) PS D:\DownLoad\DexiNed>  ${env:DEBUGPY_LAUNCHER_PORT}='56968'; & 'D:\Program\anaconda\envs\develop\python.exe' 'c:\Users\EF070104\.vscode\extensions\ms-python.python-2020.3.71659\pythonFiles\lib\python\debugpy\wheels\debugpy\launcher' 'd:\DownLoad\DexiNed\run_model.py' '--image_width=512' '--image_height=512' 
2020-05-07 13:08:29.825687: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From d:\DownLoad\DexiNed\run_model.py:80: The name tf.GPUOptions is deprecated. Please use tf.compat.v1.GPUOptions instead.

WARNING:tensorflow:From d:\DownLoad\DexiNed\run_model.py:85: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

WARNING:tensorflow:From d:\DownLoad\DexiNed\run_model.py:85: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

2020-05-07 13:08:36.481410: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
2020-05-07 13:08:36.545803: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-05-07 13:08:36.608447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: 
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:05:00.0
2020-05-07 13:08:36.633484: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2020-05-07 13:08:36.663004: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2020-05-07 13:08:36.679586: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2020-05-07 13:08:36.691120: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2020-05-07 13:08:36.707423: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2020-05-07 13:08:36.733712: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2020-05-07 13:08:36.784385: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-05-07 13:08:36.811904: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-05-07 13:08:37.929742: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-07 13:08:37.947008: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0 
2020-05-07 13:08:37.958089: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
2020-05-07 13:08:37.999426: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8784 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:05:00.0, compute capability: 6.1)
WARNING:tensorflow:From d:\DownLoad\DexiNed\models\dexined.py:30: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From d:\DownLoad\DexiNed\models\dexined.py:48: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

WARNING:tensorflow:From d:\DownLoad\DexiNed\models\dexined.py:53: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.      
Instructions for updating:
Use `tf.keras.layers.Conv2D` instead.
WARNING:tensorflow:From D:\Program\anaconda\envs\develop\lib\site-packages\tensorflow_core\python\layers\convolutional.py:424: 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 d:\DownLoad\DexiNed\models\dexined.py:297: conv2d_transpose (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.keras.layers.Conv2DTranspose` instead.
[07 May 2020 13h08m41s][INFO]Build model finished: 3.7531s
WARNING:tensorflow:From d:\DownLoad\DexiNed\test.py:37: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
xavysp commented 4 years ago

Hi @hajime-te

sorry, I cannot understand why that is a problem, The version of TF what I used to test the test.py :) was 1.13.1, and last week I tested on 1.15.2. Now the PC that I am using has TensorFlow 2.1.

When you change the structure of checkpoints did you change the code also? if don't it should be as follow:

├─checkpoints
│  └─DXN_BIPED
│      └─train
│      ├─data_lists
│      │  └─MDBD
│      │          test_pair.lst
│      │
│      └─train_1
│                  checkpoint
│                  DXN-149736.data-00000-of-00001
│                  DXN-149736.index
│                  DXN-149736.meta

For the successful opening of checkpoints, the container dir must be structured as you see above.

hajime-te commented 4 years ago

Thanks for your help. Your answer solved my problem!