DifFace
DifFace copied to clipboard
Can't run inference_difface.py
By running this command python inference_difface.py --in_path ~/Images/blur/blurred_1.png --out_path ~/Images/blur/unblurred
I got error
Here the python command line stack Trace
Traceback (most recent call last):
File "inference_difface.py", line 160, in <module>
main()
File "inference_difface.py", line 137, in main
image_restored, face_restored, face_cropped = sampler_dist.sample_func_bfr_unaligned(
File "~/programmation/DifFace/sampler.py", line 368, in sample_func_bfr_unaligned
restored_faces = _process_batch(self.face_helper.cropped_faces)
File "~/programmation/DifFace/sampler.py", line 328, in _process_batch
cropped_face_t = np.stack(
File "<__array_function__ internals>", line 180, in stack
File "~/anaconda3/envs/DifFace/lib/python3.8/site-packages/numpy/core/shape_base.py", line 422, in stack
raise ValueError('need at least one array to stack')
ValueError: need at least one array to stack
I have CUDA installed, here the output of nvidia-smi
command
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.17 Driver Version: 525.105.17 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 N/A / N/A | 4MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 952 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+
Our method relies on face detection algorithm? In your case, the detection algorithm can't find any face and thus causes error. Would you please share the testing image with me via the email of [email protected]? I will have a try. @ThiBsc