{"action":"created","issue":{"url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/15","repository_url":"https://api.github.com/repos/tpb1908/FaceDetector","labels_url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/15/comments","events_url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/15/events","html_url":"https://github.com/tpb1908/FaceDetector/issues/15","id":213863153,"number":15,"title":"Way simpler recognition","user":{"login":"bongo227","id":2641780,"avatar_url":"https://avatars3.githubusercontent.com/u/2641780?v=3","gravatar_id":"","url":"https://api.github.com/users/bongo227","html_url":"https://github.com/bongo227","followers_url":"https://api.github.com/users/bongo227/followers","following_url":"https://api.github.com/users/bongo227/following{/other_user}","gists_url":"https://api.github.com/users/bongo227/gists{/gist_id}","starred_url":"https://api.github.com/users/bongo227/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bongo227/subscriptions","organizations_url":"https://api.github.com/users/bongo227/orgs","repos_url":"https://api.github.com/users/bongo227/repos","events_url":"https://api.github.com/users/bongo227/events{/privacy}","received_events_url":"https://api.github.com/users/bongo227/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2017-03-13T18:51:44Z","updated_at":"2017-03-13T21:55:48Z","closed_at":null,"body":"Turns out this is all you need to get the 128 dim vector\r\n```python\r\n# Convert to RGB\r\nprint \"Converting frame to RGB\"\r\nframe = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)\r\n\r\n# Align face\r\nprint \"Aligning face\"\r\nalignedFace = self.aligner.align(96, frame, skipMulti=True) # skip image if more than one face is detected\r\n\r\n# Extract features\r\nif alignedFace is not None:\r\n    print \"Initializing neural net\"\r\n    with openface.TorchNeuralNet(model=\"./data/nn4.small2.v1.t7\") as net:\r\n        print \"Starting forward pass\"\r\n        features = net.forward(alignedFace)\r\n\r\n        print features\r\nelse:\r\n    print \"No face found\"\r\n```\r\n\r\nNow I just need to put it through the cascade...."},"comment":{"url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/comments/286256277","html_url":"https://github.com/tpb1908/FaceDetector/issues/15#issuecomment-286256277","issue_url":"https://api.github.com/repos/tpb1908/FaceDetector/issues/15","id":286256277,"user":{"login":"bongo227","id":2641780,"avatar_url":"https://avatars3.githubusercontent.com/u/2641780?v=3","gravatar_id":"","url":"https://api.github.com/users/bongo227","html_url":"https://github.com/bongo227","followers_url":"https://api.github.com/users/bongo227/followers","following_url":"https://api.github.com/users/bongo227/following{/other_user}","gists_url":"https://api.github.com/users/bongo227/gists{/gist_id}","starred_url":"https://api.github.com/users/bongo227/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bongo227/subscriptions","organizations_url":"https://api.github.com/users/bongo227/orgs","repos_url":"https://api.github.com/users/bongo227/repos","events_url":"https://api.github.com/users/bongo227/events{/privacy}","received_events_url":"https://api.github.com/users/bongo227/received_events","type":"User","site_admin":false},"created_at":"2017-03-13T21:55:48Z","updated_at":"2017-03-13T21:55:48Z","body":"This is what im going to send Amber:\r\n\r\nIn the new program you press the numbers 1 to 4 to switch between the different parts of face recognition. If you need to explain how the program works you can do the following:\r\n\r\nPress \"1\"\r\nThis is the bounding box mode. In this mode we draw a box around all the faces in the frame. To do this look at a 16x16 block of pixels and find its gradient (which way its pointing) to generate a HOG image. With this data we compare it against a HOG face pattern which is the combination of 100s of 1000s of HOG images to see if each part of the image is a face. Once we find a face we draw a box around it.\r\n\r\nPress \"2\"\r\nWith the position of the face we use the same HOG image to draw 68 points on every face called landmarks to help us with the next step.\r\n\r\nPress \"3\"\r\nUsings the face landmarks we rotate, scale and shear the image so the face is fairly central, this helps to make the neural network more accurate since the faces look more simular.\r\n\r\nPress \"4\"\r\nWe pass this data through a neural network which has be pre-trained on almost 1 million photos. For every face we get a 128 int vector which describes all the features which make up your face. Now to recognise the faces between each frame we simply look at the faces from last frame which were most similar and match them up.\r\n"}}
{"actor":{"display_login":"bongo227"}}