RU EN Chapt 3. Instructions for use of Debian/Ubuntu Server and Xfce desktop system Страница: 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 3.27.3. The test method of face_recognition Note that the following operations are demonstrated on the desktop, so please connect the HDMI monitor first, or use NoMachine/VNC to remotely log in to the Linux desktop to test a. GitHub official download address
b. Gitee image download address
https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md
a. Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
b. Wait for a while and the following picture will pop up, which is the face located in the test picture
Img 3.181
a. Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
b. After waiting for a while, the following picture will pop up, and you can see that the outline of the face is marked Img 3.182
a. Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command
b. After waiting for a while, the following picture will pop up. You can see that the faces in the picture are marked with boxes, and the names of the characters are displayed correctly
Img 3.183
a. First, please insert the USB camera into the USB interface of the development board, and then use the v4l2-ctl (note that l in v4l2 is a lowercase letter l, not the number 1) command to check the serial number of the device node of the USB camera
b. Then open a terminal on the desktop, enter the face_recognition/examples directory, and first modify the device serial number of the camera used in facerec_from_webcam_faster.py. For example, through the v4l2-ctl --list-devices command above, you can see that the USB camera is /dev/video1, then modify the 0 in cv2.VideoCapture(0) to 1
c. Then execute the following command to run facerec_from_webcam_faster.py
d. Wait for a while and the camera display screen will pop up
Img 3.184
e. At this point, you can point the camera at yourself. When the camera detects a face, it will frame the detected face with a square. Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast f. You can also open a picture of Obama, and then use the camera to point at the opened picture. You can see that not only the face can be marked, but also the name of the detected face can be displayed correctly. Note that when detecting a face, the image displayed by the camera will be relatively slow, please do not move too fast Img 3.185
a. Open a terminal on the desktop, then enter the face_recognition/examples directory, and then execute the following command (if face_recognition is automatically installed using a script, then there is no need to install flask)
b. Then open another terminal and run the following command to return the result of image recognition (note that the execution path of the following command is face_recognition/examples)
c. We can also copy the picture face_recognition/examples/obama2.jpg to other Linux computers. Of course, we can also prepare a picture named obama2.jpg by ourselves, and then use the following command on the Linux computer to remotely Use the service running on the development board to recognize faces/ Note that the IP address in the command needs to be replaced with the IP address of the development board, and the file name after file needs to be replaced with the name of the picture you want to test.
d. The method to test using the browser is as follows a) First open the browser, then enter the IP address of thedevelopmentboard: Img 3.186 b) Then copy obama2.jpg to the desktop
c) Then select the picture you just copied in your browser Img 3.187 d) Then click Upload to upload the picture you just selected for face recognition Img 3.188 e) After waiting for a while, the detection result will be displayed Img 3.189
a. The face_detection command-line tool can locate the face position (output pixel coordinates) in a single picture or a picture folder. Use face_detection --help to view the help information of the face_detection command
b. An example of detecting a single image is shown below
c. An example of using multiple cores to detect multiple images in parallel is shown below
a. face_recognition command-line tool can recognize whose face is in a single picture or a picture folder. Use face_recognition --help to view the help information of the face_recognition command
b. First create a new face picture folder known_people with a known name, then copy two pictures to known_people, and then copy obama2.jpg to unknown.jpg, which is the picture we want to identify
c. Then you can use the following command to identify the name of the person in the unknown.jpg picture, and you can see that the unknown.jpg picture is recognized as obama
d. If we identify an irrelevant image, unknown_person will be displayed
Страница: 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |