Chapter Seventy-Nine: Artificial Intelligence Algorithms
Li Yi and Qin Gang both have red eyes, watching video is a necessary technical means of modern criminal investigation, but it is also a work of physical strength and will.
After working all night, I found three suitable candidates.
Li Yi and Xiaowei asked for eye drops, and both of them lay flat on the chair to drop their eyes.
"You said that we would not miss the monitoring and no copy, and the whole three people came out in one night, and it feels the same as our classified products yesterday, what do you expect." Qin Gang said.
"Otherwise, we only copied less than one-sixth of the camera footage, all copies back, this week is spent on this, and there may not be a few more people to come out, this is a few necessary routes, if not, I estimate that it is really not, perfect avoidance, and now I am a little panicked in my heart."
What Li Yi said is true, if these three people are excluded, yesterday's large-scale and large-scale operation is likely to be thunder and rain.
"If modern artificial intelligence advances by leaps and bounds, will computers be able to do it for us? That is to say, there is such a software system, I give a target portrait, not only people but also license plates, etc., and then give the video source file, and then the computer automatically compares it to us, we drink tea and eat melons, and then the results come out. ”
Qin Gang blinked his eyes, and the dazzling light made him have to close it again.
"Theoretically, yes, but in fact, I really thought about this and needed to build a model. Video is made up of frame-by-frame images, and the higher the accuracy, the more frames per second. Ordinary surveillance has 25 frames per second, that is, 25 images are taken in one second, 90,000 images per hour. In fact, our naked eye scanning is fundamentally different from computer scanning, the naked eye relies on the intuitive perception of geometric figures, while the computer is different. ”
Li Yi got up and wrote a few points on the whiteboard:
1. The image is scaled to a certain size
2. Convert to grayscale
3. Calculate the average of all pixels
4. Compare the gray scale of pixels: compare the gray scale of each pixel with the average value, greater than or equal to the average value is recorded as 1, less than the average value is recorded as 0;
5. Calculate the hash value: Combine the comparison results of the previous step to form a 64-bit integer.
That is to say, each image has a process of pixelation after size conversion, which is a lot of computation. For example, if we give the conditions: backpack, hat back, or side, this is a very vague concept. The computer makes a comparison, first of all, you need a base map, so what should this base map look like, I and your backpack, hat back should be similar, Xiao An is different from us, and Lao Qiu I saw the night before yesterday is different from us. The shape of the package, the shape of the hat, the combination of several factors, you need to build a basemap model library. The range of comparison is not all of the whole person, it is from the head to the waist above, because the length of the backpack is normal and will not exceed the waist. Then there is each frame of the image in the video, and every frame is compared to the basemap library, which is about the same pattern. If our base image library is 100 images, an hour's video, we need to compare 9 million times, and we copy the video for 10 hours, and we calculate it ourselves, this is still a camera. ”
Qin Gang stuck out his tongue, "It sounds a little scary." ”
Xiao An also became interested, "Isn't the current face recognition technology very mature?" Some office buildings and high-speed rail stations can be passed by brushing your face. ”
"Yes, but the essence is the same. The face brushing at the high-speed rail station is to compare your real face with the face on the ID card, a total of two pictures, with the ID card photo as the base map. And the effective face range only needs the range from the eyes to the chin, above the eyes and below the chin are useless data, use the ID photo to compare with the captured face, the amount of comparison data is actually very small, and the results are out in seconds. ”
"Yes, those who enter the station by high-speed rail can just swipe their faces at the camera, at most one second." Qin Gang said.
"That's just the whole process, it doesn't actually take a second, and the comparison result also needs to notify the sensor, and the sensor sends an opening command, and the whole process is about one second."
"So where is the difficulty we have now?" Xiao Andao.
"First, we don't have a prototype, but the prototype library is easy to build, that is, backpacks and hats, find some people with different body types and heights to wear them, and take pictures of the front and side, this amount will not be large, and the efficiency will be completed in two hours, and the difficulty is the second."
Unconsciously, several colleagues pricked up their ears to listen to Li Yi's explanation.
"Keep going, don't stop." Xiao An was particularly interested.
"What we're doing isn't a static analysis, it's a dynamic behavioral analysis."
Li Yi simply stood on the side of the whiteboard, wrote: behavior analysis, enter from outside the school and walk to the wall on the other side.
"Suppose a video is broadcast from the beginning, first of all, we must compare the characteristics of a person wearing a hat in the backpack of someone who enters the screen, and the data of this frame image is considered to be consistent, and determine a prototype, which is not the prototype of the base image library, and the dynamic will be deleted when it is used up. Then it is necessary to analyze whether it is male or female, a person's face photo, the gender can be identified in the computer algorithm, but the side face is not clear, it is estimated that it will not work, but the woman needs to be filtered out, and then until this prototype disappears, this is considered an act. ”
"Got it, appearing and disappearing, it's an act." Qin Gang said.
"Don't interrupt." Xiao An patted Qin Gang.
"That's right, appear and disappear. What is called disappearing, we see with the naked eye that this person has walked into the blind corner of the camera or walked out of the shooting range, and no longer appears even if he disappears. But for computer data, it is a bit vague, the computer only recognizes 0 and 1, can see the existence but not disappear, according to this logic will produce a lot of misjudgment. ”
"Why?" Xiao An was more anxious.
"If a person squats down to tie their shoelaces and happens to be blocked by a plant, does it disappear? According to the logic of 0 and 1, it must be considered to disappear, but it is definitely not. You can fast-forward and continue looking at a paragraph, a computer can't do that, you have to compare frame by frame, otherwise it doesn't make sense, right? ”
The colleagues around him all nodded in agreement.
"But this person just squatted down to tie his shoelaces, and didn't actually disappear, which is inconsistent with the behavioral analysis we set. The camera we chose had continuity in the route, going in one direction, disappearing at A should theoretically appear at B, and if it didn't, it must have gone in a different direction. It's the same in other directions, as long as you walk towards the fence behind the campus, there are continuous cameras, or it should be within the range of behavior we set. However, as a person who is anxious to go to the scene to commit the crime, he will not walk like this, he chooses to go to the scene of the crime in this way, just to avoid people and see people as little as possible. ”
"That's what to do." Xiao Andao.
"You can make a threshold that disappears unexpectedly as a gap, and this threshold is a time, which can be delayed by 5 seconds, 10 seconds, or 20 seconds, and the duration can be set by yourself. That is, after a person disappears, the computer automatically reads the image frame within the threshold range, and if the person within the threshold range has not appeared, it will disappear. ”
"That would actually solve the problem." Qin Gang said.
"It seems like it can be, but there are still problems. Everyone's behavior is different, like I said just to tie the shoelaces, there is no ISO standard, some people are fast 5 seconds to tie, some people are 20 seconds slower to tie up. Or, this person is not tying his shoes, he just happened to have a phone call coming in, and he was crouching on the road to listen to the call, which we saw when we came out of campus the night before. ”
Li Yi looked at Qin Gang, and Qin Gang nodded.
"Why do you still have this hobby, is it comfortable to squat?" Xiao An interjected again.
"It's a personal habit, but the question here is: how big should this threshold be? If it is small, it may miss the opportunity to catch the suspect, and if it is large, it will be a waste of computing resources and time of the computer. ”
Qin Gang raised his hand and said that he wanted to speak, "If this person is not squatting when he answers the phone, he stands still, but his posture when he makes a phone call is completely different from the posture of his backpack walking, can it still be determined that it is the same person?" ”
"There is no problem with this, as I said before, from the head to the waist, excluding the hands, even if he holds a big knife, it will not affect the logical analysis of the computer."
"A computer is a dead thing, and if it is wasted, it will be wasted, as long as the accuracy of the results is guaranteed." Xiao Andao.
"That's not how systems are designed, especially for commercial applications, where time and computing resources are costly. Even if the threshold is raised and the person's behavior is determined, then must he be the person we are looking for? Not necessarily, it's just a camera profile, and our behavior is set to go to the wall, and he can walk into the teaching building, or he can walk into the library, or he can walk into the staff dormitory, etc., so he has to compare all the way to the last camera. ”
Li Yi drank his saliva and continued, "First of all, this amount of data and computing are not the same as ordinary face recognition, one day at a time. Secondly, in principle, we determine a person from behavior, although it is only the back, but we want to see his face, we must think. How to see, not with our eyes, is the computer automatically for us to find out, through the shape of the backpack, the shape of the hat, the side face of the person, the back, this is again a fuzzy algorithm. And just from the back of the person in the first video data, it is difficult to analyze which direction he entered, if it is just a road in Huashan, of course it is easy to do, but the real scene is impossible, because he is likely not to enter through the gate, but over the wall. Therefore, it is necessary to take into account each direction, and the amount of data and computation immediately increases in geometric progression. Again, I'm afraid that there won't be only one person backpacking through a night, so multiplying N by N is really a massive calculation. Of course, I'm not an algorithm engineer, and a professional engineer may have better ideas and algorithm logic, but the amount of data is here, because we determine a fuzzy person based on fuzzy conditions. However, if there is such a technology, it must be of great help to us, and the computer does not know that it will not be hungry if it is tired, and if it dies and goes down, people will hang up. ”
As soon as Li Yi's words fell, the whole office applauded enthusiastically.