GeneFacePlusPlus icon indicating copy to clipboard operation
GeneFacePlusPlus copied to clipboard

<class 'ValueError'> Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required.

Open c1a1o1 opened this issue 1 year ago • 4 comments

D:\anaconda3\python.exe D:\work\GeneFacePlusPlus-main\data_gen\utils\process_video\extract_segment_imgs.py todo videos number: 1 INFO: Created TensorFlow Lite XNNPACK delegate for CPU. generating segment images in single-process...: 0%| | 0/100 [00:00<?, ?it/s]| Extracting Segmaps && Saving... generating segment images in single-process...: 100%|██████████| 100/100 [00:16<00:00, 6.20it/s] | Extracted Segmaps Done. | Extracting background... combining backgrounds...: 100%|██████████| 5/5 [00:01<00:00, 3.63it/s] Traceback (most recent call last): File "D:\work\GeneFacePlusPlus-main\data_gen\utils\process_video\extract_segment_imgs.py", line 363, in extract_segment_job bg_img = extract_background(img_lst, segmap_mask_lst, method=background_method, device=device, mix_bg=mix_bg) File "D:\work\GeneFacePlusPlus-main\data_gen\utils\process_video\extract_segment_imgs.py", line 139, in extract_background nbrs = NearestNeighbors(n_neighbors=1, algorithm='kd_tree').fit(fg_xys) File "D:\anaconda3\lib\site-packages\sklearn\neighbors_unsupervised.py", line 166, in fit return self._fit(X) File "D:\anaconda3\lib\site-packages\sklearn\neighbors_base.py", line 435, in _fit X = self._validate_data(X, accept_sparse="csr") File "D:\anaconda3\lib\site-packages\sklearn\base.py", line 566, in _validate_data X = check_array(X, **check_params) File "D:\anaconda3\lib\site-packages\sklearn\utils\validation.py", line 805, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\work\GeneFacePlusPlus-main\data_gen\utils\process_video\extract_segment_imgs.py", line 493, in extract_job(*fn_args[0]) File "D:\work\GeneFacePlusPlus-main\data_gen\utils\process_video\extract_segment_imgs.py", line 386, in extract_segment_job traceback.print_exc(e) File "D:\anaconda3\lib\traceback.py", line 163, in print_exc print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain) File "D:\anaconda3\lib\traceback.py", line 103, in print_exception for line in TracebackException( File "D:\anaconda3\lib\traceback.py", line 518, in init self.stack = StackSummary.extract( File "D:\anaconda3\lib\traceback.py", line 341, in extract if int(limit) >= 0: TypeError: int() argument must be a string, a bytes-like object or a number, not 'ValueError' <class 'ValueError'> Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required.

c1a1o1 avatar Feb 07 '24 08:02 c1a1o1

i I also encountered the same problem. Have you solved it?

SakuraMaiii avatar Feb 12 '24 17:02 SakuraMaiii

You should check every ”replace“ like this: image Because there are differences in paths between Windows and Linux systems, '\' and'/'. Just print the paths and check.

whrdsh avatar Feb 19 '24 08:02 whrdsh

Still have this problem. Its stops at 27%. Did you find any solution for that?

schxnhxlz avatar Apr 13 '24 17:04 schxnhxlz

i I also encountered the same problem. Have you solved it?

vincentrsr avatar May 25 '24 06:05 vincentrsr