[00:00.000 --> 00:05.860] Hi, everyone, and welcome to the afternoon session at AI Village. I am pleased to introduce [00:05.860 --> 00:11.840] Kenya Yoshimura and Takahiro Yoshimura on Clairvoyant's concurrent lip reading for the [00:11.840 --> 00:15.860] smart masses. Thank you, everybody. Please give them a huge round of applause. [00:20.220 --> 00:28.200] Thank you. Hi, everyone. Nice to meet you. Today, we are talking about our research [00:28.200 --> 00:34.720] on automated lip reading. If you have any questions, please mention us in Twitter or [00:34.720 --> 00:43.600] something at any time. Thank you. My name is Takahiro. I'm a security researcher. [00:44.100 --> 00:51.440] Hi, my name is Kenya. I'm a researcher, too. We are not native English speakers, [00:51.440 --> 01:03.540] so better support for our English is no good. Okay. Firstly, let us introduce ourselves. [01:03.960 --> 01:09.320] We are a small security firm located in Saitama, Japan. Do you know Saitama? [01:11.980 --> 01:16.820] Saitama is a peaceful, distinct line north of Tokyo. [01:18.280 --> 01:26.280] As you see, it has great nature. We live in some urban area near Tokyo. [01:31.300 --> 01:39.760] Up there, we do various security-related works from vulnerability assessments, [01:39.760 --> 01:46.340] code audits, forensics analysis, and some good research. [01:48.260 --> 02:00.830] We play CTFs, too. We also give talks in conferences. So, what is lip reading? [02:01.390 --> 02:09.770] Lip reading is a technique. Reading speakers' lips to extract what he or she is saying. [02:09.770 --> 02:17.430] Commonly used among hearing-impaired people. Let's see the action. [02:23.290 --> 02:37.820] Just a moment. [02:47.430 --> 02:58.450] Yes. You hear no audio. But we map lips. We map the area with lips. And lip reading works like [02:58.450 --> 03:11.130] this. In lip reading, people say lips and extract what he or she is saying. So, let us show another [03:11.130 --> 03:33.540] example. It is not an easy task. Not only it takes quite a long time to master it, [03:33.540 --> 03:38.160] but also even professional human lip readers often misread. [03:41.840 --> 03:49.960] Automated lip reading is somewhat a hot area of research these days. As we know, we have LipNet, [03:49.960 --> 03:56.300] which has been written by Oxford University, et al., probably three years ago. [03:57.160 --> 04:03.040] So, what is LipNet? LipNet is an awesome lip reading neural network. [04:03.480 --> 04:12.460] Researchers have shown it can read words of the lips of English speakers in more than 90% accuracy [04:12.460 --> 04:23.980] of a person. Like human lip readers, LipNet works by looking for the movement of the lips. [04:24.440 --> 04:34.680] More specifically, it extracts the images of mouses out of the input frames. For instruction, [04:34.680 --> 04:44.640] it uses a face detector and predictor. Here are examples of extracted mouse images. [04:48.880 --> 05:01.460] Did you notice something? Why are they in color? Because LipNet tends to overfit on grayscale [05:01.460 --> 05:12.540] images since it has rather simple CNNs in the former stage. Well, let's see it in action. [05:14.600 --> 05:23.740] The GRID. GRID is a large multi-talker audio-visual sentencing corpus to support joint [05:23.740 --> 05:30.420] computational behavior studies in speech perception. It consists of high-quality [05:31.460 --> 05:38.800] audio and facial recordings of 1,000 sentences spoken by each of 34 speakers. [05:38.800 --> 05:46.780] You can check it as a landmark corpus for speech recognition in controlled environments. [05:47.520 --> 05:51.120] Now, let's see how well LipNet works. [05:52.780 --> 06:00.400] Ah, we will be using pre-trained LipNet in our two clever ones. [06:12.870 --> 06:18.430] As you see, our frame is displayed and recognition is running. [06:28.560 --> 06:30.600] Oh, see? [06:32.680 --> 06:41.860] Red, blue, white, eye, nine, please. Not so bad. In contrast, [06:41.860 --> 06:48.320] pressure on human lip readers mark about 50, or a solid score in average. [06:51.640 --> 06:53.820] So far, so good. [06:54.480 --> 07:12.500] Then, let it spin on some real-world recordings. This is a recording. [07:31.480 --> 07:42.940] So, I'm sorry, but it's a bit hard to see why it's red. But, [07:45.220 --> 07:51.980] no, he shouldn't be talking such nonsense. It is so GRID-like sentence. [07:52.280 --> 07:53.660] What happened? [07:55.980 --> 07:57.760] It might be overfit. [07:57.760 --> 07:58.420] Maybe. [07:59.640 --> 08:01.760] Vocabulary might be limited. [08:01.760 --> 08:02.380] Maybe. [08:04.240 --> 08:11.620] Anyways, in real world, people talk in way more variety than controlled environments. [08:11.620 --> 08:22.080] Feeding Lips, LipNet gives us sentences because it requires extensive retraining on updating [08:22.080 --> 08:31.140] vocabulary. For easy update of vocabulary, we think it is better to decouple sentence generation [08:31.140 --> 08:40.880] by give forms instead of sentences. Actually, B2P, a more modern lip-reading model, [08:40.880 --> 08:42.720] produces forms. [08:44.340 --> 08:52.680] So, let's say the curse of GRID remains upon us until we undergo the full [08:52.680 --> 09:00.800] retrain. Retrain, go, eat. Using something more fun. [09:05.790 --> 09:16.210] Now, we almost hear you say, why are you using such nonsense, Zen? [09:18.070 --> 09:23.830] Yeah. It's right. We could not have compasses handy. [09:25.830 --> 09:35.550] As you see, L, R, W, 1 and 2, the lip-reading in the wide compasses have non-commercial only [09:35.550 --> 09:43.910] policy, enforced by BBC, and introducing a long turnaround time. Because we are not students, [09:43.910 --> 09:49.810] nor in research institution, we could not use them. [09:50.330 --> 09:54.910] For L, R, L, 3, the lip-reading in the sentences compass [09:56.010 --> 10:04.650] has very different format for alignments. Alignments are precise transcriptions. [10:04.910 --> 10:18.590] For example, L, R, L, 3 use seconds for the time point, and it does not use the C or SP [10:18.590 --> 10:26.170] notations. For this reason, we are forced to convert the format to one expected by the [10:26.170 --> 10:35.550] implementation we use. On top of that, it contains far, far longer clips than GRID. [10:36.490 --> 10:45.430] And we must arrange input format for that. During doing something like this, [10:45.430 --> 10:55.070] our time has run out. So, please forgive us for using ... for the rest of our session. [10:56.330 --> 11:04.310] Of course, we don't stop there. We are to decouple lip-reading models out of our two. [11:04.630 --> 11:10.770] Well, enough for excuse. Let's get back to the topic. [11:15.870 --> 11:25.710] So, we want our two clever hands to deal with security cameras. How, where does it do? [11:26.650 --> 11:34.190] As you know, security camera streams present full of challenges. People tend to look down, [11:34.190 --> 11:39.040] lower quality of image, lower frame rate, and tremendous marbling. [11:39.040 --> 11:48.620] So, lower quality. This is mostly because they are small devices, so optics are limited, [11:49.060 --> 11:59.600] and they are designed to record for a long time. Next, people seem to look down. This is because [11:59.600 --> 12:06.720] they are often mounted somewhere hard to reach to, often somewhere high, or looking down. [12:08.180 --> 12:16.020] Lastly, people look marbling all the time. This is because of angle of camera, often, [12:16.020 --> 12:25.800] they are mounted looking down people. Two years ago, Roskrans applied lip-reading [12:25.800 --> 12:33.080] to security cameras in Dutch language, and he succeeded to detect aggressions. [12:33.080 --> 12:40.520] In his research, a URAS-based model is used for detecting certain words, such as cars, [12:40.520 --> 12:55.740] and streets. How, where does it do? Okay, let's see. [13:07.930 --> 13:09.790] Security camera recordings. [13:28.660 --> 13:38.980] You see a red rectangle, and the rectangle shows a MacGyver bus is reading that area. [13:50.530 --> 14:01.430] So, see, it had no problem to detect faces and read the lips, in spite of the challenges we [14:01.430 --> 14:19.270] have described. So far, so good. But wait. Then, what is the point of our research? [14:20.010 --> 14:27.190] It is concurrency. Honestly, we have not seen a single research of applying a model to the [14:27.190 --> 14:35.410] concurrent lip-reading of a multiple person. This is what we did. Today, we stand here to [14:35.410 --> 14:42.510] show you how we read multiple persons in concurrent manner. On top of that, we are [14:42.510 --> 14:49.690] going to identify speakers so that we can track threads of conversations in a set. [14:54.710 --> 15:03.990] So, in order to read the lips, we must detect where they stand. Sorry, the face. [15:05.050 --> 15:16.310] We used DLib-based detection to detect them. As you know, DLib is quite a vast image processing [15:16.310 --> 15:22.770] library powered by machine learning techniques. We once thought to utilize something more orthodox, [15:22.770 --> 15:38.490] say, using OpenCV. But it doesn't go well. Detectors based on OpenCV tend to be picky [15:38.490 --> 15:48.490] over alignment, dropping person not standing upward, or something like that. On the other hand, [15:48.490 --> 15:59.930] ones based on DLib handle cases like this just fine. Or more robust, at least. As you know, [15:59.930 --> 16:08.690] DLib does hook-based detection by default. But it can utilize CNN for more precise detection. [16:09.490 --> 16:17.630] Clairvoyance can use it too. But it comes with significantly higher cost. About 15 times of [16:17.630 --> 16:33.280] that of hook-based detection. After detecting faces, we keep their features for their identities. [16:34.180 --> 16:42.280] For facial recognition processes, we use the face recognition library. With it, we can [16:42.280 --> 16:53.860] hash facial features into 128-dimensional vectors called encodings. We recognize faces by keeping [16:53.860 --> 17:08.000] zero encodings and finding distances among them. But fortunately, our recognition process [17:08.960 --> 17:18.280] is not quite stable. That is a problem. We call rank swaps more specifically. [17:18.900 --> 17:29.320] The facial tag can jump around. But why do they do? We have identified three root causes. [17:31.460 --> 17:37.760] The first one is because facial encodings are brittle. [17:38.000 --> 17:47.420] By saying brittle, we mean we cannot get the same encoding for the same face in the same pose. [17:49.620 --> 17:56.200] The next one is because facial detection order is not stable. [17:56.820 --> 18:02.820] By saying not stable means we cannot predict the order of the faces reported. [18:04.580 --> 18:15.640] And the last one is because resembling threshold. The distance with the face recognition [18:15.640 --> 18:24.860] library considers resembling enough. It's set at 0.6, quite a high number. But is this number [18:24.860 --> 18:30.100] really high? Let us show some pictures. [18:32.960 --> 18:44.500] Trump and Hillary both showing 0.3 inches. They both have distances of 0.3 inches. Can you believe [18:44.500 --> 18:56.400] it? Oh, okay. Fictional ranks are not easy. But we believe it is safe to assume faces are not [18:56.400 --> 19:16.690] supported. We need a few experiments. So, after recognizing faces, we detect their lips. [19:17.130 --> 19:25.970] To detect lips, we use 68 points face predictor. Taking points after 48. [19:26.730 --> 19:39.470] After detecting lips, then we research them as we knew. Since our model expects them in 100 by [19:39.470 --> 19:47.670] 50. So, we target that size. For better recognition, we also attempt to up-sampling them [19:48.590 --> 19:54.770] if they are small. For up-sampling them, we could utilize some super resolution imaging [19:54.770 --> 20:07.810] techniques. SRs are techniques that intend to recreate details. But is SR really helpful? [20:08.790 --> 20:18.230] SRs are quite expensive. So, we did some experiments to weigh their costs. Let us show [20:18.230 --> 20:28.810] some pictures. The center one and the right one are both resized instances of the left one. [20:29.190 --> 20:35.350] The center is done with SR, and the right is done with the nearest neighbor method. [20:36.430 --> 20:45.450] Can you spot the difference? We could not. So, we concluded that SRs are not worth [20:45.450 --> 20:59.990] the cost for our use cases. So, we dropped the idea. And to compensate lower frame rate, [20:59.990 --> 21:11.310] we consider the interpolating frames before creating our model. But as far as we know, [21:11.310 --> 21:15.430] modern security cameras tend to generate enough frame rate just fine. [21:16.250 --> 21:26.050] So, we think interpolating frames would be superficial, so we dropped the idea either. [21:29.170 --> 21:39.290] After our ribs got resized, we sent them to reading process by batch by batch, [21:39.290 --> 21:51.140] face-by-face, for concurrent readings. Reading process. Reading process is tasked [21:51.140 --> 21:58.140] to feed our model continuously and output the reading with a name and some timestamp. [21:58.220 --> 22:03.690] Reading process is driven by coroutines, so reading occurs in FIFO order. [22:06.760 --> 22:11.320] Well, enough talking. Let's see how it goes. [22:13.930 --> 22:41.040] Hmm. We are reading four persons in parallel. [23:07.470 --> 23:14.670] See? We have succeeded to read four people in four ways of talking. [23:19.490 --> 23:25.900] As a bonus, we really deserve to clear bonus as free software, as free in freedom. [23:25.900 --> 23:33.540] Please feel free to experiment with it, or please send us a request. [23:37.520 --> 23:45.980] Please mention us in Twitter or something for questions. We'll reply later. Okay? [23:49.620 --> 23:56.480] Oh. Well, that is all for today. Thank you for listening to us.