LucasThePatator / FaceDetectCrop

1 stars 0 forks source link

RuntimeError: torch.cat(): expected a non-empty list of Tensors #14

Closed m-btt closed 1 year ago

m-btt commented 1 year ago

While running a sort operation, issue happening with a specific file. This run was done after after generating processed references .db but not clearing any content from the references folder (ref images <=> ref database). File is very small and contains emoticons. Re-trying in fresh run had no difference. Removing the file out from input and running: no error.

log up to failure: D:\Firefox Downloads\poop main\input\desktopfolders\117744_2.png.jfif is not an image D:\Firefox Downloads\poop main\input\desktopfolders\angai313-snsd.gif is not an image D:\Firefox Downloads\poop main\input\desktopfolders\bookmarks-2022-05-24.json is not an image D:\Firefox Downloads\poop main\input\desktopfolders\clip+(2015-10-31+at+06.51.07).jpg

command line:

$ python main.py -r reference -i "D:\Firefox Downloads\poop main\input\desktopfolders" -o "D:\Firefox Downloads\poop main\output\desktop" -m sort Processing reference database... Loading existing db clip+(2015-10-31+at+06.51.07).jpg: 17%|███████▍ | 551/3256 [03:18<16:13, 2.78it/s] Traceback (most recent call last): File "D:\Firefox Downloads\poop main\main.py", line 292, in <module> main() File "D:\Firefox Downloads\poop main\main.py", line 287, in main sort(args, classifier) File "D:\Firefox Downloads\poop main\main.py", line 233, in sort boxes, score, faces = classifier.detect_image(image) File "D:\Firefox Downloads\poop main\main.py", line 133, in detect_image boxes, score = self.mtcnn.detect(image, landmarks=False) File "C:\Python310\lib\site-packages\facenet_pytorch\models\mtcnn.py", line 313, in detect batch_boxes, batch_points = detect_face( File "C:\Python310\lib\site-packages\facenet_pytorch\models\utils\detect_face.py", line 83, in detect_face boxes = torch.cat(boxes, dim=0) RuntimeError: torch.cat(): expected a non-empty list of Tensors

Problem file: clip+(2015-10-31+at+06 51 07)