neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.55k stars 895 forks source link

ValueError: attempt to get argmin of an empty sequence #42

Open AlonDan opened 3 years ago

AlonDan commented 3 years ago

After I've downloaded the latest version I'm getting an error when I try to run the mutispecific command for video:

set det-size: (640, 640)
(142, 366, 4)
  0%|                                                                                                                                                                                                                | 0/56 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "test_video_swap_multispecific.py", line 93, in <module>
    model, app, opt.output_path,temp_results_dir=opt.temp_path,no_simswaplogo=opt.no_simswaplogo)
  File "Z:\SimSwap\util\videoswap_multispecific.py", line 83, in video_swap
    min_indexs = np.argmin(id_compare_values_array,axis=0)
  File "<__array_function__ internals>", line 6, in argmin
  File "Z:\anaconda3\envs\simswap\lib\site-packages\numpy\core\fromnumeric.py", line 1269, in argmin
    return _wrapfunc(a, 'argmin', axis=axis, out=out)
  File "Z:\anaconda3\envs\simswap\lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc
    return bound(*args, **kwds)
ValueError: attempt to get argmin of an empty sequence

What am I doing wrong? and how can I fix it? it worked fine on the version before for few days ago...


UPDATE: (it works now) It's funny because it was my suggestion (Thanks for adding this!) the file names are now on the same directory + named to SRC_01.jpg and DST_02.jpg - GREAT! But I believe it's supposed to be the opposite:

I'm now trying the multi-specific for the images, still getting issues with it... if I won't catch my mistake I may post it so I can get some help, thanks and please keep up the good work!

NNNNAI commented 3 years ago

Thanks, the original intention of naming src and dst is to be consistent with the paper, otherwise some readers will be confused because they are inconsistent with the paper.