Intelligent NFC walking stick and obstacle detection method thereof

文档序号:1147422 发布日期:2020-09-15 浏览:15次 中文

阅读说明:本技术 一种智能nfc手杖及其障碍物检测方法 (Intelligent NFC walking stick and obstacle detection method thereof ) 是由 何富运 管旭升 罗玉玲 苏珉 王勋 黄晓明 张耀 于 2020-05-20 设计创作,主要内容包括:本发明公开了一种智能NFC手杖及其障碍物检测方法,属于电子电路技术领域,包括伸缩组件和抓柄,所述抓柄设置在伸缩组件的顶部,所述抓柄上设置有触摸开关、LED指示灯、NFC模块、定位模块、无线充电接收模块、电池模块和控制器模块。通过在手杖扶手处内集成NFC芯片,使手杖能够在实现辅助行走的基础上具有传统门禁卡和交通卡的功能。老人由于年事已高,自身行动不便、反应迟钝、记忆力下降,当他们拄着拐杖通过小区门及单元门或者乘坐公交车、地铁时,本发明能让老人无需再翻找对应的门禁卡或交通卡,仅需要用手杖的扶手接触相应的卡片感应位置,即可通过小区门、单元门或者完成地铁、公交的购票。(The invention discloses an intelligent NFC walking stick and an obstacle detection method thereof, and belongs to the technical field of electronic circuits. Through the NFC chip of integration in stick handrail department, make the stick can have the function of traditional entrance guard card and traffic card on the basis of realizing supplementary walking. The old people have high ages, are inconvenient to move, slow in response and low in memory, and when the old people lean on the walking stick to pass through the residential quarter door and the unit door or take a bus or a subway, the old people can pass through the residential quarter door and the unit door or finish ticket purchasing of the subway or the bus by only contacting the corresponding card induction position with the handrail of the walking stick without finding the corresponding access card or traffic card.)

1. An intelligence NFC stick, includes flexible subassembly (8) and grabs handle (9), grab handle (9) and set up the top at flexible subassembly (8), its characterized in that: the grab handle (9) is provided with a touch switch (1), an LED indicator light (2), an NFC module (3), a positioning module (4), a wireless charging receiving module (5), a battery module (6) and a controller module (8), the NFC module (3), the positioning module (4), the wireless charging receiving module (5), the battery module (6) and the controller module (8) are all arranged in the grab handle (9), the touch switch (1) is arranged at the top end of the head of the grab handle (9), the LED indicator lamp (2) is embedded at the front end of the grab handle (9), the wireless charging receiving module (5) is connected with a battery module (6), the battery module (6) is connected with a controller module (8) through a touch switch (1) for supplying power, the LED indicating lamp (2), the NFC module (3) and the positioning module (4) are all connected with the controller module (8).

2. The intelligent NFC hand wand of claim 1, wherein: the telescopic assembly (8) is composed of a plurality of nested pipes embedded into each other, external threads (12) are arranged on the outer side of the top of each nested pipe, internal threads (13) are arranged on the inner side of the bottom of each nested pipe, and the external threads of each nested pipe are in threaded connection with the internal threads (13) of the nested pipe at the front end.

3. An intelligent NFC hand stick according to claim 2, characterised in that: the positioning module (4) comprises an ATK1218-BD position acquisition submodule and a GPRS A6 submodule, the ATK1218-BD position acquisition submodule and the GPRS A6 submodule are both connected with the controller module (8), and the GPRS A6 submodule is in wireless connection with a remote user side.

4. The intelligent NFC hand stick and the obstacle detection method thereof according to claim 3, characterized in that: still include camera (10) and speaker (11), camera (10) and speaker (11) all set up and grab handle (9) front end bottom, and camera (10) and speaker (11) all are connected with controller module (8).

5. The intelligent NFC hand stick and the obstacle detection method thereof according to claim 1, characterized in that: the NFC module (3) uses the master control chip model to be a TRF7970A chip, and the NFC module (3) is connected with the serial port 1 of the controller module (8).

6. The obstacle detection method of an intelligent NFC hand stick according to claim 4, characterized in that: the method comprises the following steps:

step 1: using a camera (10) to take a picture of a road surface with an obstacle, and taking the taken picture as a sample library of obstacle images;

step 2: respectively enhancing each sample library image, expanding the number of the sample library images, wherein the data enhancement method comprises the steps of horizontally turning over the images, vertically turning over the images, adding random noise and randomly rotating the images; then, marking the classes of the objects in the obstacle image by using a marking tool, and storing the marked data information in a PASCAL VOC format according to a specific protocol;

and step 3: constructing a detection model of the image, wherein the model consists of a feature extraction network, a spatial pyramid network and a feature pyramid network constructed by a multi-scale prediction layer and is used for generating an obstacle feature map of an obstacle image and detecting and identifying obstacles on 3 feature map areas with different scales;

and 4, step 4: training a detection model, training the detection model by a random gradient descent method to obtain an obstacle model, inputting an image of the obstacle to be detected into the trained model for testing, realizing obstacle detection, and broadcasting the image of the obstacle to a user by using a loudspeaker (11) after the obstacle is found.

7. The obstacle detection method of an intelligent NFC hand stick according to claim 6, characterized in that: in the step 2, the method for enhancing the data of the obstacle image comprises the steps of horizontally turning over the image, vertically turning over the image, adding random noise and randomly rotating the image, and expanding a data set of an obstacle sample; adopting the label making tool LabelImg as the using and labeling tool; the marking information file comprises coordinates of an obstacle marking frame in the image, a category label and a saved picture path, and the coordinates, the category label and the saved picture path are stored in the file in an XML format.

8. The obstacle detection method of an intelligent NFC hand stick according to claim 6, characterized in that: in the step 3, the DensNet feature extraction network composed of 4 dense modules replaces the original feature extraction network, and has the functions of ensuring more effective information flow among the convolution layers, preventing gradient disappearance and enhancing feature reuse, and the expression formula is xl=Hl([x0,x1,x2,...,xl-1]) (ii) a Wherein HlRepresents a composite function consisting of a BN layer, a ReLU layer and a 3 × 3 convolution layer, [ x ]0,x1,x2,...,xl-1]The method comprises the steps of representing and splicing feature maps from different previous layers, forming a transition layer by a convolutional layer of 1 × 1 and an average pooling layer of 2 × 2 between two adjacent dense modules to realize feature map dimension reduction, realizing local feature interaction of the feature maps of three scales in a convolution kernel mode to form a multi-scale prediction layer when the feature map dimensions are 13 × 13, 26 × 26 and 52 × 52 after the dense modules, and inserting a spatial pyramid network into the multi-scale prediction layer to realize a feature pyramid network.

9. The obstacle detection method of an intelligent NFC hand stick according to claim 6, characterized in that: the detection flow of the obstacles in the step 3 is as follows:

resizing the image to 416 × 416, then segmenting the image into S × S meshes, if the center of the target is located in a mesh cell, performing the detection process in that mesh(ii) a Each grid unit respectively predicts B surrounding frames, Confidence scores of the surrounding frames and class information probability C of the object, and the Confidence scores are expressed by a formulaObtaining; the Confidence score is equal to the intersection ratio between the real bounding box and the predicted bounding box; the coordinates of the predicted bounding box are labeled (x, y, w, h); wherein x and y represent midpoint coordinates of the prediction bounding box, and w and h represent the length and width of the prediction bounding box; if no object exists in the grid cell, the value is 0, otherwise, the value is 1;

using a logistic normalization process to the coordinates (x, y, w, h) of the predicted bounding box obtained in the previous step;

processing the region which meets the Confidence threshold value in the image by adopting a non-maximum value inhibition algorithm;

and acquiring the coordinate range and the category information corresponding to the calibration prediction enclosure frame through the processing result of the non-maximum value inhibition.

10. The obstacle detection method of an intelligent NFC hand stick according to claim 6, characterized in that: the loss function trained in the step 4 is as follows:

Loss=Errorcoord+Erroriou+Errorcls

Figure FDA0002499264000000031

wherein Errorcoord、ErroriouAnd ErrorclsRespectively representing the error of the predicted bounding box, the IOU error and the classification error; lambda [ alpha ]coordTo sit onCalibrating error weight; s2B is the number of meshes into which the input image is divided, and B is the number of bounding boxes generated for each mesh; if it is notIf the number of the bounding boxes is equal to 1, the jth bounding box covers the target in the ith grid; otherwiseEqual to 0;

Figure FDA0002499264000000036

Technical Field

The invention relates to the technical field of electronic circuits, in particular to an intelligent NFC walking stick and a barrier detection method thereof.

Background

With the development of society, the aging of the Chinese population has increased to the first world. It is expected that the prevalence of China over 65 years will exceed that of Japan in 2030, and it will become the country with the highest degree of global population aging. By 2050 years, the Chinese society enters a deep aging stage, and the population over 60 years old accounts for over 30 percent. The elderly, as a group that is increasingly larger in society, are relatively inconvenient to move and have degraded learning and reaction abilities compared with young people, and need more care and care to enable them to live better. A lot of old people pass in and out district can forget to take the access control card, perhaps when taking means of transportation, forget to take I C cards etc. simultaneously old person's action is more slow when needing to take out from pocket or knapsack etc. need spend more time, consequently, need design an intelligent stick, better for old person's service.

Disclosure of Invention

The invention aims to provide an intelligent NFC walking stick and a barrier detection method thereof, and solves the technical problem that the old people easily forget to take gate inhibition cards, bus cards and the like when going out.

The utility model provides an intelligence NFC stick, includes flexible subassembly and grabs the handle, grab the handle setting at the top of flexible subassembly, it is provided with touch switch, LED pilot lamp, NFC module, orientation module, the wireless receiving module that charges, battery module and controller module to grab on the handle, NFC module, orientation module, the wireless receiving module that charges, battery module and controller module all set up in the inside of grabbing the handle, touch switch sets up the head top of grabbing the handle, the embedded front end of grabbing the handle that sets up of LED pilot lamp, the wireless receiving module that charges is connected with battery module, battery module is connected the power supply through touch switch and controller module, LED pilot lamp, NFC module and orientation module all are connected with controller module.

Further, flexible subassembly comprises a plurality of nested pipes of embedding each other, and the top outside of nested pipe is provided with the external screw thread, and the bottom inboard of nested pipe is provided with the internal thread, the external screw thread of nested pipe and the internal thread threaded connection of the nested pipe of front end.

Further, the positioning module comprises an ATK1218-BD position acquisition submodule and a GPRS a6 submodule, the ATK1218-BD position acquisition submodule and the GPRS a6 submodule are both connected with the controller module, and the GPRS a6 submodule is wirelessly connected with a remote user terminal.

Above-mentioned scheme still includes camera and speaker, camera and speaker all set up in grabbing handle front end bottom, and camera and speaker all are connected with the controller module.

The NFC module uses the master control chip model to be the TRF7970A chip, and the NFC module is connected with the serial port 1 of controller module.

An obstacle detection method for an intelligent NFC hand wand, the method comprising the steps of:

step 1: shooting a road surface picture with an obstacle by using a camera, and taking the shot picture as a sample library of an obstacle image;

step 2: respectively enhancing each sample library image, expanding the number of the sample library images, wherein the data enhancement method comprises the steps of horizontally turning over the images, vertically turning over the images, adding random noise and randomly rotating the images; then, marking the classes of the objects in the obstacle image by using a marking tool, and storing the marked data information in a PASCAL VOC format according to a specific protocol;

and step 3: constructing a detection model of the image, wherein the model consists of a feature extraction network, a spatial pyramid network and a feature pyramid network constructed by a multi-scale prediction layer and is used for generating an obstacle feature map of an obstacle image and detecting and identifying obstacles on 3 feature map areas with different scales;

and 4, step 4: training a detection model, training the detection model by a random gradient descent method to obtain an obstacle model, inputting an image of the obstacle to be detected into the trained model for testing, realizing obstacle detection, and broadcasting the image of the obstacle to a user by using a loudspeaker (11) after the obstacle is found.

In the step 2, the method for enhancing the data of the obstacle image comprises the steps of horizontally turning over the image, vertically turning over the image, adding random noise and randomly rotating the image, and expanding a data set of an obstacle sample; adopting the Label making tool Label Img as the used labeling tool; the marking information file comprises coordinates of an obstacle marking frame in the image, a category label and a saved picture path, and the coordinates, the category label and the saved picture path are stored in the file in an XML format.

In the step 3, the DensNet feature extraction network composed of 4 dense modules replaces the original feature extraction network, and has the functions of ensuring more effective information flow among the convolution layers, preventing gradient disappearance and enhancing feature reuse, and the expression formula is xl=Hl([x0,x1,x2,...,xl-1]) (ii) a Wherein HlRepresents a composite function consisting of a BN layer, a ReLU layer and a 3 × 3 convolution layer, [ x ]0,x1,x2,...,xl-1]The method comprises the steps of representing and splicing feature maps from different previous layers, forming a transition layer by a convolutional layer of 1 × 1 and an average pooling layer of 2 × 2 between two adjacent dense modules to realize feature map dimension reduction, realizing local feature interaction of the feature maps of three scales in a convolution kernel mode to form a multi-scale prediction layer when the feature map dimensions are 13 × 13, 26 × 26 and 52 × 52 after the dense modules, and inserting a spatial pyramid network into the multi-scale prediction layer to realize a feature pyramid network.

The detection flow of the obstacles in the step 3 is as follows:

resizing the image to 416 × 416, then segmenting the image into S × S meshes, performing a detection process in a mesh unit if the center of the target is located in the mesh unit, each mesh unit respectively predicting B bounding boxes, Confidence scores of the bounding boxes and class information probability C of the object, the Confidence scores being represented by a formula

Figure BDA0002499264010000031

Obtaining; the Confidence score is equal to the intersection ratio between the real bounding box and the predicted bounding box; the coordinates of the predicted bounding box are labeled (x, y, w, h); wherein x and y represent midpoint coordinates of the prediction bounding box, and w and h represent the length and width of the prediction bounding box; if no object exists in the grid cell, the value is 0, otherwise, the value is 1;

using a logistic normalization process to the coordinates (x, y, w, h) of the predicted bounding box obtained in the previous step;

processing the region which meets the Confidence threshold value in the image by adopting a non-maximum value inhibition algorithm;

and acquiring the coordinate range and the category information corresponding to the calibration prediction enclosure frame through the processing result of the non-maximum value inhibition.

The loss function trained in the step 4 is as follows:

Loss=Errorcoord+Erroriou+Errorcls

Figure BDA0002499264010000033

Figure BDA0002499264010000034

wherein Errorcoord、ErroriouAnd ErrorclsRespectively representing the error of the predicted bounding box, the IOU error and the classification error; lambda [ alpha ]coordIs the coordinate error weight; s2B is the number of meshes into which the input image is divided, and B is the number of bounding boxes generated for each mesh; if it is notIf the number of the bounding boxes is equal to 1, the jth bounding box covers the target in the ith grid; otherwiseEqual to 0;

Figure BDA0002499264010000043

to predict the coordinate value of the center of the bounding box and its width and height, (x)i,yi,wi,hi) The coordinate value of the center of the real boundary frame and the width and the height of the real boundary frame; lambda [ alpha ]noobjThe weight of confidence loss when predicting the bounding box; c. CiIs the confidence of the prediction;a confidence that is true; p is a radical ofi(c) Is the true probability within grid i that the object belongs to c,is the probability of prediction.

By adopting the technical scheme, the invention has the following technical effects:

(1) according to the invention, the NFC chip is integrated in the handrail of the walking stick, so that the walking stick can have the functions of a traditional access card and a traffic card on the basis of realizing auxiliary walking. The old people are high in age, inconvenient in self action, slow in response and low in memory, and when the old people lean on a walking stick to pass through a cell door and a cell door or take a bus or a subway, the old people can pass through the cell door and the cell door or finish ticket buying of the subway or the bus by only contacting a corresponding card induction position with a handrail of the walking stick without finding a corresponding access card or a corresponding traffic card, and the GPS Beidou double-positioning chip ATK1218-BD is embedded in the walking stick, so that compared with a traditional single-mode GPS positioning module, the ATK1218-BD has faster response time and starting speed, positioning information is more accurate, and the old people can be prevented from accidentally losing to a greater extent; this stick supports wireless function of charging, and the old man need not to look for the charger that corresponds and will charge the head and insert the mouth that charges, places this stick on the wireless charger of adaptation and can carry out wireless charging, has removed the numerous and diverse step of traditional charging mode from, targets in place in one step, the demand of laminating old man more.

(2) The walking stick also has the characteristic of being telescopic, can be folded and folded when not in use, and overcomes the defect that the traditional walking stick can not be placed when not in use; make things convenient for the trip of old man at to a great extent, overcome shortcomings such as traditional card is easily lost, fragile, difficult searching, humanized ground passes through NFC technique integration with entrance guard's card and transportation card on the stick, makes the old man need not to look over, identifies the card and can pass through district door, cell gate or accomplish the ticket buying of subway, public transit to have simultaneously easily to charge, convenient advantage such as quick location, thereby let the old man possess more comfortable safe life and experience.

(3) The method adopts a deep learning algorithm design, can realize intelligent detection of the front road condition of the old, has high accuracy, low false detection rate and high detection speed, has obvious advantages compared with the traditional detection method, can effectively reduce the tripping and other conditions of the old due to road obstacles, effectively protects the old, and has good application prospect.

Drawings

Fig. 1 is a schematic view of the cane of the present invention.

Fig. 2 is a schematic view of the cane grip of the present invention.

Fig. 3 is a schematic view of the telescopic rod structure of the present invention.

Fig. 4 is a circuit block diagram of the present invention.

Fig. 5 is a circuit schematic of the NFC module of the present invention.

FIG. 6 is a schematic diagram of the ATK1218-BD module of the present invention.

Fig. 7 is a schematic diagram of the GPRS a6 module of the present invention.

Fig. 8 is a schematic structural diagram of a wireless charging receiving module according to the present invention.

Reference numbers in the figures: 1-a touch switch; 2-LED indicator light; 3-an NFC module; 4-a positioning module; 5-a wireless charging receiving module; 6-a battery module; 7-a controller module; 8-a telescopic assembly; 9-a grip handle; 10-a camera; 11-a loudspeaker; 12-external threads; 13-internal screw thread.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings by way of examples of preferred embodiments. It should be noted, however, that the numerous details set forth in the description are merely for the purpose of providing the reader with a thorough understanding of one or more aspects of the present invention, which may be practiced without these specific details.

As shown in fig. 1-2, an intelligent NFC pole according to the invention comprises a telescopic assembly 8 and a grip handle 9, said grip handle 9 being arranged on top of the telescopic assembly 8. The handheld electronic device is characterized in that the handle 9 is provided with a touch switch 1, an LED indicator lamp 2, an NFC module 3, a positioning module 4, a wireless charging receiving module 5, a battery module 6 and a controller module 8. The NFC module 3, the positioning module 4, the wireless charging receiving module (5), the battery module 6 and the controller module 8 are all arranged inside the grab handle 9. Touch switch 1 sets up at the head top of grabbing handle 9, the embedded front end of grabbing handle 9 that sets up of LED pilot lamp 2, wireless receiving module 5 that charges is connected with battery module 6, battery module 6 is connected the power supply through touch switch 1 and controller module 8. The LED indicator lamp 2, the NFC module 3 and the positioning module 4 are all connected with the controller module 8.

The touch switch 1 is a TTP223 touch switch electrically connected to the MCU for turning on and off the entire system. The LED pilot lamp is three full-color LED lamp pearls of RGB (red, green and blue) that imbed the stick top side by side (the concrete embedding mode is shown in figure 1 in detail), and it and MCU control module electrical connection for the operating condition information of suggestion battery electric quantity information and NFC module.

As shown in fig. 3, the telescopic assembly 8 is composed of a plurality of nested pipes embedded into each other, the outer side of the top of each nested pipe is provided with an external thread 12, the inner side of the bottom of each nested pipe is provided with an internal thread 13, and the external thread of each nested pipe is in threaded connection with the internal thread 13 of the nested pipe at the front end. The telescopic component module is a rubber ring with threads and is used for realizing the telescopic function of the walking stick.

As shown in fig. 6-7, the positioning module 4 includes an ATK1218-BD position acquisition sub-module and a GPRS a6 sub-module, both the ATK1218-BD position acquisition sub-module and the GPRS a6 sub-module are connected to the controller module (8), and the GPRS a6 sub-module is wirelessly connected to the remote user terminal. The ATK1218-BD module is used for acquiring positioning information of the Beidou and the GPS; the GPRS A6 module is used for uploading the positioning information acquired by the ATK1218-BD module. The two are electrically connected with the MCU control module, the MCU control module is communicated with the ATK1218-BD module through the serial port 2 to acquire the current coordinate position information in real time, and then the processed information is sent to the GPRS A6 module through the serial port 3, and the module finishes uploading operation.

The wireless charging receiving module 5 is formed by connecting a TP5100 switch buck lithium battery charging management chip with a winding coil, and is specifically shown in fig. 8 of the wireless charging receiving module. The battery module is electrically connected with the MCU control module, the positioning module and the wireless charging receiving module, provides electric energy for the MCU control module and the positioning module, and receives and stores the electric energy transmitted by the wireless charging receiving module. And the MCU module, namely STM32F103C8T6 is used for overall scheduling of ordered operation of all modules in the intelligent walking stick.

As shown in fig. 2, the above scheme further includes a camera 10 and a speaker 11, the camera 10 and the speaker 11 are both arranged at the bottom of the front end of the grip handle 9, and the camera 10 and the speaker 11 are both connected with the controller module 8.

As shown in fig. 4, the NFC module 3 uses a TRF7970A chip, and the NFC module 3 is connected to the serial port 1 of the controller module 8. The NFC module comprises a TRF7970A chip and a peripheral circuit thereof, the TRF 798978 chip is electrically connected with the MCU control module, and the MCU control module controls the TRF7970A chip in a data exchange mode through the serial port 1, so that the normal operation of the NFC module is ensured.

The touch switch is a TTP223 touch switch, the switch is connected with a GPIO port on the MCU, when a user presses the switch for a long time, high and low level change on a pin of the switch is fed back to the MCU through the GPIO port, the MCU judges the duration time of the corresponding high and low level change, when the level change time breaks through a set threshold value (three seconds), the MCU exits from a low power consumption mode and starts to operate the whole system, when the user presses for three seconds again, the MCU finishes all tasks currently operated, enters the low power consumption mode, the system enters a sleep state and waits for awakening by next long press.

The LED indicator light module is three RGB full-color lamp beads embedded into the top of the walking stick. The three lamp beads are connected with the MCU through GPIO ports, when the MCU is in a low power consumption mode, the MCU controls all the lamp beads to be turned off, and when the MCU is in a running state, the leftmost lamp bead is controlled to be blue; when the NFC module is used for reading and copying the card, the NFC module exchanges data with the MCU through the serial port 1, when the MCU receives a prompt instruction that the NFC module is in a card reading and copying state, the lamp bead in the middle is controlled to flicker red light at intervals of 1S, after the NFC finishes the card reading and copying operation, the NFC module sends a finishing prompt instruction to the MCU through the serial port 1, and after receiving the instruction, the MCU controls the lamp bead in the middle to be on for five seconds and then to be off; the MCU checks the battery power every 30S, when the battery power is detected to be higher than fifty percent, the MCU controls the lamp bead on the right side to be bright green light for a long time, when the battery power is detected to be higher than twenty percent and lower than fifty percent, the MCU controls the lamp bead to be bright red light for a long time, and when the battery power is detected to be lower than twenty percent, the MCU controls the lamp bead to flash red light at an interval of 1S.

The NFC module is a TRF7970A chip and peripheral circuits thereof, the TRF7970A is an integrated Analog Front End (AFE) and multi-protocol data framing device for a 13.56MHzNFC/RFID system, and supports all three NFC working modes: the reader/writer mode, the peer-to-peer mode, and the card emulation mode are mainly used in the present invention. When the MCU is in an operating state, a user briefly touches the contact switch module (about 1S), the MCU sends a card reading instruction to the TRF7970A through the serial port 1 after detecting the level change, the TRF7970A modifies a self register after receiving the card reading instruction, and enters a reader/writer mode, and at the moment, a card to be copied is close to the end of the hand rest of the walking stick to finish the recording of card information. After the recording is finished, the TRF7970A sends an instruction indicating that the card reading is successful to the MCU control module through the serial port 1, then the register of the TRF7970A is modified, the card simulation mode is entered, and the card read once is simulated, so that the original card is replaced.

The positioning module consists of two modules, namely an ATK1218-BD module and a GPRS A6 module. The ATK1218-BD module is used for acquiring positioning information of the Beidou and the GPS, transmitting the acquired information to the MCU serial port 2 in a serial port transmission mode, processing the data transmitted back by the serial port 2 into a data packet with a special format by the MCU after acquiring the data, and transmitting the data packet to the GPRS A6 module through the serial port 3; the GPRS A6 module uploads the positioning information processed by the MCU to the cloud server, the positioning information is sent to the mobile phone end by the server, and the mobile phone end displays the coordinate information on map software after analyzing the data packet, so that the positioning of a stick user is completed.

After the wireless charging receiving module is contacted with the wireless charger, a coil arranged in the receiving module generates a certain current due to electromagnetic induction to start charging the battery in the walking stick.

The battery module is a lithium battery with certain capacity.

The STM32F103C8T6MCU control module is responsible for receiving NFC backhaul information and battery power information, and operating a series of other modules as described above.

The rubber ring with the threads can realize that the crutch can be fixed by clockwise twisting when being extended to the longest, and when the crutch is to be folded, the crutch rod is twisted anticlockwise, so that all sections of crutch bodies in occlusion can be loosened, and then the crutch can be folded section by section.

An obstacle detection method for an intelligent NFC hand wand, the method comprising the steps of:

step 1: the camera 10 is used to take a picture of the road surface with the obstacle and the taken picture is used as a sample library of the image of the obstacle. Firstly, manually photographing to establish a sample library, and simultaneously manually marking the specific information of the obstacle of each image in the sample library.

Step 2: respectively enhancing each sample library image, expanding the number of the sample library images, wherein the data enhancement method comprises the steps of horizontally turning over the images, vertically turning over the images, adding random noise and randomly rotating the images; and then labeling the classes of the objects in the obstacle image by using a labeling tool, and storing the labeled data information in a PASCAL VOC format according to a specific protocol. The method for enhancing the data of the obstacle image comprises the steps of horizontally turning over the image, vertically turning over the image, adding random noise and randomly rotating the image, and expanding a data set of an obstacle sample; adopting the Label making tool Label Img as the used labeling tool; the marking information file comprises coordinates of an obstacle marking frame in the image, a category label and a saved picture path, and the coordinates, the category label and the saved picture path are stored in the file in an XML format.

And step 3: the method comprises the steps of constructing a detection model of an image, wherein the model consists of a feature extraction network, a spatial pyramid network and a feature pyramid network constructed by a multi-scale prediction layer, and is used for generating an obstacle feature map of an obstacle image and detecting and identifying obstacles on 3 feature map areas with different scales.

The DensNet feature extraction network composed of 4 dense modules replaces the original feature extraction network, has the functions of ensuring more effective information flow among the convolution layers, preventing gradient disappearance and strengthening feature reuse, and has the expression formula of xl=Hl([x0,x1,x2,...,xl-1]) (ii) a Wherein HlRepresents a composite function consisting of a BN layer, a ReLU layer and a 3 × 3 convolution layer,[x0,x1,x2,...,xl-1]the method comprises the steps of representing and splicing feature maps from different previous layers, forming a transition layer by a convolutional layer of 1 × 1 and an average pooling layer of 2 × 2 between two adjacent dense modules to realize feature map dimension reduction, realizing local feature interaction of the feature maps of three scales in a convolution kernel mode to form a multi-scale prediction layer when the feature map dimensions are 13 × 13, 26 × 26 and 52 × 52 after the dense modules, and inserting a spatial pyramid network into the multi-scale prediction layer to realize a feature pyramid network.

The obstacle detection process is as follows:

resizing the image to 416 × 416, then segmenting the image into S × S meshes, performing a detection process in a mesh unit if the center of the target is located in the mesh unit, each mesh unit respectively predicting B bounding boxes, Confidence scores of the bounding boxes and class information probability C of the object, the Confidence scores being represented by a formulaObtaining; the Confidence score is equal to the intersection ratio between the real bounding box and the predicted bounding box; the coordinates of the predicted bounding box are labeled (x, y, w, h); wherein x and y represent midpoint coordinates of the prediction bounding box, and w and h represent the length and width of the prediction bounding box; if there is no object in the grid cell, it should be 0, otherwise it is 1.

The predicted bounding box coordinates (x, y, w, h) obtained in the previous step are normalized using logistic.

And processing the area satisfying the Confidence threshold value in the image by adopting a non-maximum value inhibition algorithm.

And acquiring the coordinate range and the category information corresponding to the calibration prediction enclosure frame through the processing result of the non-maximum value inhibition.

And 4, step 4: training a detection model, training the detection model by a random gradient descent method to obtain an obstacle model, inputting an image of the obstacle to be detected into the trained model for testing, detecting the obstacle, and broadcasting the image of the obstacle to a user by using a loudspeaker 11 after the obstacle is found.

The loss function of the training is:

Loss=Errorcoord+Erroriou+Errorcls

Figure BDA0002499264010000091

Figure BDA0002499264010000093

wherein Errorcoord、ErroriouAnd ErrorclsRespectively representing the error of the predicted bounding box, the IOU error and the classification error; lambda [ alpha ]coordIs the coordinate error weight; s2B is the number of meshes into which the input image is divided, and B is the number of bounding boxes generated for each mesh; if it is notIf the number of the bounding boxes is equal to 1, the jth bounding box covers the target in the ith grid; otherwiseEqual to 0;to predict the coordinate value of the center of the bounding box and its width and height, (x)i,yi,wi,hi) The coordinate value of the center of the real boundary frame and the width and the height of the real boundary frame; lambda [ alpha ]noobjThe weight of confidence loss when predicting the bounding box; c. CiIs the confidence of the prediction;

Figure BDA0002499264010000097

a confidence that is true; p is a radical ofi(c) Is the true probability within grid i that the object belongs to c,is the probability of prediction.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be construed as the protection scope of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种带有助力功能的拐杖

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!