Problem with Remove-Faces after sorting

Extracting faces for training and converting
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
Locked
User avatar
lenny0x
Posts: 2
Joined: Wed Dec 04, 2019 7:35 pm
Has thanked: 1 time

Problem with Remove-Faces after sorting

Post by lenny0x » Wed Dec 04, 2019 8:11 pm

Hello. After I extracted, sorted, and removed bad faces, I tried to update alignment file with "Remove-Faces" tool but got the following error:

Code: Select all

12/05/2019 02:26:37 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '01321.jpg' to '30471036_303846595037264_4937592716483047586_n_0.jpg'
12/05/2019 02:26:37 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00261.jpg' to '23584275_483629584726193_283956384752934618_n_0.jpg'
12/05/2019 02:26:37 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '01142.jpg' to '94736596_199898902127575_7571283617283047582_n_0.jpg'
(...similar log message goes on for several lines...)
12/05/2019 02:26:37 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '01131.jpg' to '81729384_184347562184753_8372639543864316496_n_0.jpg'
Traceback (most recent call last):
  File "C:\Users\me\faceswap\lib\cli.py", line 128, in execute_script
    process.process()
  File "C:\Users\me\faceswap\tools\alignments.py", line 52, in process
    job.process()
  File "C:\Users\me\faceswap\tools\lib_alignments\jobs.py", line 647, in process
    rename.process()
  File "C:\Users\me\faceswap\tools\lib_alignments\jobs.py", line 687, in process
    rename_count += self.rename_faces(frame, frame_fullname, details)
  File "C:\Users\me\faceswap\tools\lib_alignments\jobs.py", line 718, in rename_faces
    os.rename(src, dst)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'D:\\t\\f\\01131.jpg' -> 'D:\\t\\f\\01131.jpg.temp_move'

============ System Information ============
encoding:            cp65001
git_branch:          master
git_commits:         e3f494a bugfix: Mask Tool - To ExtractMedia object. 2844283 bugfix - Convert - On-The-Fly to conversion to ExtractMedia object. ae94d36 Installer updates Windows - Install Conda git Linux + Windows - Always create GUI Launcher shortcut. aede5f0 bugfix: Extract - Calculate zero sized faces prior to scaling up. 44b7461 sort - remove unused variable
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce GTX 1070 Ti
gpu_devices_active:  GPU_0
gpu_driver:          436.48
gpu_vram:            GPU_0: 8192MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.18362-SP0
os_release:          10
py_command:          C:\Users\me\faceswap\tools.py alignments -j remove-faces -a D:/t/alignments.fsa -fc D:/t/f -o console -een 1 -sz 256 -L INFO -gui
py_conda_version:    conda 4.7.11
py_implementation:   CPython
py_version:          3.6.9
py_virtual_env:      True
sys_cores:           6
sys_processor:       Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
sys_ram:             Total: 16329MB, Available: 11547MB, Used: 4782MB, Free: 11547MB

=============== Pip Packages ===============
absl-py==0.7.1
astor==0.8.0
certifi==2019.6.16
cloudpickle==1.2.1
cycler==0.10.0
cytoolz==0.10.0
dask==2.3.0
decorator==4.4.0
fastcluster==1.1.25
ffmpy==0.2.2
gast==0.2.2
grpcio==1.16.1
h5py==2.9.0
imageio==2.5.0
imageio-ffmpeg==0.3.0
joblib==0.13.2
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
Markdown==3.1.1
matplotlib==2.2.2
mkl-fft==1.0.14
mkl-random==1.0.2
mkl-service==2.3.0
networkx==2.3
numpy==1.16.2
nvidia-ml-py3==7.352.1
olefile==0.46
opencv-python==4.1.1.26
pathlib==1.0.1
Pillow==6.1.0
protobuf==3.8.0
psutil==5.6.3
pyparsing==2.4.2
pyreadline==2.1
python-dateutil==2.8.0
pytz==2019.2
PyWavelets==1.0.3
pywin32==223
PyYAML==5.1.2
scikit-image==0.15.0
scikit-learn==0.21.2
scipy==1.3.1
six==1.12.0
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
toolz==0.10.0
toposort==1.5
tornado==6.0.3
tqdm==4.32.1
Werkzeug==0.15.5
wincertstore==0.2
wrapt==1.11.2

============== Conda Packages ==============
# packages in environment at C:\Users\me\MiniConda3\envs\faceswap:
#
# Name                    Version                   Build  Channel
_tflow_select             2.1.0                       gpu  
absl-py                   0.7.1                    py36_0  
astor                     0.8.0                    py36_0  
blas                      1.0                         mkl  
ca-certificates           2019.5.15                     1  
certifi                   2019.6.16                py36_1  
cloudpickle               1.2.1                      py_0  
cudatoolkit               10.0.130                      0  
cudnn                     7.6.0                cuda10.0_0  
cycler                    0.10.0           py36h009560c_0  
cytoolz                   0.10.0           py36he774522_0  
dask-core                 2.3.0                      py_0  
decorator                 4.4.0                    py36_1  
fastcluster               1.1.25          py36h830ac7b_1000    conda-forge
ffmpeg                    4.2                  h6538335_0    conda-forge
ffmpy                     0.2.2                    pypi_0    pypi
freetype                  2.9.1                ha9979f8_1  
gast                      0.2.2                    py36_0  
grpcio                    1.16.1           py36h351948d_1  
h5py                      2.9.0            py36h5e291fa_0  
hdf5                      1.10.4               h7ebc959_0  
icc_rt                    2019.0.0             h0cc432a_1  
icu                       58.2                 ha66f8fd_1  
imageio                   2.5.0                    py36_0  
imageio-ffmpeg            0.3.0                      py_0    conda-forge
intel-openmp              2019.4                      245  
joblib                    0.13.2                   py36_0  
jpeg                      9b                   hb83a4c4_2  
keras                     2.2.4                         0  
keras-applications        1.0.8                      py_0  
keras-base                2.2.4                    py36_0  
keras-preprocessing       1.1.0                      py_1  
kiwisolver                1.1.0            py36ha925a31_0  
libmklml                  2019.0.5                      0  
libpng                    1.6.37               h2a8f88b_0  
libprotobuf               3.8.0                h7bd577a_0  
libtiff                   4.0.10               hb898794_2  
markdown                  3.1.1                    py36_0  
matplotlib                2.2.2            py36had4c4a9_2  
mkl                       2019.4                      245  
mkl-service               2.3.0            py36hb782905_0  
mkl_fft                   1.0.14           py36h14836fe_0  
mkl_random                1.0.2            py36h343c172_0  
networkx                  2.3                        py_0  
numpy                     1.16.2           py36h19fb1c0_0  
numpy-base                1.16.2           py36hc3f5095_0  
nvidia-ml-py3             7.352.1                  pypi_0    pypi
olefile                   0.46                     py36_0  
opencv-python             4.1.1.26                 pypi_0    pypi
openssl                   1.1.1c               he774522_1  
pathlib                   1.0.1                    py36_1  
pillow                    6.1.0            py36hdc69c19_0  
pip                       19.2.2                   py36_0  
protobuf                  3.8.0            py36h33f27b4_0  
psutil                    5.6.3            py36he774522_0  
pyparsing                 2.4.2                      py_0  
pyqt                      5.9.2            py36h6538335_2  
pyreadline                2.1                      py36_1  
python                    3.6.9                h5500b2f_0  
python-dateutil           2.8.0                    py36_0  
pytz                      2019.2                     py_0  
pywavelets                1.0.3            py36h8c2d366_1  
pywin32                   223              py36hfa6e2cd_1  
pyyaml                    5.1.2            py36he774522_0  
qt                        5.9.7            vc14h73c81de_0  
scikit-image              0.15.0           py36ha925a31_0  
scikit-learn              0.21.2           py36h6288b17_0  
scipy                     1.3.1            py36h29ff71c_0  
setuptools                41.0.1                   py36_0  
sip                       4.19.8           py36h6538335_0  
six                       1.12.0                   py36_0  
sqlite                    3.29.0               he774522_0  
tensorboard               1.14.0           py36he3c9ec2_0  
tensorflow                1.14.0          gpu_py36h305fd99_0  
tensorflow-base           1.14.0          gpu_py36h55fc52a_0  
tensorflow-estimator      1.14.0                     py_0  
tensorflow-gpu            1.14.0               h0d30ee6_0  
termcolor                 1.1.0                    py36_1  
tk                        8.6.8                hfa6e2cd_0  
toolz                     0.10.0                     py_0  
toposort                  1.5                        py_3    conda-forge
tornado                   6.0.3            py36he774522_0  
tqdm                      4.32.1                     py_0  
vc                        14.1                 h0510ff6_4  
vs2015_runtime            14.16.27012          hf0eaf9b_0  
werkzeug                  0.15.5                     py_0  
wheel                     0.33.4                   py36_0  
wincertstore              0.2              py36h7fe50ca_0  
wrapt                     1.11.2           py36he774522_0  
xz                        5.2.4                h2fa13f4_4  
yaml                      0.1.7                hc54c509_2  
zlib                      1.2.11               h62dcd97_3  
zstd                      1.3.7                h508b16e_0  

================= Configs ==================
--------- .faceswap ---------
backend:                  nvidia

--------- convert.ini ---------

[color.color_transfer]
clip:                     True
preserve_paper:           True

[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0

[color.match_hist]
threshold:                99.0

[mask.box_blend]
type:                     gaussian
distance:                 11.0
radius:                   5.0
passes:                   1

[mask.mask_blend]
type:                     normalized
radius:                   3.0
passes:                   4
erosion:                  0.0

[scaling.sharpen]
method:                   unsharp_mask
amount:                   150
radius:                   0.3
threshold:                5.0

[writer.ffmpeg]
container:                mp4
codec:                    libx264
crf:                      23
preset:                   medium
tune:                     none
profile:                  auto
level:                    auto

[writer.gif]
fps:                      25
loop:                     0
palettesize:              256
subrectangles:            False

[writer.opencv]
format:                   jpg
draw_transparent:         False
jpg_quality:              95
png_compress_level:       3

[writer.pillow]
format:                   png
draw_transparent:         False
optimize:                 False
gif_interlace:            True
jpg_quality:              75
png_compress_level:       3
tif_compression:          tiff_deflate

--------- extract.ini ---------

[global]
allow_growth:             False

[align.fan]
batch-size:               8

[detect.cv2_dnn]
confidence:               50

[detect.mtcnn]
minsize:                  20
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7
scalefactor:              0.709
batch-size:               8

[detect.s3fd]
confidence:               50
batch-size:               8

[mask.unet_dfl]
batch-size:               8

[mask.vgg_clear]
batch-size:               6

[mask.vgg_obstructed]
batch-size:               2

--------- gui.ini ---------

[global]
fullscreen:               False
tab:                      extract
options_panel_width:      30
console_panel_height:     20
icon_size:                14
font:                     default
font_size:                9
autosave_last_session:    prompt
timeout:                  120
auto_load_model_stats:    True

--------- train.ini ---------

[global]
coverage:                 68.75
mask_type:                none
mask_blur:                False
icnr_init:                False
conv_aware_init:          False
subpixel_upscaling:       False
reflect_padding:          False
penalized_mask_loss:      True
loss_function:            mae
learning_rate:            5e-05

[model.dfl_h128]
lowmem:                   False

[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False

[model.dlight]
features:                 best
details:                  good
output_size:              256

[model.original]
lowmem:                   False

[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512

[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512

[model.villain]
lowmem:                   False

[trainer.original]
preview_images:           14
zoom_amount:              5
rotation_range:           10
shift_range:              5
flip_chance:              50
color_lightness:          30
color_ab:                 8
color_clahe_chance:       50
color_clahe_max_size:     4
After this some face files are reverted to the original name, but some still have their sorted index number name. I am using latest version of Faceswap GUI at the time of this post (all faces are extracted and sorted after update).

Thank you for any help in advance.
by torzdf » Fri Dec 06, 2019 3:12 am
Please try the latest code and let me know if it fixes your issue.

Thanks.
Go to full post

User avatar
om6g6
Posts: 5
Joined: Thu Dec 05, 2019 12:35 pm

Re: Problem with Remove-Faces after sorting

Post by om6g6 » Thu Dec 05, 2019 1:49 pm

Hi
I have the same error
Image

Code: Select all

12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00143.png' to 'BasicInstinct_001514_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00144.png' to 'BasicInstinct_001515_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00141.png' to 'BasicInstinct_001516_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00142.png' to 'BasicInstinct_001517_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00137.png' to 'BasicInstinct_001518_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00139.png' to 'BasicInstinct_001519_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00140.png' to 'BasicInstinct_001520_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00138.png' to 'BasicInstinct_001521_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00173.png' to 'BasicInstinct_001522_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00174.png' to 'BasicInstinct_001523_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00176.png' to 'BasicInstinct_001524_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00177.png' to 'BasicInstinct_001525_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00175.png' to 'BasicInstinct_001526_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00186.png' to 'BasicInstinct_001527_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00187.png' to 'BasicInstinct_001528_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00184.png' to 'BasicInstinct_001529_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00185.png' to 'BasicInstinct_001530_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00183.png' to 'BasicInstinct_001531_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00178.png' to 'BasicInstinct_001532_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00179.png' to 'BasicInstinct_001533_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00180.png' to 'BasicInstinct_001534_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00181.png' to 'BasicInstinct_001535_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00182.png' to 'BasicInstinct_001536_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00165.png' to 'BasicInstinct_001537_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00166.png' to 'BasicInstinct_001538_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00171.png' to 'BasicInstinct_001539_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00172.png' to 'BasicInstinct_001540_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00168.png' to 'BasicInstinct_001541_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00169.png' to 'BasicInstinct_001542_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00170.png' to 'BasicInstinct_001543_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00167.png' to 'BasicInstinct_001544_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00161.png' to 'BasicInstinct_001545_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00162.png' to 'BasicInstinct_001546_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00163.png' to 'BasicInstinct_001547_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00164.png' to 'BasicInstinct_001548_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00159.png' to 'BasicInstinct_001549_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00160.png' to 'BasicInstinct_001550_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00156.png' to 'BasicInstinct_001551_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00157.png' to 'BasicInstinct_001552_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00158.png' to 'BasicInstinct_001553_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00014.png' to 'BasicInstinct_001554_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00015.png' to 'BasicInstinct_001555_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00016.png' to 'BasicInstinct_001556_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00017.png' to 'BasicInstinct_001557_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00018.png' to 'BasicInstinct_001558_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00019.png' to 'BasicInstinct_001559_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00020.png' to 'BasicInstinct_001560_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00021.png' to 'BasicInstinct_001561_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00010.png' to 'BasicInstinct_001562_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00011.png' to 'BasicInstinct_001563_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00012.png' to 'BasicInstinct_001564_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00013.png' to 'BasicInstinct_001565_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00006.png' to 'BasicInstinct_001566_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00007.png' to 'BasicInstinct_001567_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00008.png' to 'BasicInstinct_001568_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00009.png' to 'BasicInstinct_001569_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00000.png' to 'BasicInstinct_001570_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00001.png' to 'BasicInstinct_001571_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00002.png' to 'BasicInstinct_001572_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00003.png' to 'BasicInstinct_001573_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00004.png' to 'BasicInstinct_001574_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00005.png' to 'BasicInstinct_001575_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00045.png' to 'BasicInstinct_001576_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00046.png' to 'BasicInstinct_001577_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00047.png' to 'BasicInstinct_001578_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00057.png' to 'BasicInstinct_001579_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00058.png' to 'BasicInstinct_001580_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00055.png' to 'BasicInstinct_001581_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00056.png' to 'BasicInstinct_001582_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00054.png' to 'BasicInstinct_001583_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00051.png' to 'BasicInstinct_001584_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00052.png' to 'BasicInstinct_001585_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00053.png' to 'BasicInstinct_001586_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00050.png' to 'BasicInstinct_001587_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00048.png' to 'BasicInstinct_001588_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00049.png' to 'BasicInstinct_001589_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00027.png' to 'BasicInstinct_001590_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00028.png' to 'BasicInstinct_001591_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00029.png' to 'BasicInstinct_001592_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00030.png' to 'BasicInstinct_001593_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00031.png' to 'BasicInstinct_001594_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00032.png' to 'BasicInstinct_001595_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00033.png' to 'BasicInstinct_001596_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00034.png' to 'BasicInstinct_001597_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00035.png' to 'BasicInstinct_001598_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00036.png' to 'BasicInstinct_001599_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00037.png' to 'BasicInstinct_001600_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00038.png' to 'BasicInstinct_001601_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00039.png' to 'BasicInstinct_001602_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00040.png' to 'BasicInstinct_001603_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00041.png' to 'BasicInstinct_001604_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00043.png' to 'BasicInstinct_001605_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00044.png' to 'BasicInstinct_001606_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00042.png' to 'BasicInstinct_001607_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00023.png' to 'BasicInstinct_001608_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00024.png' to 'BasicInstinct_001609_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00022.png' to 'BasicInstinct_001610_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00025.png' to 'BasicInstinct_001611_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00026.png' to 'BasicInstinct_001612_0.png'
12/05/2019 14:40:35 MainProcess     MainThread      jobs            rename_faces              VERBOSE  Renamed '00228.png' to 'BasicInstinct_001684_0.png'
Traceback (most recent call last):
  File "D:\Utilitaires\DF-FaceSwap\faceswap\lib\cli.py", line 128, in execute_script
    process.process()
  File "D:\Utilitaires\DF-FaceSwap\faceswap\tools\alignments.py", line 52, in process
    job.process()
  File "D:\Utilitaires\DF-FaceSwap\faceswap\tools\lib_alignments\jobs.py", line 647, in process
    rename.process()
  File "D:\Utilitaires\DF-FaceSwap\faceswap\tools\lib_alignments\jobs.py", line 687, in process
    rename_count += self.rename_faces(frame, frame_fullname, details)
  File "D:\Utilitaires\DF-FaceSwap\faceswap\tools\lib_alignments\jobs.py", line 718, in rename_faces
    os.rename(src, dst)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable: 'D:\\FSW\\07-BasicInstinct\\1-src-output\\sharon2\\00228.png' -> 'D:\\FSW\\07-BasicInstinct\\1-src-output\\sharon2\\00228.png.temp_move'

============ System Information ============
encoding:            cp1252
git_branch:          master
git_commits:         c8c2601 bugfix: tools.alignments - Fix DFL conversion. e3f494a bugfix: Mask Tool - To ExtractMedia object. 2844283 bugfix - Convert - On-The-Fly to conversion to ExtractMedia object. ae94d36 Installer updates Windows - Install Conda git Linux + Windows - Always create GUI Launcher shortcut. aede5f0 bugfix: Extract - Calculate zero sized faces prior to scaling up
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce GTX 1060
gpu_devices_active:  GPU_0
gpu_driver:          441.20
gpu_vram:            GPU_0: 6144MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.18362-SP0
os_release:          10
py_command:          D:\Utilitaires\DF-FaceSwap\faceswap\tools.py alignments -j remove-faces -a D:/FSW/07-BasicInstinct/0-src/BasicInstinct_alignments_sharon.fsa -fc D:/FSW/07-BasicInstinct/1-src-output/sharon2/ -fr D:/FSW/07-BasicInstinct/0-src/BasicInstinct.mp4 -o console -een 1 -sz 256 -L INFO -gui
py_conda_version:    conda 4.7.11
py_implementation:   CPython
py_version:          3.6.9
py_virtual_env:      True
sys_cores:           8
sys_processor:       Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
sys_ram:             Total: 8127MB, Available: 3839MB, Used: 4288MB, Free: 3839MB

=============== Pip Packages ===============
absl-py==0.7.1
astor==0.8.0
certifi==2019.6.16
cloudpickle==1.2.1
cycler==0.10.0
cytoolz==0.10.0
dask==2.3.0
decorator==4.4.0
fastcluster==1.1.25
ffmpy==0.2.2
gast==0.2.2
grpcio==1.16.1
h5py==2.9.0
imageio==2.5.0
imageio-ffmpeg==0.3.0
joblib==0.13.2
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
Markdown==3.1.1
matplotlib==2.2.2
mkl-fft==1.0.14
mkl-random==1.0.2
mkl-service==2.3.0
networkx==2.3
numpy==1.16.2
nvidia-ml-py3==7.352.1
olefile==0.46
opencv-python==4.1.1.26
pathlib==1.0.1
Pillow==6.1.0
protobuf==3.8.0
psutil==5.6.3
pyparsing==2.4.2
pyreadline==2.1
python-dateutil==2.8.0
pytz==2019.2
PyWavelets==1.0.3
pywin32==223
PyYAML==5.1.2
scikit-image==0.15.0
scikit-learn==0.21.2
scipy==1.3.1
six==1.12.0
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
toolz==0.10.0
toposort==1.5
tornado==6.0.3
tqdm==4.32.1
Werkzeug==0.15.5
wincertstore==0.2
wrapt==1.11.2

============== Conda Packages ==============
# packages in environment at C:\Users\Omg\MiniConda3\envs\faceswap:
#
# Name                    Version                   Build  Channel
_tflow_select             2.1.0                       gpu  
absl-py                   0.7.1                    py36_0  
astor                     0.8.0                    py36_0  
blas                      1.0                         mkl  
ca-certificates           2019.5.15                     1  
certifi                   2019.6.16                py36_1  
cloudpickle               1.2.1                      py_0  
cudatoolkit               10.0.130                      0  
cudnn                     7.6.0                cuda10.0_0  
cycler                    0.10.0           py36h009560c_0  
cytoolz                   0.10.0           py36he774522_0  
dask-core                 2.3.0                      py_0  
decorator                 4.4.0                    py36_1  
fastcluster               1.1.25          py36h830ac7b_1000    conda-forge
ffmpeg                    4.2                  h6538335_0    conda-forge
ffmpy                     0.2.2                    pypi_0    pypi
freetype                  2.9.1                ha9979f8_1  
gast                      0.2.2                    py36_0  
grpcio                    1.16.1           py36h351948d_1  
h5py                      2.9.0            py36h5e291fa_0  
hdf5                      1.10.4               h7ebc959_0  
icc_rt                    2019.0.0             h0cc432a_1  
icu                       58.2                 ha66f8fd_1  
imageio                   2.5.0                    py36_0  
imageio-ffmpeg            0.3.0                      py_0    conda-forge
intel-openmp              2019.4                      245  
joblib                    0.13.2                   py36_0  
jpeg                      9b                   hb83a4c4_2  
keras                     2.2.4                         0  
keras-applications        1.0.8                      py_0  
keras-base                2.2.4                    py36_0  
keras-preprocessing       1.1.0                      py_1  
kiwisolver                1.1.0            py36ha925a31_0  
libmklml                  2019.0.5                      0  
libpng                    1.6.37               h2a8f88b_0  
libprotobuf               3.8.0                h7bd577a_0  
libtiff                   4.0.10               hb898794_2  
markdown                  3.1.1                    py36_0  
matplotlib                2.2.2            py36had4c4a9_2  
mkl                       2019.4                      245  
mkl-service               2.3.0            py36hb782905_0  
mkl_fft                   1.0.14           py36h14836fe_0  
mkl_random                1.0.2            py36h343c172_0  
networkx                  2.3                        py_0  
numpy                     1.16.2           py36h19fb1c0_0  
numpy-base                1.16.2           py36hc3f5095_0  
nvidia-ml-py3             7.352.1                  pypi_0    pypi
olefile                   0.46                     py36_0  
opencv-python             4.1.1.26                 pypi_0    pypi
openssl                   1.1.1c               he774522_1  
pathlib                   1.0.1                    py36_1  
pillow                    6.1.0            py36hdc69c19_0  
pip                       19.2.2                   py36_0  
protobuf                  3.8.0            py36h33f27b4_0  
psutil                    5.6.3            py36he774522_0  
pyparsing                 2.4.2                      py_0  
pyqt                      5.9.2            py36h6538335_2  
pyreadline                2.1                      py36_1  
python                    3.6.9                h5500b2f_0  
python-dateutil           2.8.0                    py36_0  
pytz                      2019.2                     py_0  
pywavelets                1.0.3            py36h8c2d366_1  
pywin32                   223              py36hfa6e2cd_1  
pyyaml                    5.1.2            py36he774522_0  
qt                        5.9.7            vc14h73c81de_0  
scikit-image              0.15.0           py36ha925a31_0  
scikit-learn              0.21.2           py36h6288b17_0  
scipy                     1.3.1            py36h29ff71c_0  
setuptools                41.0.1                   py36_0  
sip                       4.19.8           py36h6538335_0  
six                       1.12.0                   py36_0  
sqlite                    3.29.0               he774522_0  
tensorboard               1.14.0           py36he3c9ec2_0  
tensorflow                1.14.0          gpu_py36h305fd99_0  
tensorflow-base           1.14.0          gpu_py36h55fc52a_0  
tensorflow-estimator      1.14.0                     py_0  
tensorflow-gpu            1.14.0               h0d30ee6_0  
termcolor                 1.1.0                    py36_1  
tk                        8.6.8                hfa6e2cd_0  
toolz                     0.10.0                     py_0  
toposort                  1.5                        py_3    conda-forge
tornado                   6.0.3            py36he774522_0  
tqdm                      4.32.1                     py_0  
vc                        14.1                 h0510ff6_4  
vs2015_runtime            14.16.27012          hf0eaf9b_0  
werkzeug                  0.15.5                     py_0  
wheel                     0.33.4                   py36_0  
wincertstore              0.2              py36h7fe50ca_0  
wrapt                     1.11.2           py36he774522_0  
xz                        5.2.4                h2fa13f4_4  
yaml                      0.1.7                hc54c509_2  
zlib                      1.2.11               h62dcd97_3  
zstd                      1.3.7                h508b16e_0  

================= Configs ==================
--------- .faceswap ---------
backend:                  nvidia

--------- convert.ini ---------

[color.color_transfer]
clip:                     True
preserve_paper:           True

[color.manual_balance]
colorspace:               HSV
balance_1:                0.0
balance_2:                0.0
balance_3:                0.0
contrast:                 0.0
brightness:               0.0

[color.match_hist]
threshold:                99.0

[mask.box_blend]
type:                     gaussian
distance:                 11.0
radius:                   5.0
passes:                   1

[mask.mask_blend]
type:                     normalized
radius:                   3.0
passes:                   4
erosion:                  0.0

[scaling.sharpen]
method:                   unsharp_mask
amount:                   150
radius:                   0.3
threshold:                5.0

[writer.ffmpeg]
container:                mp4
codec:                    libx264
crf:                      10
preset:                   medium
tune:                     none
profile:                  auto
level:                    auto

[writer.gif]
fps:                      25
loop:                     0
palettesize:              256
subrectangles:            False

[writer.opencv]
format:                   png
draw_transparent:         False
jpg_quality:              75
png_compress_level:       3

[writer.pillow]
format:                   png
draw_transparent:         False
optimize:                 False
gif_interlace:            True
jpg_quality:              75
png_compress_level:       3
tif_compression:          tiff_deflate

--------- extract.ini ---------

[global]
allow_growth:             False

[align.fan]
batch-size:               8

[detect.cv2_dnn]
confidence:               50

[detect.mtcnn]
minsize:                  20
threshold_1:              0.6
threshold_2:              0.7
threshold_3:              0.7
scalefactor:              0.709
batch-size:               8

[detect.s3fd]
confidence:               50
batch-size:               8

[mask.unet_dfl]
batch-size:               8

[mask.vgg_clear]
batch-size:               6

[mask.vgg_obstructed]
batch-size:               2

--------- gui.ini ---------

[global]
fullscreen:               True
tab:                      extract
options_panel_width:      30
console_panel_height:     20
icon_size:                14
font:                     default
font_size:                9
autosave_last_session:    prompt
timeout:                  120
auto_load_model_stats:    True

--------- train.ini ---------

[global]
coverage:                 68.75
mask_type:                extended
mask_blur:                False
icnr_init:                True
conv_aware_init:          True
subpixel_upscaling:       False
reflect_padding:          False
penalized_mask_loss:      True
loss_function:            ssim
learning_rate:            5e-05

[model.dfl_h128]
lowmem:                   False

[model.dfl_sae]
input_size:               128
clipnorm:                 True
architecture:             df
autoencoder_dims:         0
encoder_dims:             42
decoder_dims:             21
multiscale_decoder:       False

[model.dlight]
features:                 best
details:                  good
output_size:              256

[model.original]
lowmem:                   False

[model.realface]
input_size:               64
output_size:              128
dense_nodes:              1536
complexity_encoder:       128
complexity_decoder:       512

[model.unbalanced]
input_size:               128
lowmem:                   False
clipnorm:                 True
nodes:                    1024
complexity_encoder:       128
complexity_decoder_a:     384
complexity_decoder_b:     512

[model.villain]
lowmem:                   False

[trainer.original]
preview_images:           14
zoom_amount:              5
rotation_range:           10
shift_range:              5
flip_chance:              50
color_lightness:          30
color_ab:                 8
color_clahe_chance:       50
color_clahe_max_size:     4
Thank you in advance for your help !

User avatar
torzdf
Posts: 226
Joined: Fri Jul 12, 2019 12:53 am
Answers: 57
Has thanked: 8 times
Been thanked: 43 times

Re: Problem with Remove-Faces after sorting

Post by torzdf » Thu Dec 05, 2019 8:18 pm

Will look at this asap.
My word is final

User avatar
torzdf
Posts: 226
Joined: Fri Jul 12, 2019 12:53 am
Answers: 57
Has thanked: 8 times
Been thanked: 43 times

Re: Problem with Remove-Faces after sorting

Post by torzdf » Fri Dec 06, 2019 3:12 am

Please try the latest code and let me know if it fixes your issue.

Thanks.
My word is final

User avatar
om6g6
Posts: 5
Joined: Thu Dec 05, 2019 12:35 pm

Re: Problem with Remove-Faces after sorting

Post by om6g6 » Fri Dec 06, 2019 5:27 pm

Problem solved for me ! thank you.

User avatar
lenny0x
Posts: 2
Joined: Wed Dec 04, 2019 7:35 pm
Has thanked: 1 time

Re: Problem with Remove-Faces after sorting

Post by lenny0x » Sat Dec 07, 2019 4:31 am

Thank you for your fix, although the problem still remains with some face set.

I updated program to latest version (4ee9eac - Rewrite rename job to be more robust) and did extract/sort/cleanup/run remove-face again and got different error message.

Code: Select all

12/07/2019 11:15:48 MainProcess     MainThread      logger          log_setup                 INFO     Log level set to: VERBOSE
12/07/2019 11:15:50 MainProcess     MainThread      media           __init__                  INFO     [ALIGNMENT DATA]
12/07/2019 11:15:50 MainProcess     MainThread      media           check_file_exists         VERBOSE  Alignments file exists at 'D:\faceswap_source\orig\alignments.fsa'
12/07/2019 11:15:50 MainProcess     MainThread      alignments      get_location              VERBOSE  Alignments filepath: 'D:\faceswap_source\orig\alignments.fsa'
12/07/2019 11:15:50 MainProcess     MainThread      alignments      load                      INFO     Reading alignments from: 'D:\faceswap_source\orig\alignments.fsa'
12/07/2019 11:15:50 MainProcess     MainThread      media           __init__                  VERBOSE  2010 items loaded
12/07/2019 11:15:50 MainProcess     MainThread      media           __init__                  INFO     [FACES DATA]
12/07/2019 11:15:50 MainProcess     MainThread      media           check_input_folder        VERBOSE  Folder exists at 'D:\faceswap_source\orig\face'
12/07/2019 11:15:50 MainProcess     MainThread      media           process_folder            INFO     Loading file list from D:\faceswap_source\orig\face
12/07/2019 11:15:51 MainProcess     MainThread      media           __init__                  VERBOSE  2012 items loaded
12/07/2019 11:15:51 MainProcess     MainThread      jobs            process                   INFO     [REMOVE ALIGNMENTS DATA]
12/07/2019 11:15:51 MainProcess     MainThread      alignments      filter_hashes             VERBOSE  Filtering out face: (filename: 1001189_592788557409967_2142060630_n.jpg, index: 2)
12/07/2019 11:15:51 MainProcess     MainThread      alignments      filter_hashes             VERBOSE  Filtering out face: (filename: 1001189_592788557409967_2142060630_n.jpg, index: 1)
12/07/2019 11:15:51 MainProcess     MainThread      alignments      filter_hashes             VERBOSE  Filtering out face: (filename: 10014772_631025763618680_266819837_o.jpg, index: 1)
12/07/2019 11:15:51 MainProcess     MainThread      alignments      filter_hashes             VERBOSE  Filtering out face: (filename: 1004521_213250188834427_1274326112_n.jpg, index: 0)
(...similar filtering out face lines...)
12/07/2019 11:15:53 MainProcess     MainThread      jobs            process                   INFO     1794 alignment(s) were removed from alignments file
12/07/2019 11:15:53 MainProcess     MainThread      alignments      backup                    INFO     Backing up original alignments to 'D:\faceswap_source\orig\alignments_20191207_111553.fsa'
12/07/2019 11:15:53 MainProcess     MainThread      alignments      save                      INFO     Writing alignments to: 'D:\faceswap_source\orig\alignments.fsa'
12/07/2019 11:15:53 MainProcess     MainThread      jobs            process                   INFO     [RENAME FACES]
12/07/2019 11:15:53 MainProcess     MainThread      jobs            _build_rename_list        ERROR    There are faces in the given folder that do not correspond to entries in the alignments file. Please check your data, and if neccesarry run the `remove-faces` job. To get a list of faces missing alignments entries, run with VERBOSE logging
12/07/2019 11:15:53 MainProcess     MainThread      jobs            _build_rename_list        VERBOSE  Files in faces folder not in alignments file: ['01152.jpg']
(of course I did not add any file to face folder after extraction, only deleted bad faces)

However when I renamed all frames to short, simple name (like "imgXXX.jpg") and did the same procedure then there was no error.

Can you look into this when you have time? Again thank you for the fix.

User avatar
torzdf
Posts: 226
Joined: Fri Jul 12, 2019 12:53 am
Answers: 57
Has thanked: 8 times
Been thanked: 43 times

Re: Problem with Remove-Faces after sorting

Post by torzdf » Sat Dec 07, 2019 1:57 pm

I'm going to leave this for now and lock the topic. Please open another one if the problem arises again...

The process reads the sha1 hashes of the faces in the folder and compares it against the alignments file. If there are faces/images in the folder that are not in the alignments file then the process will abort (this is to prevent the accidental overwriting of faces with the same file name).

As you had previous issues, I'm going to assume that it was related to that somehow.... Changing the filenames of the face should have no impact on the way it finds faces in a folder.
My word is final

Locked