Open Kirin-kun opened 5 years ago
LOL.
Just after posting this, I had a sudden inspiration, and changed the extension in both json and the file name from JPG to jpg:
09 INFO Loading file list from C:\Fakes\test
05/31/2019 13:21:09 VERBOSE 1 items loaded
05/31/2019 13:21:09 INFO [DRAW LANDMARKS]
05/31/2019 13:21:09 INFO 1 Frame(s) output
Process exited.
Soooo... it's still a bug, but I know the reason now: the alignment tool doesn't handle uppercase extensions on Windows.
New bug:
The manual alignments mode doesn't handle spaces or parenthesis?
The pic appears, but the box on top is black and when trying to modify:
Traceback (most recent call last):
File "C:\Users\Kirin\faceswap\tools\lib_alignments\jobs_manual.py", line 842, in on_event
self.set_bounding_box(x, y)
File "C:\Users\Kirin\faceswap\tools\lib_alignments\jobs_manual.py", line 877, in set_bounding_box
self.move_bounding_box(pt_x, pt_y)
File "C:\Users\Kirin\faceswap\tools\lib_alignments\jobs_manual.py", line 926, in move_bounding_box
self.update_landmarks()
File "C:\Users\Kirin\faceswap\tools\lib_alignments\jobs_manual.py", line 972, in update_landmarks
idx = self.alignments.add_face(frame, alignment)
File "C:\Users\Kirin\faceswap\lib\alignments.py", line 224, in add_face
self.data[frame].append(alignment)
KeyError: '00144 - Copie (2)_0.png'
KeyError suggests it doesn't like the filename.
I'm doing a round of bugfixing now, so will take a look.
The filename extension issue is fixed in latest commit. I'll look at Manual over the weekend.
The manual alignments mode doesn't handle spaces or parenthesis?
I can't recreate this at all. I changed my filenames to have spaces, dashes and parenthesis but it still works for me
sample filenames:
I used the tool to draw the landmarks without re-extracting, but it seems to ignore some of the pics in the file.
Step to reproduce:
Expected result: all 998 faces with landmarks drawn. I expect that if a face is present in the aligned dir and in the alignments file, it should be possible to draw the landmarks!
I tried with mtcnn extractor: it finds 991 faces. alignments tool draws... 827 faces, again.
I tried the "extract" tool from the "Aligments" tab too, which is supposed to re-extract the faces quicker, but it gives me the same result again : 827 faces, even though s3fd found 998 and mtcnn 991.
Just to be sure, I re-re-extracted the faces with the Extract tab, this time with "Debug Landmarks" checked (which by the way, are different than the ones generated by the alignments tool), and it drew all the landmarks, with red dots, correctly.
It looks like, for some reason, the tool ignores some of the landmarks. I looked at the pics it ignores: they are nothing special. They are even easy detects.
It still rewrites them as-is in the copy of the alignment.json file it generates though.
Example:
I singled out a pic which is ignored in a json file by itself:
Result in TRACE mode:
The "05/31/2019 13:07:34 VERBOSE 0 items loaded" is odd.
IMO, this is a bug.