Robot camera mechanism self-inspection method, electronic device and storage medium

The neural network model is used to detect robot camera occlusion, which solves the problem of visual perception failure caused by robot camera occlusion, realizes self-detection and alarm, and improves the reliability and safety of robots in complex environments.

CN112836711BActive Publication Date: 2024-08-23SHANGHAI YOGO ROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110246556.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-05
Publication Date
2024-08-23
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

Robot cameras may be blocked artificially or non-artificially in indoor environments, causing visual perception system failure, affecting motion planning decisions, and lacking self-detection and alarm mechanisms.

Method used

The camera mechanism self-inspection method based on neural network is used to collect occlusion images in preset scenes, perform histogram preprocessing and feature vector calculation, build a multi-layer sensing unit model, train network parameters, realize camera occlusion detection, and continuously Triggers an alarm when no target is detected within 5 seconds.

Benefits of technology

It realizes the robot's self-detection and alarm for camera occlusion, ensuring timely reporting of errors and alerting pedestrians in case of occlusion, without affecting the use of robot resources, and improving the reliability and safety of the robot in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112836711B
    Figure CN112836711B
Patent Text Reader

Abstract

The present application relates to a camera mechanism self-inspection method, electronic device and storage medium of a robot. The method collects images of a camera mechanism when it is blocked in a preset scene, and pre-processes the images to form a training set; constructs a camera mechanism self-inspection network model, which includes a multi-layer perception unit; uses the images of the training set to train the camera mechanism self-inspection network model, and optimizes the network parameters of the camera mechanism self-inspection network model, thereby adopting a robot camera occlusion self-inspection strategy based on a neural network algorithm, and at the same time adopts a combination of a convolution module and a multi-layer perception machine to simplify the computational complexity of an occlusion detection module, and combines the characteristics of business scenarios to dynamically call the occlusion self-inspection module to save robot resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a robot's camera mechanism self-inspection method, electronic equipment, and storage medium. Background Art

[0002] When the robot moves in indoor environments such as office buildings, it relies on the camera to identify and perceive the environmental conditions in front of it, and then makes motion planning decisions. In the daily operation of the robot, there are abnormal occlusions of the robot's lens, whether human or non-human. For example, when the robot squeezes into the elevator during the lunch rush hour, pedestrians' clothes will stick to the robot's lens. At the same time, some users will tentatively block the robot's lens with their hands or mobile phones. At this time, the robot's visual perception system will not work, and the robot itself will not be aware of the camera occlusion, so the robot's motion planning will also be affected. Summary of the invention

[0003] In order to overcome the problems existing in the related technology, the present application provides a robot's camera mechanism self-inspection method, electronic device and storage medium, aiming to provide a robot with the function of self-checking abnormal occlusion of the front camera, so that when the robot's lens is blocked, the robot can report an error and broadcast in the surrounding area to remind pedestrians not to interfere with the robot's work.

[0004] The technical solution of the present application to solve the above-mentioned technical problems is as follows: a camera mechanism self-inspection method for a robot, which comprises the following steps: step 1, collecting images when the camera mechanism is blocked in a preset scene, and preprocessing the images to form a training set; step 2, constructing a camera mechanism self-inspection network model, wherein the camera mechanism self-inspection network model comprises a multi-layer perception unit; step 3, using the images of the training set to train the camera mechanism self-inspection network model, and optimizing the network parameters of the camera mechanism self-inspection network model.

[0005] Preferably, an image is collected when the camera mechanism is blocked in a preset scene, and the image is preprocessed to form a training set, which specifically includes: preprocessing the image by means of a picture histogram to obtain pixel values ​​of the image; converting the pixel values ​​of the image into a decimal value range of 0 to 255; and counting the probability distribution p(i) of the pixel values ​​of the image in the value range of 0 to 255 to obtain a histogram probability distribution p(i) function of the image.

[0006] Preferably, the histogram probability distribution p(i) function of the image is:

[0007]

[0008] Where W is the width of the image and H is the height of the image.

[0009] Preferably, a 256-dimensional feature vector is calculated for the histogram probability distribution p(i) of the image through the camera mechanism self-checking network model, and a one-dimensional convolution layer is added to the multi-layer perception unit, and the one-dimensional convolution layer is defined as:

[0010]

[0011] Wherein K is the parameter of the convolution kernel, p is the histogram probability distribution of the image, and y is a 64-dimensional feature vector.

[0012] Preferably, in the camera mechanism self-checking network model, the multi-layer perception unit is provided with a three-layer perception machine, the number of hidden layer connections of the multi-layer perception unit is 16, and the multi-layer perception unit is positioned as follows:

[0013] z=σ 16 →1(σ 64 →16(y(i)));

[0014] Where z is the output of the multi-layer perception unit.

[0015] Preferably, the final prediction value Z of the camera self-checking network model is obtained by a sigmoid function, and the Z function is:

[0016]

[0017] Where z is the output of the multi-layer perception unit. When Z is greater than 0.7, it means that the camera mechanism is blocked, and Z is less than or equal to 0.7, it means that the camera mechanism is normal.

[0018] Preferably, the structure of the camera mechanism self-inspection network model is as follows according to the processing order of the computing units: an image preprocessing unit, used to perform histogram preprocessing on the image; a one-dimensional convolution unit, used to convolve the preprocessed image; a first fully connected layer, used to fully connect the output of the one-dimensional convolution unit; a second fully connected layer, used to fully connect the output of the first fully connected layer; a third fully connected layer, used to fully connect the output of the second fully connected layer; an activation function layer, used to make the output of the third fully connected layer nonlinear.

[0019] Preferably, the camera mechanism self-checking network model is trained using the images of the training set to obtain a loss function of the camera mechanism self-checking network model, and the loss function is:

[0020] CELoss=Y log(Z)+(1-Y)log(1-Z).

[0021] Preferably, after step S3, the following steps are also included: when the robot is turned on, repositioned or the robot switches state, it is determined whether the camera mechanism has detected the target for 5 consecutive seconds; when the camera mechanism has not detected the target for more than 5 consecutive seconds, the robot raises an alarm to indicate that the camera mechanism has been blocked, and the robot maintains blocked detection.

[0022] A second aspect of an embodiment of the present application provides an electronic device, including:

[0023] processor; and one or more processors; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing the method as described above.

[0024] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0025] The present application provides a camera mechanism self-inspection method, an electronic device and a storage medium for a robot. The method collects images of a camera mechanism when it is blocked in a preset scene, and pre-processes the images to form a training set; constructs a camera mechanism self-inspection network model, and the camera mechanism self-inspection network model includes a multi-layer perception unit; uses the images of the training set to train the camera mechanism self-inspection network model, and optimizes the network parameters of the camera mechanism self-inspection network model, thereby adopting a robot camera occlusion self-inspection strategy based on a neural network algorithm, and at the same time adopts a combination of a convolution module and a multi-layer perception machine to simplify the computational complexity of an occlusion detection module, and combines the characteristics of business scenarios to dynamically call the occlusion self-inspection module to save robot resources.

[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and other objects, features and advantages of the present application will become more apparent through a more detailed description of exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0028] Figure 1 It is a flowchart of a method for self-checking a camera mechanism of a robot shown in an embodiment of the present application;

[0029] Figure 2 It is a schematic diagram of the image preprocessing process shown in an embodiment of the present application;

[0030] Figure 3 is a schematic diagram of a camera mechanism self-checking network model shown in an embodiment of the present application;

[0031] Figure 4 is another flowchart of a method for self-checking a camera mechanism of a robot shown in an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0034] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0035] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0036] The robot of the embodiment of the present invention can be constructed into any suitable shape to realize specific business function operation. For example, the robot of the embodiment of the present invention can be a delivery robot, a handling robot, a nursing robot, etc. The robot generally includes a shell, a sensor unit, a driving wheel component, a storage component and a controller. The outer shape of the shell is generally circular. In some embodiments, the outer shape of the shell can be generally elliptical, triangular, D-shaped, cylindrical or other shapes. The sensor unit is used to collect some motion parameters of the robot and various data of the environment space. In some embodiments, the sensor unit includes a laser radar, which is installed above the shell, and its installation height is higher than the top shell height of the shell. The laser radar is used to detect the obstacle distance between the robot obstacles. In some embodiments, the sensor unit may also include an inertial measurement unit (IMU), a gyroscope, a magnetic field meter, an accelerometer or a speedometer, an optical camera, etc. The driving wheel component is installed on the shell and drives the robot to move in various spaces. In some embodiments, the driving wheel component includes a left driving wheel, a right driving wheel and an omnidirectional wheel, and the left driving wheel and the right driving wheel are respectively installed on opposite sides of the shell. The left drive wheel and the right drive wheel are configured to at least partially extend and retract the bottom of the shell. The omnidirectional wheel is installed at the front position of the bottom of the shell. The omnidirectional wheel is a movable caster that can rotate 360 ​​degrees horizontally so that the robot can turn flexibly. The installation of the left drive wheel, the right drive wheel and the omnidirectional wheel forms a triangle to improve the stability of the robot's walking. Of course, in some embodiments, the drive wheel component can also adopt other structures, such as the omnidirectional wheel can be omitted, and only the left drive wheel and the right drive wheel can drive the robot to walk normally. In some embodiments, the robot is also equipped with a storage component, which is installed in the receiving slot to complete the delivery task, etc. The controller is electrically connected to the left drive wheel, the right drive wheel, the omnidirectional wheel and the laser radar respectively. The controller serves as the control core of the robot and is used to control the robot to walk, retreat and process some business logic.

[0037] In some embodiments, the controller may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single chip microcomputer, an AR (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component or any combination of these components. In addition, the controller may also be any conventional processor, controller, microcontroller or state machine. The controller may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in combination with a DSP and / or any other such configuration. In some embodiments, during the activity of the above-mentioned robot, the controller uses SLAM (simultaneous localization and mapping) technology to construct a map and locate according to environmental data, thereby moving to the target location to complete delivery tasks, cleaning tasks, etc. The controller instructs the robot to completely traverse an environmental space based on the established map and the position of the robot through a full coverage path planning algorithm. For example, when the robot traverses, the sensor unit acquires an image of the traversed area, wherein the image of the traversed area may be an image of the entire traversed area, or an image of a local traversed area in the entire traversed area. The controller generates a map based on the image of the traversed area, and the map indicates the area that the robot needs to traverse and the coordinate positions of the obstacles in the traversed area. After the robot traverses each position or area, the robot marks the position or area as having been traversed based on the map. In addition, since the obstacles are marked in the map in the form of coordinates, when the robot traverses, it can judge the distance between the obstacle and the coordinate point corresponding to the current position and the coordinate point involved in the obstacle, thereby realizing the traversal work around the obstacle. Similarly, after the position or area has been traversed and marked, when the robot's next position will move to the position or area, the robot makes a strategy of turning around or stopping the traversal based on the map and the mark of the position or area. It can be understood that the controller can also identify the traversed position or area in a variety of ways, or identify obstacles, so as to make a control strategy that meets the product requirements.

[0038] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0039] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for self-checking a camera mechanism of a robot according to the first embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0040] Step S1, collecting images when the camera mechanism is blocked in a preset scene, and preprocessing the images to form a training set;

[0041] Specifically, in this example, the camera mechanism can be a camera or other device that can capture images of objects; different objects are used to block the camera mechanism of the robot. In business scenarios, enough blocking situations are artificially created to collect enough samples to form a sample training set. At the same time, the robot is allowed to collect data in dark scenes to prevent false alarms when the light is poor.

[0042] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the image preprocessing process shown in the first embodiment of the present application;

[0043] The step of collecting images when the camera mechanism is blocked in the preset scene and preprocessing the images to form a training set further includes the following steps:

[0044] Step S101, preprocessing the image by means of a picture histogram to obtain pixel values ​​of the image. At this time, the pixel value of each position of the image is stored in 8 bits.

[0045] Step S102: convert the pixel values ​​of the image into a decimal value range of 0 to 255.

[0046] Step S103, counting the probability distribution p(i) of the pixel values ​​of the image in the numerical range of 0 to 255, and obtaining the histogram probability distribution p(i) function of the image. The histogram probability distribution p(i) function of the image is:

[0047]

[0048] Where W is the width of the image, and H is the height of the image. The histogram of the abnormally occluded image shows a relatively concentrated probability distribution, and the probability distribution of smaller pixel values ​​is more concentrated. Normal images are generally distributed more evenly. However, if the threshold is selected in a simple empirical manner, a good judgment effect is often not obtained. For example, in some semi-occluded situations, its performance rules on the feature map are often difficult to figure out. This embodiment adopts a strategy based on a neural network to improve the robustness of the camera occlusion self-detection, and calculates the histogram probability distribution of all pictures in the data set, that is, a 256-dimensional feature vector, according to the histogram probability distribution p(i) function formula of the image.

[0049] Step S2, constructing a camera mechanism self-inspection network model, wherein the camera mechanism self-inspection network model includes a multi-layer perception unit.

[0050] Please refer to Figure 3 , Figure 3It is a schematic diagram of the camera mechanism self-checking network model. The structure of the camera mechanism self-checking network model is, in the order of processing by the computing units, an image preprocessing unit, a one-dimensional convolution unit, a first fully connected layer, a second fully connected layer, a third fully connected layer, and an activation function layer. The image preprocessing unit is used to perform histogram preprocessing on the image. After the camera mechanism captures the image, the image is input into the image preprocessing unit, and the image is preprocessed by means of a picture histogram to obtain a 265-dimensional feature vector. The one-dimensional convolution unit is used to convolve the preprocessed image. After the 265-dimensional feature vector passes through the one-dimensional convolution unit, the one-dimensional convolution unit outputs a feature vector of 265 to 64 dimensions. The one-dimensional convolution unit is a one-dimensional convolution layer. The one-dimensional convolution layer and the multi-layer perception unit are combined to form the camera mechanism self-checking network model. The one-dimensional convolution layer is defined as:

[0051]

[0052] Wherein K is the parameter of the convolution kernel, p is the histogram probability distribution of the image, and y is a 64-dimensional feature vector.

[0053] In one embodiment, in the camera self-checking network model, the multi-layer perception unit is provided with a three-layer perception machine, the number of hidden layer connections of the multi-layer perception unit is 16, and the multi-layer perception unit is positioned as follows:

[0054] z=σ 16 →1(σ 64 →16(y(i)));

[0055] Where z is the output of the multi-layer perception unit.

[0056] The multi-layer perception unit includes the first fully connected layer, the second fully connected layer, the third fully connected layer and the activation function layer. The first fully connected layer is used to fully connect the output of the one-dimensional convolution unit. When the feature vector of 265 to 64 dimensions passes through the first fully connected layer, the first fully connected layer outputs a feature vector of 64 to 16 dimensions. The second fully connected layer is used to fully connect the output of the first fully connected layer. When the feature vector of 64 to 16 dimensions passes through the second fully connected layer, the second fully connected layer outputs a feature vector of 16 to 1 dimensions. The third fully connected layer is used to fully connect the output of the second fully connected layer. The activation function layer is used to make the output of the third fully connected layer nonlinear, and the activation function is a sigmoid function. The final prediction value Z of the camera mechanism self-inspection network model is obtained by the sigmoid function, and the Z function is:

[0057]

[0058] Where z is the output of the multi-layer perception unit. When Z is greater than 0.7, it means that the camera mechanism is blocked, and Z is less than or equal to 0.7, it means that the camera mechanism is normal.

[0059] Step S3: training the camera mechanism self-inspection network model using the images in the training set to optimize the network parameters of the camera mechanism self-inspection network model.

[0060] Specifically, the camera mechanism self-inspection network model is trained using the images of the training set to obtain a loss function of the camera mechanism self-inspection network model. The loss function is:

[0061] CELoss=Y log(Z)+(1-Y)log(1-Z).

[0062] Specifically, taking into account the possibility of human subjective misjudgment when constructing the data set, 128 groups of data are selected for each batch of training network. The loss values ​​of the 128 groups of data are calculated and sorted according to the formula of the above loss function, and the 1 / 8 maximum value and the 1 / 8 minimum value are removed. The gradients of the remaining 96 groups of loss values ​​are returned to update the network parameters of the camera mechanism self-inspection network model. The training method adopts the stochastic gradient descent method SGD+momentum method, the learning momentum parameter is set to 0.9, the convolution parameter L2 regularization penalty coefficient is set to 0.001, the learning rate is a polynomial slow decrease, and the training is terminated after 100 times to save the network parameters.

[0063] In this embodiment, by collecting images of a camera mechanism under a preset scene when it is occluded and preprocessing the images, a training set is formed; a camera mechanism self-detection network model is constructed, and the camera mechanism self-detection network model includes a multi-layer perception unit; the camera mechanism self-detection network model is trained using the images of the training set, and the network parameters of the camera mechanism self-detection network model are optimized, so as to adopt a robot camera occlusion self-detection strategy based on a neural network algorithm, and at the same time, a convolution module is combined with a multi-layer perceptron to simplify the computational complexity of the occlusion detection module, and in combination with the characteristics of the business scenario, the occlusion self-detection module is dynamically called to save robot resources.

[0064] See also Figure 4 , Figure 4 This is another flow chart of the robot's camera mechanism self-checking method shown in the second embodiment of the present application. This embodiment is based on the above embodiment and adds additional processes. After step S3, the following steps are also included:

[0065] Step S301, when the robot is powered on, repositioned, or the robot switches states, determining whether the camera mechanism detects a target within 5 consecutive seconds;

[0066] Step S302: When the camera mechanism fails to detect a target for more than 5 seconds, the robot raises an alarm to warn that the camera mechanism has been blocked, and the robot maintains the blockage detection.

[0067] Specifically, considering the limited resources of the robot, it is usually not possible to process every frame of the image through the occlusion detection module. This example adopts a dynamic call strategy to save robot resources. When the following situations exist, the camera mechanism self-check program is called when the camera mechanism is blocked:

[0068] 1. When the robot is turned on / repositioned;

[0069] 2. The robot camera fails to detect any scene target (such as pedestrians, elevator doors, robots, etc.) for more than 5 seconds;

[0070] 3. The robot switches state (such as starting to enter the gate, elevator and other IOT devices)

[0071] 4. The robot has been blocked, and the blockage detection is maintained, and the warning is raised until the alarm is lifted and the blockage detection is exited.

[0072] In this example, when the robot camera encounters abnormal occlusion, the camera occlusion detection module determines the abnormal situation of the camera based on the histogram probability distribution of the camera, and can report the camera occlusion error and stop the robot.

[0073] In this embodiment, by collecting images of a camera mechanism under a preset scene when it is occluded and preprocessing the images, a training set is formed; a camera mechanism self-detection network model is constructed, and the camera mechanism self-detection network model includes a multi-layer perception unit; the camera mechanism self-detection network model is trained using the images of the training set, and the network parameters of the camera mechanism self-detection network model are optimized, so as to adopt a robot camera occlusion self-detection strategy based on a neural network algorithm, and at the same time, a convolution module is combined with a multi-layer perceptron to simplify the computational complexity of the occlusion detection module, and in combination with the characteristics of the business scenario, the occlusion self-detection module is dynamically called to save robot resources.

[0074] Figure 5 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0075] See also Figure 5 , the electronic device 400 includes a memory 410 and a processor 420.

[0076] The processor 420 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0077] The memory 410 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 410 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 410 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0078] The memory 410 stores executable codes, and when the executable codes are processed by the processor 420 , the processor 420 can execute part or all of the methods described above.

[0079] The scheme of the present application has been described in detail above with reference to the accompanying drawings. In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, refer to the relevant description of other embodiments. Those skilled in the art should also know that the actions and modules involved in the description are not necessarily required for the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application can be adjusted in order, merged and deleted according to actual needs, and the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0080] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0081] Alternatively, the present application can also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or electronic device, server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0082] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or combinations of both.

[0083] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, a program segment or a code, and the part of the module, the program segment or the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or the flow chart, and the combination of the square boxes in the block diagram and / or the flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0084] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A robot camera self-inspection method, characterized in that: The following steps are involved: Step 1, collecting images when the camera mechanism is blocked in a preset scene, and preprocessing the images to form a training set; Step 2, constructing a camera mechanism self-checking network model, wherein the camera mechanism self-checking network model includes a multi-layer perception unit; Step 3, using the images of the training set to train the camera self-inspection network model, and optimizing the network parameters of the camera self-inspection network model; Collecting images when the camera mechanism is blocked in a preset scene, and preprocessing the images to form a training set specifically includes: Preprocessing the image by means of a picture histogram to obtain pixel values ​​of the image; Convert the pixel value of the image into a decimal value range of 0 to 255; Counting the probability distribution p(i') of the pixel values ​​of the image in the numerical range of 0 to 255, and obtaining the histogram probability distribution p(i') function of the image; The histogram probability distribution p(i') function of the image is: Where W is the width of the image and H is the height of the image; The histogram probability distribution p(i) of the image is calculated using the camera self-checking network model with 256 dimensions, and a one-dimensional convolutional layer is added to the multi-layer perception unit. The one-dimensional convolutional layer is defined as: Where K is the parameter of the convolution kernel, p is the histogram probability distribution of the image, and y is a 64-dimensional feature vector; In the camera mechanism self-checking network model, the multi-layer perception unit is provided with a three-layer perception machine, the number of hidden layer connections of the multi-layer perception unit is 16, and the multi-layer perception unit is positioned as follows: zσ 16→1 (σ 64→16 (y(i))) Where z is the output of the multi-layer perception unit; The structure of the camera self-checking network model is as follows according to the processing order of the computing units: An image preprocessing unit, used for performing histogram preprocessing on the image; A one-dimensional convolution unit, used to convolve the preprocessed image; A first fully connected layer, used to fully connect the output of the one-dimensional convolution unit; A second fully connected layer, used to fully connect the output of the first fully connected layer; A third fully connected layer, used to fully connect the output of the second fully connected layer; An activation function layer, used to nonlinearize the output of the third fully connected layer; The multi-layer perception unit includes the first fully connected layer, the second fully connected layer, the third fully connected layer and the activation function layer; After step S3, the method further includes the following steps: When the robot is powered on, repositioned, or the robot switches states, determining whether the camera mechanism detects a target for 5 consecutive seconds; When the camera mechanism fails to detect a target for more than 5 seconds, the robot raises an alarm to warn that the camera mechanism has been blocked, and the robot maintains the blocked detection.

2. The robot camera self-inspection method according to claim 1, characterized in that: The final prediction value Z of the camera self-checking network model is obtained by the sigmoid function, and the Z function is: Where z is the output of the multi-layer perception unit. When Z is greater than 0.7, it means that the camera mechanism is blocked, and Z is less than or equal to 0.7, it means that the camera mechanism is normal.

3. An electronic device, comprising: Memory; one or more processors; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods according to claim 1 or 2.

4. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the robot's imaging mechanism self-inspection method according to claim 1 or 2 is implemented.