Disclosure of Invention
In view of the shortcomings in the prior art, it is an object of the present invention to provide a real-time instance segmentation-based terrain identification and motion prediction system for a lower limb prosthesis.
According to the real-time instance segmentation-based lower limb prosthesis terrain recognition and motion prediction system provided by the invention, a local end comprises a lower limb prosthesis, a lower limb prosthesis controller, a binocular camera and an image acquisition and information transmission hardware platform, and a cloud end comprises a cloud server;
the binocular camera is installed on the lower limb artificial limb and used for collecting topographic information around the lower limb artificial limb, the image collection and information transmission hardware platform collects information obtained by the binocular camera and uploads the information to the cloud server, and the lower limb artificial limb controller controls the motion mode of the lower limb artificial limb;
the cloud server is provided with a target terrain monitoring module, an instance segmentation module, a feature matching module and a position size calculation module, and terrain information is processed by the modules in sequence and then fed back to the lower limb prosthesis controller.
Preferably, the lower limb prosthesis comprises a knee joint having one degree of freedom and an ankle joint having two active degrees of freedom of flexion and extension and supination/inversion.
Preferably, the binocular camera is installed at the front end of the knee joint part and used for acquiring RGB images of the terrain around the lower limb prosthesis, and the binocular camera is configured to: 1280 × 720 resolution, 30 frames/sec sampling rate.
Preferably, the image acquisition and information transmission hardware platform is located in a gap inside the lower limb prosthesis structure body, receives the RGB images acquired by the binocular camera in real time, transmits the RGB images to the cloud server through a wireless network, receives terrain information fed back by the cloud server in real time, and outputs the terrain information to the lower limb prosthesis motion controller.
Preferably, the cloud server is provided with a CPU and a GPU, and the CPU has the characteristic of multithreading and provides services for multiple users at the same time; the GPU accelerates the RGB image processing speed.
Preferably, the lower limb prosthesis controller controls the motion of the lower limb prosthesis and comprises the following steps:
step S1: acquiring motion data of lower limbs of a healthy person in different environmental environments based on the IMU, and storing the motion data in a lower limb prosthesis controller;
step S2: the lower limb prosthesis controller controls and receives the current topographic data of the lower limb prosthesis sent by the cloud server;
step S3: the lower limb prosthesis controller controls the lower limb prosthesis to adopt a motion state suitable for the terrain according to the motion data of the lower limbs of the human body;
step S4: for terrain or obstacles that are still some distance away, the lower limb prosthesis controller predicts whether a passing and predicted arrival time is likely based on the current direction and speed of motion to achieve a smoother state switch from software.
Preferably, the target detection module uses a trained and optimized YoloV4-Lite convolutional neural network based on MobileNet to preliminarily identify different terrain information in the RGB image, marks the terrain information respectively by using Box, and outputs the terrain information to the example segmentation module.
Preferably, the example segmentation module uses a trained Deep Snake convolutional neural network based on cyclic convolution to extract an initial contour of a Box obtained by target detection by using an Extreme Points method, and further uses the Deep Snake network to deform the initial contour to obtain a terrain contour accurately fitting each terrain, and outputs the terrain contour to the feature matching module.
Preferably, the feature matching module is used for performing feature extraction and feature matching on pixels, collected by the binocular camera and processed by the example segmentation module, in the same-time same-type terrain contour range respectively by using a speedup Robust Features method, calculating feature point depth information by combining binocular camera parameters according to the same feature point parallax, and further calculating three-dimensional coordinates of the feature point depth information.
Preferably, the position size calculation module calculates the position, the length, the width and the range of the identified terrain according to the coordinates of the feature points located at the edges of the contour, and calculates the length, the width, the height and the position information of the identified steps, obstacles and the like according to the coordinates of the corner points of the contour.
Compared with the prior art, the invention has the following beneficial effects:
1. the real-time instance segmentation-based lower limb prosthesis terrain identification and motion prediction system realizes intelligent optimization and promotion of the lower limb prosthesis in multiple motion modes, enables the lower limb prosthesis to accurately sense the surrounding terrain distribution situation in real time, corrects and adjusts the motion control strategy in time, and promotes the motion capability and wearing comfort of the lower limb prosthesis wearer.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
The utility model provides a lower limb artificial limb topography discernment and motion prediction system based on real-time example is cut apart, refers to figure 1, includes local end and high in the clouds, and local end includes lower limb artificial limb, lower limb artificial limb controller, binocular camera, image acquisition and information transmission hardware platform, and the high in the clouds includes the cloud ware.
The lower limb artificial limb has multiple movement modes, the limb and the foot of the artificial limb are made of ABS resin materials based on 3D printing, the lower limb artificial limb comprises a knee joint and an ankle joint, and the knee joint and the ankle joint are made of 1060 aluminum alloy materials. The knee joint and the ankle joint of the lower limb artificial limb are driven by a Maxon motor, the knee joint has one degree of freedom, and the ankle part has two active degrees of freedom of flexion and extension and outward rotation/inward inversion.
The binocular camera is installed at knee joint position front end on the lower limb artificial limb to it is fixed through electronic cloud platform, be used for gathering the RGB image of the topography around the lower limb artificial limb, the configuration of binocular camera is: 1280 × 720 resolution, 30 frames/sec sampling rate. The image acquisition and information transmission hardware platform is located in a gap in the lower limb artificial limb structure body, receives RGB images acquired by the binocular camera in real time, transmits the RGB images to the cloud server through a wireless network, receives terrain information fed back by the cloud server in real time, outputs the terrain information to the lower limb artificial limb motion controller, and controls the motion mode of the lower limb artificial limb.
The method for controlling the motion of the lower limb prosthesis by the lower limb prosthesis controller comprises the following steps:
step S1: acquiring motion data of healthy people walking and running on sand, grassland and asphalt ground, ascending and descending ramps and steps, crossing barriers with different widths and heights and human lower limbs based on the IMU, and storing the motion data in a lower limb prosthesis controller;
step S2: the lower limb prosthesis controller controls and receives the current topographic data of the lower limb prosthesis sent by the cloud server;
step S3: the lower limb prosthesis controller controls the lower limb prosthesis to adopt a motion state suitable for the terrain according to the motion data of the lower limbs of the human body;
step S4: for the terrain or obstacles with a certain distance, the lower limb prosthesis controller predicts whether the terrain or the obstacles possibly pass and the predicted arrival time according to the current movement direction and speed, and prepares for movement strategy switching, so as to realize smoother state switching from software and improve the comfort level of the prosthesis.
A target terrain monitoring module, an instance segmentation module, a feature matching module and a position size calculation module are deployed on the cloud server, terrain information is processed by the modules in sequence and then fed back to the image acquisition and information transmission hardware platform, and the image acquisition and information transmission hardware platform sends a control instruction to the lower limb prosthesis controller.
The cloud server is provided with a CPU and a GPU, the CPU has the characteristic of multithreading and provides service for multiple users at the same time; the GPU accelerates the RGB image processing speed. The system has the advantages of high expandability in performance and a redundancy backup mechanism in consideration of the problems of increase of the number of users and failure.
The target terrain detection module needs to perform fine-grained image detection, designs and builds a detection frame based on a deep convolutional neural network and having good real-time performance and high accuracy, and determines the category and the accurate contour of a target object through the convolutional neural network. And collecting a detection data set of the target terrain, completing manual labeling, and performing work such as training set division, verification set division, test set division, data preprocessing and the like. And designing and building a deep convolutional neural network with a proper structure, designing a proper loss function, and training the deep convolutional neural network on a data set. Continuously debugging the hyper-parameters and the network structure according to a training result, and aiming at training a deep convolution neural network with good real-time performance and high identification accuracy. The invention uses improved yoloV4-Lite based on the Mobilene to identify grassland, sand, asphalt ground and steps, the biggest characteristic of the Mobilene is that the method uses deep separable convolution, and the linear convolution channel by channel can greatly reduce the parameter quantity on the premise of ensuring the characteristic extraction effect, as shown in figure 2.
Referring to fig. 3, the input of the original YOLOV4 network is RGB picture with height 416 and width 416, and features are extracted through the CSPDarknet-53 backbone network. Three feature layers with different sizes are used, multi-scale feature fusion is achieved, the deviation of the target position relative to a default rectangular box (default box) is regressed, and meanwhile, a classification confidence coefficient is output. The original YOLOV4 network structure is complex, the prediction speed is slow, and the network structure needs to be adjusted in order to meet the requirement of detection speed in hand-eye coordination. In consideration of the trade-off between accuracy and speed, the MobileNet network is used as a backbone network to extract features, but the resolution of an input picture is not changed, and the same number of features are used for target detection.
The example segmentation module needs to further perform background segmentation on a series of rectangular frames and terrain category labels obtained by the target terrain detection module to obtain accurate outlines of all target terrains, and requires low algorithm computation complexity and good real-time performance. As shown in fig. 4, the Deep Snake algorithm represents the object shape as its outermost contour, with the parameter quantities being very small, close to the rectangular box representation. Firstly, connecting midpoints of four sides of a rectangular frame of a certain target terrain obtained through identification to obtain a rhombus, inputting four vertexes of the rhombus into a Deep Snake network, predicting and obtaining Offsets pointing to four extreme pixel points of the target terrain at the top, the bottom, the left and the right in an image, and obtaining coordinates of the four extreme pixel points through deformation of the rhombus according to the Offsets; secondly, extending a line segment on each point, and then connecting each line segment to obtain an irregular octagon which is used as an initial contour; then, considering that the object contour can be regarded as a Cycle Graph, the number of adjacent nodes of each node is fixed to be 2, and the adjacent sequence is fixed, so that the iterative optimization problem of the contour by convolution processing of a convolution kernel can be defined, then a deep convolution network based on circular convolution is used for fusing and predicting the characteristics of the current contour point, offset pointing to the object contour is obtained through mapping, and the coordinates of the contour point are deformed through the offset; and finally, continuously repeating the process by taking the initial contour as a starting point until the calculated contour is well attached to the actual edge of the target object, predicting that the obtained Offsets is smaller than a threshold value, and outputting a result consisting of a terrain category label and a coordinate set representing contour points.
In addition, the terrain belongs to a target of a background category, the foreground shielding phenomenon is quite common, and aiming at the problem, a grouping detection method can be adopted to divide discontinuous parts of the terrain cut off by foreground objects into different target detection rectangular frames, and then the outline is respectively extracted from each rectangular frame.
The feature matching module and the position size calculating module are used for respectively extracting Features and matching the Features of pixels, collected by the binocular camera and processed by the example segmentation module, in the same-time same-type terrain contour range, calculating feature point depth information by combining parameters of the binocular camera according to the same feature point parallax, and further calculating three-dimensional coordinates of the feature points, wherein the binocular vision positioning principle is shown in fig. 5. For the identified grassland, sand, asphalt ground and the like, the position, the length, the width and the range of the grassland, the sand, the asphalt ground and the like can be calculated according to the coordinates of the characteristic points positioned at the edge of the outline, and for the identified steps, the obstacles and the like, the length, the width, the height and the position information of the steps, the obstacles and the like can be calculated according to the coordinates of the angular points of the outline.
Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.
In the description of the present application, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present application and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present application.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.