1 00:00:00,000 --> 00:00:03,860 Hi, everyone, and welcome to the afternoon session at AI Village. 2 00:00:04,020 --> 00:00:12,820 I am pleased to introduce Kenya Yoshimura and Takahiro Yoshimura on Clairvoyant's concurrent lip reading for the smart masses. 3 00:00:12,820 --> 00:00:13,660 Thank you, everybody. 4 00:00:13,660 --> 00:00:15,860 Please give them a huge round of applause. 5 00:00:20,220 --> 00:00:21,100 Thank you. 6 00:00:21,420 --> 00:00:22,800 Hi, everyone. 7 00:00:22,960 --> 00:00:24,460 Nice to meet you. 8 00:00:24,900 --> 00:00:30,760 Today, we are talking about our research on automated lip reading. 9 00:00:30,840 --> 00:00:36,220 If you have any questions, please mention us in Twitter or something at any time. 10 00:00:36,220 --> 00:00:37,240 Thank you. 11 00:00:39,540 --> 00:00:41,340 My name is Takahiro. 12 00:00:41,340 --> 00:00:43,600 I'm a security researcher. 13 00:00:44,100 --> 00:00:46,380 Hi, my name is Kenya. 14 00:00:46,380 --> 00:00:48,140 I'm a researcher, too. 15 00:00:48,420 --> 00:00:55,220 We are not native English speakers, so better support for our English is no good. 16 00:00:56,640 --> 00:00:58,240 Okay. 17 00:00:59,220 --> 00:01:03,540 Firstly, let us introduce ourselves. 18 00:01:03,960 --> 00:01:07,880 We are a small security firm located in Saitama, Japan. 19 00:01:08,040 --> 00:01:09,320 Do you know Saitama? 20 00:01:11,980 --> 00:01:16,820 Saitama is a peaceful, distinct line north of Tokyo. 21 00:01:18,280 --> 00:01:22,440 As you see, it has great nature. 22 00:01:22,580 --> 00:01:26,280 We live in some urban area near Tokyo. 23 00:01:31,300 --> 00:01:46,340 Up there, we do various security-related works from vulnerability assessments, code audits, forensics analysis, and some good research. 24 00:01:48,260 --> 00:01:51,580 We play CTFs, too. 25 00:01:52,500 --> 00:01:56,440 We also give talks in conferences. 26 00:01:59,230 --> 00:02:00,830 So, what is lip reading? 27 00:02:01,390 --> 00:02:04,170 Lip reading is a technique. 28 00:02:04,650 --> 00:02:09,770 Reading speakers' lips to extract what he or she is saying. 29 00:02:09,770 --> 00:02:14,230 Commonly used among hearing-impaired people. 30 00:02:14,230 --> 00:02:17,430 Let's see the action. 31 00:02:23,290 --> 00:02:24,610 Just 32 00:02:37,000 --> 00:02:37,820 a moment. 33 00:02:47,430 --> 00:02:48,650 Yes. 34 00:02:49,470 --> 00:02:51,350 You hear no audio. 35 00:02:51,350 --> 00:02:54,690 But we map lips. 36 00:02:54,690 --> 00:02:57,090 We map the area with lips. 37 00:02:57,370 --> 00:02:59,390 And lip reading works like this. 38 00:02:59,870 --> 00:03:06,550 In lip reading, people say lips and extract what he or she is saying. 39 00:03:07,450 --> 00:03:12,430 So, let us show another example. 40 00:03:26,760 --> 00:03:29,500 It is not an easy task. 41 00:03:29,800 --> 00:03:38,160 Not only it takes quite a long time to master it, but also even professional human lip readers often misread. 42 00:03:41,840 --> 00:03:47,540 Automated lip reading is somewhat a hot area of research these days. 43 00:03:47,540 --> 00:03:56,300 As we know, we have LipNet, which has been written by Oxford University, et al., probably three years ago. 44 00:03:57,160 --> 00:03:58,960 So, what is LipNet? 45 00:03:58,980 --> 00:04:03,040 LipNet is an awesome lip reading neural network. 46 00:04:03,480 --> 00:04:13,960 Researchers have shown it can read words of the lips of English speakers in more than 90% accuracy of a person. 47 00:04:15,540 --> 00:04:23,980 Like human lip readers, LipNet works by looking for the movement of the lips. 48 00:04:24,440 --> 00:04:33,240 More specifically, it extracts the images of mouses out of the input frames. 49 00:04:33,440 --> 00:04:38,980 For instruction, it uses a face detector and predictor. 50 00:04:38,980 --> 00:04:44,640 Here are examples of extracted mouse images. 51 00:04:48,880 --> 00:04:51,120 Did you notice something? 52 00:04:52,660 --> 00:04:55,500 Why are they in color? 53 00:04:57,320 --> 00:05:07,380 Because LipNet tends to overfit on grayscale images since it has rather simple CNNs in the former stage. 54 00:05:07,840 --> 00:05:12,540 Well, let's see it in action. 55 00:05:14,600 --> 00:05:15,800 The GRID. 56 00:05:15,800 --> 00:05:28,600 GRID is a large multi-talker audio-visual sentencing corpus to support joint computational behavior studies in speech perception. 57 00:05:28,660 --> 00:05:38,800 It consists of high-quality audio and facial recordings of 1,000 sentences spoken by each of 34 speakers. 58 00:05:38,800 --> 00:05:46,780 You can check it as a landmark corpus for speech recognition in controlled environments. 59 00:05:47,520 --> 00:05:51,120 Now, let's see how well LipNet works. 60 00:05:52,780 --> 00:06:00,400 Ah, we will be using pre-trained LipNet in our two clever ones. 61 00:06:12,870 --> 00:06:18,430 As you see, our frame is displayed and recognition is running. 62 00:06:28,560 --> 00:06:30,600 Oh, see? 63 00:06:32,680 --> 00:06:38,620 Red, blue, white, eye, nine, please. 64 00:06:38,620 --> 00:06:40,340 Not so bad. 65 00:06:40,420 --> 00:06:48,320 In contrast, pressure on human lip readers mark about 50, or a solid score in average. 66 00:06:51,640 --> 00:06:53,820 So far, so good. 67 00:06:54,480 --> 00:06:59,200 Then, let it spin on some real-world recordings. 68 00:07:11,140 --> 00:07:12,500 This is a recording. 69 00:07:31,480 --> 00:07:42,320 So, I'm sorry, but it's a bit hard to see why it's red. 70 00:07:42,320 --> 00:07:48,980 But, no, he shouldn't be talking such nonsense. 71 00:07:49,500 --> 00:07:51,980 It is so GRID-like sentence. 72 00:07:52,280 --> 00:07:53,660 What happened? 73 00:07:55,980 --> 00:07:57,760 It might be overfit. 74 00:07:57,760 --> 00:07:58,420 Maybe. 75 00:07:59,640 --> 00:08:01,760 Vocabulary might be limited. 76 00:08:01,760 --> 00:08:02,380 Maybe. 77 00:08:04,240 --> 00:08:11,620 Anyways, in real world, people talk in way more variety than controlled environments. 78 00:08:11,620 --> 00:08:23,600 Feeding Lips, LipNet gives us sentences because it requires extensive retraining on updating vocabulary. 79 00:08:24,020 --> 00:08:35,160 For easy update of vocabulary, we think it is better to decouple sentence generation by give forms instead of sentences. 80 00:08:35,160 --> 00:08:42,720 Actually, B2P, a more modern lip-reading model, produces forms. 81 00:08:44,340 --> 00:08:53,360 So, let's say the curse of GRID remains upon us until we undergo the full retrain. 82 00:08:54,200 --> 00:08:57,020 Retrain, go, eat. 83 00:08:57,100 --> 00:09:00,800 Using something more fun. 84 00:09:05,790 --> 00:09:16,210 Now, we almost hear you say, why are you using such nonsense, Zen? 85 00:09:18,070 --> 00:09:19,450 Yeah. 86 00:09:19,450 --> 00:09:21,090 It's right. 87 00:09:21,090 --> 00:09:23,830 We could not have compasses handy. 88 00:09:25,830 --> 00:09:41,990 As you see, L, R, W, 1 and 2, the lip-reading in the wide compasses have non-commercial only policy, enforced by BBC, and introducing a long turnaround time. 89 00:09:41,990 --> 00:09:49,810 Because we are not students, nor in research institution, we could not use them. 90 00:09:50,330 --> 00:10:01,170 For L, R, L, 3, the lip-reading in the sentences compass has very different format for alignments. 91 00:10:01,170 --> 00:10:04,650 Alignments are precise transcriptions. 92 00:10:04,910 --> 00:10:20,110 For example, L, R, L, 3 use seconds for the time point, and it does not use the C or SP notations. 93 00:10:20,110 --> 00:10:29,370 For this reason, we are forced to convert the format to one expected by the implementation we use. 94 00:10:30,350 --> 00:10:35,550 On top of that, it contains far, far longer clips than GRID. 95 00:10:36,490 --> 00:10:40,590 And we must arrange input format for that. 96 00:10:41,170 --> 00:10:48,110 During doing something like this, our time has run out. 97 00:10:48,390 --> 00:10:55,070 So, please forgive us for using ... for the rest of our session. 98 00:10:56,330 --> 00:10:59,990 Of course, we don't stop there. 99 00:11:00,230 --> 00:11:04,310 We are to decouple lip-reading models out of our two. 100 00:11:04,630 --> 00:11:08,130 Well, enough for excuse. 101 00:11:08,230 --> 00:11:10,770 Let's get back to the topic. 102 00:11:15,870 --> 00:11:22,750 So, we want our two clever hands to deal with security cameras. 103 00:11:22,750 --> 00:11:25,710 How, where does it do? 104 00:11:26,650 --> 00:11:31,850 As you know, security camera streams present full of challenges. 105 00:11:31,910 --> 00:11:39,040 People tend to look down, lower quality of image, lower frame rate, and tremendous marbling. 106 00:11:39,040 --> 00:11:43,160 So , lower quality. 107 00:11:43,160 --> 00:11:52,800 This is mostly because they are small devices, so optics are limited, and they are designed to record for a long time. 108 00:11:53,240 --> 00:11:58,860 Next, people seem to look down. 109 00:11:58,860 --> 00:12:06,720 This is because they are often mounted somewhere hard to reach to, often somewhere high, or looking down. 110 00:12:08,180 --> 00:12:12,820 Lastly, people look marbling all the time. 111 00:12:12,820 --> 00:12:18,820 This is because of angle of camera, often, they are mounted looking down people. 112 00:12:21,860 --> 00:12:33,080 Two years ago, Roskrans applied lip-reading to security cameras in Dutch language, and he succeeded to detect aggressions. 113 00:12:33,080 --> 00:12:41,940 In his research, a URAS-based model is used for detecting certain words, such as cars, and streets. 114 00:12:44,780 --> 00:12:52,940 How, where does it do? 115 00:12:53,660 --> 00:12:55,740 Okay, let's see. 116 00:13:07,930 --> 00:13:09,790 Security camera recordings. 117 00:13:28,660 --> 00:13:38,980 You see a red rectangle, and the rectangle shows a MacGyver bus is reading that area. 118 00:13:50,530 --> 00:14:02,690 So, see, it had no problem to detect faces and read the lips, in spite of the challenges we have described. 119 00:14:11,490 --> 00:14:13,310 So far, so good. 120 00:14:13,310 --> 00:14:14,550 But wait. 121 00:14:15,550 --> 00:14:19,270 Then, what is the point of our research? 122 00:14:20,010 --> 00:14:21,570 It is concurrency. 123 00:14:21,570 --> 00:14:30,170 Honestly, we have not seen a single research of applying a model to the concurrent lip-reading of a multiple person. 124 00:14:31,410 --> 00:14:33,470 This is what we did. 125 00:14:33,470 --> 00:14:39,550 Today, we stand here to show you how we read multiple persons in concurrent manner. 126 00:14:40,230 --> 00:14:49,690 On top of that, we are going to identify speakers so that we can track threads of conversations in a set. 127 00:14:54,710 --> 00:15:02,390 So, in order to read the lips, we must detect where they stand. 128 00:15:02,390 --> 00:15:03,990 Sorry, the face. 129 00:15:05,050 --> 00:15:12,370 We used DLib-based detection to detect them. 130 00:15:12,670 --> 00:15:19,030 As you know, DLib is quite a vast image processing library powered by machine learning techniques. 131 00:15:19,770 --> 00:15:26,290 We once thought to utilize something more orthodox, say, using OpenCV. 132 00:15:26,290 --> 00:15:30,530 But it doesn't go well. 133 00:15:31,090 --> 00:15:46,870 Detectors based on OpenCV tend to be picky over alignment, dropping person not standing upward, or something like that. 134 00:15:46,870 --> 00:15:54,050 On the other hand, ones based on DLib handle cases like this just fine. 135 00:15:54,050 --> 00:15:57,970 Or more robust, at least. 136 00:15:58,490 --> 00:16:03,410 As you know, DLib does hook-based detection by default. 137 00:16:03,750 --> 00:16:08,690 But it can utilize CNN for more precise detection. 138 00:16:09,490 --> 00:16:12,490 Clairvoyance can use it too. 139 00:16:12,490 --> 00:16:15,850 But it comes with significantly higher cost. 140 00:16:15,850 --> 00:16:20,370 About 15 times of that of hook-based detection. 141 00:16:26,320 --> 00:16:33,280 After detecting faces, we keep their features for their identities. 142 00:16:34,180 --> 00:16:41,020 For facial recognition processes, we use the face recognition library. 143 00:16:41,020 --> 00:16:49,760 With it, we can hash facial features into 128-dimensional vectors called encodings. 144 00:16:49,760 --> 00:16:59,200 We recognize faces by keeping zero encodings and finding distances among them. 145 00:17:00,960 --> 00:17:11,340 But fortunately, our recognition process is not quite stable. 146 00:17:11,880 --> 00:17:13,240 That is a problem. 147 00:17:13,240 --> 00:17:18,280 We call rank swaps more specifically. 148 00:17:18,900 --> 00:17:21,740 The facial tag can jump around. 149 00:17:21,740 --> 00:17:23,940 But why do they do? 150 00:17:25,260 --> 00:17:29,320 We have identified three root causes. 151 00:17:31,460 --> 00:17:37,760 The first one is because facial encodings are brittle. 152 00:17:38,000 --> 00:17:47,420 By saying brittle, we mean we cannot get the same encoding for the same face in the same pose. 153 00:17:49,620 --> 00:17:56,200 The next one is because facial detection order is not stable. 154 00:17:56,820 --> 00:18:02,820 By saying not stable means we cannot predict the order of the faces reported. 155 00:18:04,580 --> 00:18:13,240 And the last one is because resembling threshold. 156 00:18:13,240 --> 00:18:18,500 The distance with the face recognition library considers resembling enough. 157 00:18:18,500 --> 00:18:23,280 It's set at 0.6, quite a high number. 158 00:18:23,280 --> 00:18:26,580 But is this number really high? 159 00:18:27,140 --> 00:18:30,100 Let us show some pictures. 160 00:18:32,960 --> 00:18:38,960 Trump and Hillary both showing 0.3 inches. 161 00:18:40,000 --> 00:18:44,000 They both have distances of 0.3 inches. 162 00:18:44,000 --> 00:18:45,520 Can you believe it? 163 00:18:47,780 --> 00:18:49,340 Oh, okay. 164 00:18:49,340 --> 00:18:52,180 Fictional ranks are not easy. 165 00:18:52,240 --> 00:18:57,420 But we believe it is safe to assume faces are not supported. 166 00:18:58,500 --> 00:19:06,700 We need a few experiments. 167 00:19:10,390 --> 00:19:16,690 So, after recognizing faces, we detect their lips. 168 00:19:17,130 --> 00:19:22,970 To detect lips, we use 68 points face predictor. 169 00:19:23,290 --> 00:19:25,970 Taking points after 48. 170 00:19:26,730 --> 00:19:34,850 After detecting lips, then we research them as we knew. 171 00:19:35,130 --> 00:19:40,770 Since our model expects them in 100 by 50. 172 00:19:40,950 --> 00:19:43,210 So, we target that size. 173 00:19:43,470 --> 00:19:50,310 For better recognition, we also attempt to up-sampling them if they are small. 174 00:19:50,470 --> 00:19:56,690 For up-sampling them, we could utilize some super resolution imaging techniques. 175 00:19:56,910 --> 00:20:03,930 SRs are techniques that intend to recreate details. 176 00:20:04,070 --> 00:20:07,810 But is SR really helpful? 177 00:20:08,790 --> 00:20:12,070 SRs are quite expensive. 178 00:20:12,590 --> 00:20:17,370 So, we did some experiments to weigh their costs. 179 00:20:17,630 --> 00:20:19,690 Let us show some pictures. 180 00:20:21,650 --> 00:20:28,810 The center one and the right one are both resized instances of the left one. 181 00:20:29,190 --> 00:20:35,350 The center is done with SR, and the right is done with the nearest neighbor method. 182 00:20:36,430 --> 00:20:38,270 Can you spot the difference? 183 00:20:39,290 --> 00:20:41,030 We could not. 184 00:20:41,410 --> 00:20:49,950 So, we concluded that SRs are not worth the cost for our use cases. 185 00:20:49,950 --> 00:20:51,870 So, we dropped the idea. 186 00:20:53,630 --> 00:21:05,850 And to compensate lower frame rate, we consider the interpolating frames before creating our model. 187 00:21:06,090 --> 00:21:15,430 But as far as we know, modern security cameras tend to generate enough frame rate just fine. 188 00:21:16,250 --> 00:21:26,050 So, we think interpolating frames would be superficial, so we dropped the idea either. 189 00:21:29,170 --> 00:21:43,670 After our ribs got resized, we sent them to reading process by batch by batch, face-by-face, for concurrent readings. 190 00:21:47,720 --> 00:21:49,660 Reading process. 191 00:21:49,660 --> 00:21:58,140 Reading process is tasked to feed our model continuously and output the reading with a name and some timestamp. 192 00:21:58,220 --> 00:22:03,690 Reading process is driven by coroutines, so reading occurs in FIFO order. 193 00:22:06,760 --> 00:22:09,280 Well, enough talking. 194 00:22:09,280 --> 00:22:11,320 Let's see how it goes. 195 00:22:13,930 --> 00:22:15,410 Hmm. 196 00:22:37,890 --> 00:22:41,040 We are reading four persons in parallel. 197 00:23:07,470 --> 00:23:08,910 See? 198 00:23:09,030 --> 00:23:14,670 We have succeeded to read four people in four ways of talking. 199 00:23:19,490 --> 00:23:25,900 As a bonus, we really deserve to clear bonus as free software, as free in freedom. 200 00:23:25,900 --> 00:23:33,540 Please feel free to experiment with it, or please send us a request. 201 00:23:37,520 --> 00:23:42,780 Please mention us in Twitter or something for questions. 202 00:23:43,160 --> 00:23:44,580 We'll reply later. 203 00:23:45,080 --> 00:23:45,980 Okay? 204 00:23:49,620 --> 00:23:50,540 Oh. 205 00:23:50,980 --> 00:23:54,000 Well, that is all for today. 206 00:23:54,000 --> 00:23:56,480 Thank you for listening to us.