Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Crash while extracting with full_face and --manual-fix #2

Closed
Kirin-kun opened this issue Jun 5, 2018 · 1 comment
Closed

Crash while extracting with full_face and --manual-fix #2

Kirin-kun opened this issue Jun 5, 2018 · 1 comment

Comments

@Kirin-kun
Copy link

C:\Users\Kirin>python c:\users\kirin\deepfacelab\main.py extract --input-dir H:\
fakes\harper --output-dir h:\fakes\harper\aligned.ip --detector dlib --face-type
 full_face --manual-fix
Running extractor.

Performing 1st pass...
Running on GeForce GTX 1060 6GB.
100%|██████████████████████████████████████████| 64/64 [00:11<00:00,  5.60it/s]
Performing 2nd pass...
Running on GeForce GTX 1060 6GB.
C:\Program Files\Python36\lib\site-packages\h5py\__init__.py:36: FutureWarning:
Conversion of the second argument of issubdtype from `float` to `np.floating` is
 deprecated. In future, it will be treated as `np.float64 == np.dtype(float).typ
e`.
  from ._conv import register_converters as _register_converters
2018-06-05 20:43:25.681946: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7715
pciBusID: 0000:01:00.0
totalMemory: 6.00GiB freeMemory: 5.58GiB
2018-06-05 20:43:25.690947: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-05 20:43:27.605056: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:923] Device interconnect StreamExecutor with strength 1
edge matrix:
2018-06-05 20:43:27.611057: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:929]      0
2018-06-05 20:43:27.616057: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:942] 0:   N
2018-06-05 20:43:27.621057: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:
0/task:0/device:GPU:0 with 5365 MB memory) -> physical GPU (device: 0, name: GeF
orce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
Using TensorFlow backend.
100%|██████████████████████████████████████████| 64/64 [00:12<00:00, 10.21it/s]
Performing manual fix...
Running on GeForce GTX 1060 6GB.
C:\Program Files\Python36\lib\site-packages\h5py\__init__.py:36: FutureWarning:
Conversion of the second argument of issubdtype from `float` to `np.floating` is
 deprecated. In future, it will be treated as `np.float64 == np.dtype(float).typ
e`.
  from ._conv import register_converters as _register_converters
2018-06-05 20:43:57.946792: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7715
pciBusID: 0000:01:00.0
totalMemory: 6.00GiB freeMemory: 5.58GiB
2018-06-05 20:43:57.957792: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-05 20:43:58.596829: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:923] Device interconnect StreamExecutor with strength 1
edge matrix:
2018-06-05 20:43:58.603829: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:929]      0
2018-06-05 20:43:58.607830: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:942] 0:   N
2018-06-05 20:43:58.612830: I T:\src\github\tensorflow\tensorflow\core\common_ru
ntime\gpu\gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:
0/task:0/device:GPU:0 with 5366 MB memory) -> physical GPU (device: 0, name: GeF
orce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
Using TensorFlow backend.
 88%|████████████████████████████████████?     | 56/64 [00:46<00:44,  5.53s/it]E
xception while process data [H:\fakes\harper\279209_09big.jpg]: Traceback (most
recent call last):
  File "c:\users\kirin\deepfacelab\utils\SubprocessorBase.py", line 232, in subp
rocess
    result = self.onClientProcessData (data)
  File "c:\users\kirin\deepfacelab\mainscripts\Extractor.py", line 225, in onCli
entProcessData
    landmarks = self.e.extract_from_bgr (image, rects)
  File "c:\users\kirin\deepfacelab\facelib\LandmarksExtractor.py", line 123, in
extract_from_bgr
    image = crop(input_image, center, scale).transpose ( (2,0,1) ).astype(np.flo
at32) / 255.0
  File "c:\users\kirin\deepfacelab\facelib\LandmarksExtractor.py", line 36, in c
rop
    newImg[newY[0] - 1:newY[1], newX[0] - 1:newX[1] ] = image[oldY[0] - 1:oldY[1
], oldX[0] - 1:oldX[1], :]
ValueError: could not broadcast input array from shape (184,0,3) into shape (184
,167,3)

Happened with a face not upright. I had just validated a manual fix and it never processed the next image.

Pic set if you want to test : https://owncloud.dspnet.fr/index.php/s/DFRV1UTnrH2uLmA/download (NSFW)

It doesn't crash without manual-fix, but then it skips the pics where the face is at 90° angle.

@iperov
Copy link
Owner

iperov commented Jun 5, 2018

fixed

@iperov iperov closed this as completed Jun 5, 2018
This was referenced Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants