{"action":"created","comment":{"url":"https://api.github.com/repos/deepfakes/faceswap/pulls/comments/211426749","pull_request_review_id":147841449,"id":211426749,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTQyNjc0OQ==","diff_hunk":"@@ -44,19 +45,33 @@ def process(self):\n         else:\n             self.extract_single_process()\n \n-        self.alignments.write_alignments(self.faces.faces_detected)\n-\n+        self.write_alignments()\n         images, faces = Utils.finalize(self.images.images_found,\n                                        self.faces.num_faces_detected,\n                                        self.faces.verify_output)\n         self.images.images_found = images\n         self.faces.num_faces_detected = faces\n \n+    def write_alignments(self):\n+        self.alignments.write_alignments(self.faces.faces_detected)\n+\n+\n     def extract_single_process(self):\n         \"\"\" Run extraction in a single process \"\"\"\n+\n+        alignments = self.alignments.read_alignments()\n+        \n+        frame_no = 0\n         for filename in tqdm(self.images.input_images, file=sys.stdout):\n+            basename = os.path.basename(filename)\n+            if basename in alignments:\n+                continue\n             filename, faces = self.process_single_image(filename)\n-            self.faces.faces_detected[os.path.basename(filename)] = faces\n+            self.faces.faces_detected[basename] = faces\n+            frame_no = frame_no + 1","path":"scripts/extract.py","position":38,"original_position":38,"commit_id":"09ed69e01a98d03bb054008b3882e2a83a3160e9","original_commit_id":"09ed69e01a98d03bb054008b3882e2a83a3160e9","user":{"login":"torzdf","id":36920800,"node_id":"MDQ6VXNlcjM2OTIwODAw","avatar_url":"https://avatars0.githubusercontent.com/u/36920800?v=4","gravatar_id":"","url":"https://api.github.com/users/torzdf","html_url":"https://github.com/torzdf","followers_url":"https://api.github.com/users/torzdf/followers","following_url":"https://api.github.com/users/torzdf/following{/other_user}","gists_url":"https://api.github.com/users/torzdf/gists{/gist_id}","starred_url":"https://api.github.com/users/torzdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torzdf/subscriptions","organizations_url":"https://api.github.com/users/torzdf/orgs","repos_url":"https://api.github.com/users/torzdf/repos","events_url":"https://api.github.com/users/torzdf/events{/privacy}","received_events_url":"https://api.github.com/users/torzdf/received_events","type":"User","site_admin":false},"body":"`frame_no += 1`","created_at":"2018-08-20T22:25:42Z","updated_at":"2018-08-20T22:32:01Z","html_url":"https://github.com/deepfakes/faceswap/pull/477#discussion_r211426749","pull_request_url":"https://api.github.com/repos/deepfakes/faceswap/pulls/477","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/comments/211426749"},"html":{"href":"https://github.com/deepfakes/faceswap/pull/477#discussion_r211426749"},"pull_request":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/477"}}},"pull_request":{"url":"https://api.github.com/repos/deepfakes/faceswap/pulls/477","id":209618621,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NjE4NjIx","html_url":"https://github.com/deepfakes/faceswap/pull/477","diff_url":"https://github.com/deepfakes/faceswap/pull/477.diff","patch_url":"https://github.com/deepfakes/faceswap/pull/477.patch","issue_url":"https://api.github.com/repos/deepfakes/faceswap/issues/477","number":477,"state":"open","locked":false,"title":"alignments.json save interval for extracting","user":{"login":"Tvde1","id":11540531,"node_id":"MDQ6VXNlcjExNTQwNTMx","avatar_url":"https://avatars2.githubusercontent.com/u/11540531?v=4","gravatar_id":"","url":"https://api.github.com/users/Tvde1","html_url":"https://github.com/Tvde1","followers_url":"https://api.github.com/users/Tvde1/followers","following_url":"https://api.github.com/users/Tvde1/following{/other_user}","gists_url":"https://api.github.com/users/Tvde1/gists{/gist_id}","starred_url":"https://api.github.com/users/Tvde1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tvde1/subscriptions","organizations_url":"https://api.github.com/users/Tvde1/orgs","repos_url":"https://api.github.com/users/Tvde1/repos","events_url":"https://api.github.com/users/Tvde1/events{/privacy}","received_events_url":"https://api.github.com/users/Tvde1/received_events","type":"User","site_admin":false},"body":"Added an optional parameter `-si` or `--save-interval` which will save the alignments.json after the set amount of frames.\r\n\r\nSo `python faceswap.py extract ... -si 5` will save the file after 5 frames.\r\nIt will also skip the already extracted files when it's restarted.","created_at":"2018-08-20T19:24:42Z","updated_at":"2018-08-20T22:32:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98dd29649effe6186f854ccdfce153627a3ef9bc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/deepfakes/faceswap/pulls/477/commits","review_comments_url":"https://api.github.com/repos/deepfakes/faceswap/pulls/477/comments","review_comment_url":"https://api.github.com/repos/deepfakes/faceswap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deepfakes/faceswap/issues/477/comments","statuses_url":"https://api.github.com/repos/deepfakes/faceswap/statuses/09ed69e01a98d03bb054008b3882e2a83a3160e9","head":{"label":"Tvde1:extract-save-interval","ref":"extract-save-interval","sha":"09ed69e01a98d03bb054008b3882e2a83a3160e9","user":{"login":"Tvde1","id":11540531,"node_id":"MDQ6VXNlcjExNTQwNTMx","avatar_url":"https://avatars2.githubusercontent.com/u/11540531?v=4","gravatar_id":"","url":"https://api.github.com/users/Tvde1","html_url":"https://github.com/Tvde1","followers_url":"https://api.github.com/users/Tvde1/followers","following_url":"https://api.github.com/users/Tvde1/following{/other_user}","gists_url":"https://api.github.com/users/Tvde1/gists{/gist_id}","starred_url":"https://api.github.com/users/Tvde1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tvde1/subscriptions","organizations_url":"https://api.github.com/users/Tvde1/orgs","repos_url":"https://api.github.com/users/Tvde1/repos","events_url":"https://api.github.com/users/Tvde1/events{/privacy}","received_events_url":"https://api.github.com/users/Tvde1/received_events","type":"User","site_admin":false},"repo":{"id":145451295,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU0NTEyOTU=","name":"faceswap","full_name":"Tvde1/faceswap","owner":{"login":"Tvde1","id":11540531,"node_id":"MDQ6VXNlcjExNTQwNTMx","avatar_url":"https://avatars2.githubusercontent.com/u/11540531?v=4","gravatar_id":"","url":"https://api.github.com/users/Tvde1","html_url":"https://github.com/Tvde1","followers_url":"https://api.github.com/users/Tvde1/followers","following_url":"https://api.github.com/users/Tvde1/following{/other_user}","gists_url":"https://api.github.com/users/Tvde1/gists{/gist_id}","starred_url":"https://api.github.com/users/Tvde1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tvde1/subscriptions","organizations_url":"https://api.github.com/users/Tvde1/orgs","repos_url":"https://api.github.com/users/Tvde1/repos","events_url":"https://api.github.com/users/Tvde1/events{/privacy}","received_events_url":"https://api.github.com/users/Tvde1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tvde1/faceswap","description":"Non official project based on original /r/Deepfakes thread. Many thanks to him!","fork":true,"url":"https://api.github.com/repos/Tvde1/faceswap","forks_url":"https://api.github.com/repos/Tvde1/faceswap/forks","keys_url":"https://api.github.com/repos/Tvde1/faceswap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tvde1/faceswap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tvde1/faceswap/teams","hooks_url":"https://api.github.com/repos/Tvde1/faceswap/hooks","issue_events_url":"https://api.github.com/repos/Tvde1/faceswap/issues/events{/number}","events_url":"https://api.github.com/repos/Tvde1/faceswap/events","assignees_url":"https://api.github.com/repos/Tvde1/faceswap/assignees{/user}","branches_url":"https://api.github.com/repos/Tvde1/faceswap/branches{/branch}","tags_url":"https://api.github.com/repos/Tvde1/faceswap/tags","blobs_url":"https://api.github.com/repos/Tvde1/faceswap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tvde1/faceswap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tvde1/faceswap/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tvde1/faceswap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tvde1/faceswap/statuses/{sha}","languages_url":"https://api.github.com/repos/Tvde1/faceswap/languages","stargazers_url":"https://api.github.com/repos/Tvde1/faceswap/stargazers","contributors_url":"https://api.github.com/repos/Tvde1/faceswap/contributors","subscribers_url":"https://api.github.com/repos/Tvde1/faceswap/subscribers","subscription_url":"https://api.github.com/repos/Tvde1/faceswap/subscription","commits_url":"https://api.github.com/repos/Tvde1/faceswap/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tvde1/faceswap/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tvde1/faceswap/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tvde1/faceswap/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tvde1/faceswap/contents/{+path}","compare_url":"https://api.github.com/repos/Tvde1/faceswap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tvde1/faceswap/merges","archive_url":"https://api.github.com/repos/Tvde1/faceswap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tvde1/faceswap/downloads","issues_url":"https://api.github.com/repos/Tvde1/faceswap/issues{/number}","pulls_url":"https://api.github.com/repos/Tvde1/faceswap/pulls{/number}","milestones_url":"https://api.github.com/repos/Tvde1/faceswap/milestones{/number}","notifications_url":"https://api.github.com/repos/Tvde1/faceswap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tvde1/faceswap/labels{/name}","releases_url":"https://api.github.com/repos/Tvde1/faceswap/releases{/id}","deployments_url":"https://api.github.com/repos/Tvde1/faceswap/deployments","created_at":"2018-08-20T17:45:44Z","updated_at":"2018-08-20T17:45:48Z","pushed_at":"2018-08-20T19:22:40Z","git_url":"git://github.com/Tvde1/faceswap.git","ssh_url":"git@github.com:Tvde1/faceswap.git","clone_url":"https://github.com/Tvde1/faceswap.git","svn_url":"https://github.com/Tvde1/faceswap","homepage":"https://www.reddit.com/r/deepfakes/","size":90047,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"deepfakes:staging","ref":"staging","sha":"f41f3e99c164863ca7b957b704c0e2cc40245272","user":{"login":"deepfakes","id":34667098,"node_id":"MDQ6VXNlcjM0NjY3MDk4","avatar_url":"https://avatars3.githubusercontent.com/u/34667098?v=4","gravatar_id":"","url":"https://api.github.com/users/deepfakes","html_url":"https://github.com/deepfakes","followers_url":"https://api.github.com/users/deepfakes/followers","following_url":"https://api.github.com/users/deepfakes/following{/other_user}","gists_url":"https://api.github.com/users/deepfakes/gists{/gist_id}","starred_url":"https://api.github.com/users/deepfakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepfakes/subscriptions","organizations_url":"https://api.github.com/users/deepfakes/orgs","repos_url":"https://api.github.com/users/deepfakes/repos","events_url":"https://api.github.com/users/deepfakes/events{/privacy}","received_events_url":"https://api.github.com/users/deepfakes/received_events","type":"User","site_admin":false},"repo":{"id":114747226,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ3NDcyMjY=","name":"faceswap","full_name":"deepfakes/faceswap","owner":{"login":"deepfakes","id":34667098,"node_id":"MDQ6VXNlcjM0NjY3MDk4","avatar_url":"https://avatars3.githubusercontent.com/u/34667098?v=4","gravatar_id":"","url":"https://api.github.com/users/deepfakes","html_url":"https://github.com/deepfakes","followers_url":"https://api.github.com/users/deepfakes/followers","following_url":"https://api.github.com/users/deepfakes/following{/other_user}","gists_url":"https://api.github.com/users/deepfakes/gists{/gist_id}","starred_url":"https://api.github.com/users/deepfakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepfakes/subscriptions","organizations_url":"https://api.github.com/users/deepfakes/orgs","repos_url":"https://api.github.com/users/deepfakes/repos","events_url":"https://api.github.com/users/deepfakes/events{/privacy}","received_events_url":"https://api.github.com/users/deepfakes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deepfakes/faceswap","description":"Non official project based on original /r/Deepfakes thread. Many thanks to him!","fork":false,"url":"https://api.github.com/repos/deepfakes/faceswap","forks_url":"https://api.github.com/repos/deepfakes/faceswap/forks","keys_url":"https://api.github.com/repos/deepfakes/faceswap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deepfakes/faceswap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deepfakes/faceswap/teams","hooks_url":"https://api.github.com/repos/deepfakes/faceswap/hooks","issue_events_url":"https://api.github.com/repos/deepfakes/faceswap/issues/events{/number}","events_url":"https://api.github.com/repos/deepfakes/faceswap/events","assignees_url":"https://api.github.com/repos/deepfakes/faceswap/assignees{/user}","branches_url":"https://api.github.com/repos/deepfakes/faceswap/branches{/branch}","tags_url":"https://api.github.com/repos/deepfakes/faceswap/tags","blobs_url":"https://api.github.com/repos/deepfakes/faceswap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deepfakes/faceswap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deepfakes/faceswap/git/refs{/sha}","trees_url":"https://api.github.com/repos/deepfakes/faceswap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deepfakes/faceswap/statuses/{sha}","languages_url":"https://api.github.com/repos/deepfakes/faceswap/languages","stargazers_url":"https://api.github.com/repos/deepfakes/faceswap/stargazers","contributors_url":"https://api.github.com/repos/deepfakes/faceswap/contributors","subscribers_url":"https://api.github.com/repos/deepfakes/faceswap/subscribers","subscription_url":"https://api.github.com/repos/deepfakes/faceswap/subscription","commits_url":"https://api.github.com/repos/deepfakes/faceswap/commits{/sha}","git_commits_url":"https://api.github.com/repos/deepfakes/faceswap/git/commits{/sha}","comments_url":"https://api.github.com/repos/deepfakes/faceswap/comments{/number}","issue_comment_url":"https://api.github.com/repos/deepfakes/faceswap/issues/comments{/number}","contents_url":"https://api.github.com/repos/deepfakes/faceswap/contents/{+path}","compare_url":"https://api.github.com/repos/deepfakes/faceswap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deepfakes/faceswap/merges","archive_url":"https://api.github.com/repos/deepfakes/faceswap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deepfakes/faceswap/downloads","issues_url":"https://api.github.com/repos/deepfakes/faceswap/issues{/number}","pulls_url":"https://api.github.com/repos/deepfakes/faceswap/pulls{/number}","milestones_url":"https://api.github.com/repos/deepfakes/faceswap/milestones{/number}","notifications_url":"https://api.github.com/repos/deepfakes/faceswap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deepfakes/faceswap/labels{/name}","releases_url":"https://api.github.com/repos/deepfakes/faceswap/releases{/id}","deployments_url":"https://api.github.com/repos/deepfakes/faceswap/deployments","created_at":"2017-12-19T09:44:13Z","updated_at":"2018-08-20T17:40:37Z","pushed_at":"2018-08-20T19:24:42Z","git_url":"git://github.com/deepfakes/faceswap.git","ssh_url":"git@github.com:deepfakes/faceswap.git","clone_url":"https://github.com/deepfakes/faceswap.git","svn_url":"https://github.com/deepfakes/faceswap","homepage":"https://www.reddit.com/r/deepfakes/","size":90030,"stargazers_count":6396,"watchers_count":6396,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1866,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1866,"open_issues":15,"watchers":6396,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/477"},"html":{"href":"https://github.com/deepfakes/faceswap/pull/477"},"issue":{"href":"https://api.github.com/repos/deepfakes/faceswap/issues/477"},"comments":{"href":"https://api.github.com/repos/deepfakes/faceswap/issues/477/comments"},"review_comments":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/477/comments"},"review_comment":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deepfakes/faceswap/pulls/477/commits"},"statuses":{"href":"https://api.github.com/repos/deepfakes/faceswap/statuses/09ed69e01a98d03bb054008b3882e2a83a3160e9"}},"author_association":"NONE"}}
{"actor":{"display_login":"torzdf"}}