Closed Randa-NACHET closed 2 years ago
I'm also facing similar issue.
Authors, Kindly assist.
Hi, it seems glob here cannot find the input images you are trying to process. This could be either because you are giving the source_dir wrong, or there is no image with '.png' or '.jpg'. If you are interested in processing images with different extensions, you can add them here and try.
Hope that helps, Baris
Hi Baris, Thanks for sharing your great work, I tried to run the code ( in google colab) and seems the image is processed but there is no output file in save folder, any hint to check what's wrong? Thanks in advance. Anjar
Using TensorFlow backend.
2022-04-20 04:51:47.459272: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2022-04-20 04:51:47.476187: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2022-04-20 04:51:47.727690: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-04-20 04:51:47.728489: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x558ee453fd40 executing computations on platform CUDA. Devices:
2022-04-20 04:51:47.728521: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Tesla T4, Compute Capability 7.5
2022-04-20 04:51:47.747854: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2199995000 Hz
2022-04-20 04:51:47.748082: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x558ee453ef40 executing computations on platform Host. Devices:
2022-04-20 04:51:47.748112: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0):
MTCNN loaded
/usr/local/envs/ostec/lib/python3.6/site-packages/kornia/augmentation/augmentation.py:1875: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
category=DeprecationWarning,
model [FaceReconModel] was created
loading the model from /content/drive/MyDrive/OSTeC/external/deep3dfacerecon/checkpoints/face_recon/epoch_latest.pth
Constructing DeepLabv3+ model...
Number of classes: 20
Output stride: 16
Number of Input Channels: 3
Scanning paths...
Scanning paths...
Started: source/2.jpg
/usr/local/envs/ostec/lib/python3.6/site-packages/torch/nn/functional.py:3121: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/usr/local/envs/ostec/lib/python3.6/site-packages/torch/nn/functional.py:3000: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and uses scale_factor directly, instead of relying on the computed output size. If you wish to keep the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "
/usr/local/envs/ostec/lib/python3.6/site-packages/torch/nn/functional.py:2941: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
2022-04-20 04:53:44.920458: I tensorflow/core/kernels/cuda_solvers.cc:159] Creating CudaSolver handles for stream 0x558ef746f2f0
2022-04-20 04:53:44.922530: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2022-04-20 04:53:45.713004: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
Preprocessing... Done in 42.82 secs
^C
I got stuck at different point when use different source image
Preprocessing... Done in 58.81 secs Building a Visibility Index... Done in 95.15 secs Projecting... bottom: loss 166.8283; id_loss 0.2106; lr 0.0375: 74% 147/200 [03:44<01:15, 1.42s/it] bottom Loss 166.8283 bottom_left: loss 164.7244; id_loss 0.1478; lr 0.0338: 76% 152/200 [03:37<01:08, 1.42s/it] bottom_left Loss 164.5726 bottom_right: loss 158.9339; id_loss 0.1570; lr 0.0417: 68% 137/200 [03:16<01:30, 1.43s/it] bottom_right Loss 158.5766 ^C
^C
It seems the script is interrupted (by keyboard). When you start seeing 'bottom' 'bottom_left' etc., it means it is working. Just be patient as it might take 5-10 minutes depending on the machine you are running it on.
Hope this helps, Baris
can you provide the colab notebook please?
Hi Baris, thanks for sharing your work, I tried to run the code ( in google colab). the FaceRecon Model was created, also the test_opt.txt. but there is no result (images).
Using TensorFlow backend. 2022-02-14 16:52:33.113699: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2022-02-14 16:52:33.119043: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz 2022-02-14 16:52:33.119314: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5644886c7d40 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2022-02-14 16:52:33.119366: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2022-02-14 16:52:33.121564: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1 2022-02-14 16:52:33.252205: 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 2022-02-14 16:52:33.253213: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56448856bd40 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2022-02-14 16:52:33.253252: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla K80, Compute Capability 3.7 2022-02-14 16:52:33.253528: 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 2022-02-14 16:52:33.254265: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 2022-02-14 16:52:33.254699: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0 2022-02-14 16:52:33.256152: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 2022-02-14 16:52:33.257373: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0 2022-02-14 16:52:33.257785: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0 2022-02-14 16:52:33.259474: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0 2022-02-14 16:52:33.260793: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0 2022-02-14 16:52:33.264730: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2022-02-14 16:52:33.264851: 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 2022-02-14 16:52:33.265688: 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 2022-02-14 16:52:33.266405: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0 2022-02-14 16:52:33.266498: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0 2022-02-14 16:52:33.268258: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-02-14 16:52:33.268321: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2022-02-14 16:52:33.268339: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N 2022-02-14 16:52:33.268511: 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 2022-02-14 16:52:33.269298: 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 2022-02-14 16:52:33.270104: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10813 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) 2022-02-14 16:52:35.228822: 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 2022-02-14 16:52:35.229581: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 2022-02-14 16:52:35.229682: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0 2022-02-14 16:52:35.229742: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 2022-02-14 16:52:35.229792: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0 2022-02-14 16:52:35.229851: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0 2022-02-14 16:52:35.229896: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0 2022-02-14 16:52:35.229942: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0 2022-02-14 16:52:35.229987: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2022-02-14 16:52:35.230102: 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 2022-02-14 16:52:35.230899: 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 2022-02-14 16:52:35.231592: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0 2022-02-14 16:52:35.231650: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-02-14 16:52:35.231673: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2022-02-14 16:52:35.231689: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N 2022-02-14 16:52:35.231805: 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 2022-02-14 16:52:35.232608: 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 2022-02-14 16:52:35.233400: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10813 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... 2022-02-14 16:52:36.641169: 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 2022-02-14 16:52:36.641936: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 2022-02-14 16:52:36.642055: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0 2022-02-14 16:52:36.642117: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 2022-02-14 16:52:36.642165: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0 2022-02-14 16:52:36.642255: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0 2022-02-14 16:52:36.642314: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0 2022-02-14 16:52:36.642360: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0 2022-02-14 16:52:36.642407: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2022-02-14 16:52:36.642506: 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 2022-02-14 16:52:36.643388: 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 2022-02-14 16:52:36.644114: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0 2022-02-14 16:52:36.644167: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-02-14 16:52:36.644188: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2022-02-14 16:52:36.644202: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N 2022-02-14 16:52:36.644335: 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 2022-02-14 16:52:36.645056: 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 2022-02-14 16:52:36.645756: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 10813 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) Loading... Done. Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... 2022-02-14 16:52:37.640597: 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 2022-02-14 16:52:37.641460: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 2022-02-14 16:52:37.641571: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0 2022-02-14 16:52:37.641625: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 2022-02-14 16:52:37.641674: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0 2022-02-14 16:52:37.641726: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0 2022-02-14 16:52:37.641774: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0 2022-02-14 16:52:37.641821: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0 2022-02-14 16:52:37.641871: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2022-02-14 16:52:37.641986: 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 2022-02-14 16:52:37.642752: 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 2022-02-14 16:52:37.643515: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0 2022-02-14 16:52:37.643576: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-02-14 16:52:37.643600: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2022-02-14 16:52:37.643616: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N 2022-02-14 16:52:37.643758: 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 2022-02-14 16:52:37.644520: 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 2022-02-14 16:52:37.645297: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 10813 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) Loading... Done. 2022-02-14 16:52:51.391704: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 2022-02-14 16:52:51.524127: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 Loading ResNet Model: 2022-02-14 16:54:07.694218: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-02-14 16:54:07.694277: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]
MTCNN loaded model [FaceReconModel] was created loading the model from /content/drive/MyDrive/OSTeC1/external/deep3dfacerecon/checkpoints/face_recon/epoch_latest.pth Scanning paths... Scanning paths...