An intelligent beach safety protection method and system based on machine vision
Through machine vision technology, the risk zones and tourist behaviors are divided on the beach and the recognition of tourists' behaviors is solved, and the risk behavior identification accuracy and insufficient safety protection efficiency caused by traditional manual surveillance are achieved, and more efficient risk behavior monitoring and resource utilization are achieved.
Patent Information
- Application Number
- CN202111533554.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-12-15
AI Technical Summary
Traditional beach safety systems rely on manual surveillance, which leads to low accuracy in identifying risk behaviors and insufficient safety protection efficiency. Manual surveillance can easily lead to visual fatigue and makes it difficult to respond immediately.
Using intelligent beach safety protection methods based on machine vision, collect beach pictures through cameras, divide risk zones and non-risk zones using tidal analysis models, allocate monitoring resources, and use risk behavior identification models to judge tourists' behavior, issue alarm prompts, replacing manual monitoring .
It improves the accuracy of risk behavior identification and safety protection efficiency, ensures the safety of tourists' lives, realizes the rational allocation of resources, and reduces resource waste.
Smart Images

Figure CN114419535B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of beach safety protection, and in particular to an intelligent beach safety protection method and system based on machine vision. Background Art
[0002] Traditional beach safety systems mainly rely on humans to continuously stand guard in front of surveillance cameras and scan the screen to monitor tourists' risky behaviors, such as staying on dangerous reefs, going into the sea without a swimming ring, and floating in deep sea areas. Unlike accidents on land, the golden time for first aid at sea is only a few minutes, so rapid maneuvers become particularly important. However, long-term manual monitoring can easily cause visual fatigue to staff, making it difficult for them to respond immediately when an accident occurs, which in turn causes the problem of low safety protection efficiency. On the other hand, manual monitoring can easily overlook some tourists with risky behaviors due to the limitations of the human eye, resulting in low accuracy in identifying risky behaviors. Summary of the invention
[0003] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to provide an intelligent beach safety protection method and system based on machine vision, which aims to replace manual monitoring, improve the accuracy of risk behavior identification and safety protection efficiency, and ensure the safety of tourists' lives.
[0004] To achieve the above object, the first aspect of the present invention provides an intelligent beach safety protection method based on machine vision, the method comprising:
[0005] Step S1, controlling the camera to collect pictures of the beach at preset time intervals to obtain beach pictures;
[0006] Step S2, inputting the obtained beach picture into a tidal analysis model to obtain the tidal conditions of the beach; wherein the tidal analysis model judges the tidal conditions of the beach based on the received current beach picture and a preset number of past beach pictures before the current beach picture, wherein the tidal conditions include high tide, low tide and the position where the tide reaches the beach;
[0007] Step S3, dividing the beach into a risk area and a non-risk area according to the tidal conditions of the beach and the current beach picture;
[0008] Step S4, allocating the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio; wherein the monitoring resources obtained by the risk area are greater than the monitoring resources obtained by the non-risk area;
[0009] Step S5: After monitoring resource allocation, tourist identification is performed on the beach pictures collected by the camera to obtain tourist behavior;
[0010] Step S6: input the tourist behavior into a risk behavior identification model to determine whether the tourist behavior is a risk behavior; in response to the tourist behavior being a risk behavior, an alarm is issued; in response to the tourist behavior not being a risk behavior, normal operation is performed.
[0011] Optionally, the training step of the tidal analysis model includes:
[0012] Inputting a first training beach image and a position where the sea tide corresponding to the first training beach image reaches the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach image and the position where the sea tide corresponding to the first training beach image reaches the beach;
[0013] Inputting a second training beach picture into the tidal analysis model, so that the tidal analysis model obtains a training position where the sea tide corresponding to the second training beach picture reaches the beach according to the first relationship;
[0014] Determining whether the training position of the tide reaching the beach corresponding to the second training beach picture is accurate;
[0015] In response to the accuracy of the tidal analysis model reaching a preset value, the training of the tidal analysis model is completed.
[0016] Optionally, step S2 includes:
[0017] Inputting the current beach picture and a preset number of past beach pictures before the current beach picture into the tidal analysis model, and obtaining the positions where the tides corresponding to the current beach picture and the past beach pictures reach the beach;
[0018] According to the positions where the tides corresponding to the current beach picture and the past beach pictures reach the beach, it is determined whether the beach is at high tide or low tide.
[0019] Optionally, step S3 includes:
[0020] In response to the tidal condition being low tide, the deep sea area in the current beach image is divided into a risk area, and other areas are divided into non-risk areas;
[0021] Or in response to the tidal condition being high tide, the reef area in the current beach image is divided into a risk area, and other areas are divided into non-risk areas.
[0022] Optionally, step S4 includes:
[0023] The risk area is defined as a sensitive area, and the non-risk area is defined as a non-sensitive area;
[0024] The bit rate resources and pixel resources of the camera are allocated to the sensitive area more than the non-sensitive area.
[0025] Optionally, the performing tourist identification on the beach picture captured by the camera to obtain tourist behavior includes:
[0026] Performing character outline recognition on the beach picture captured by the camera to obtain a tourist outline;
[0027] Focusing image recognition resources on the tourist outline to obtain the positions of human joint points of the tourist outline;
[0028] The tourist behavior is obtained according to the positions of the human body joints and the lines connecting the human body joints.
[0029] Optionally, inputting the tourist behavior into a risk behavior identification model to determine whether the tourist behavior is a risk behavior includes:
[0030] The tourist behavior is input into a risk behavior identification model to determine whether the tourist behavior is a risky behavior; wherein the risk behavior identification model performs a single behavior judgment to determine whether the current tourist behavior is a risky behavior, and the current tourist behavior is the tourist behavior most recently received by the risk behavior identification model.
[0031] Optionally, inputting the tourist behavior into a risk behavior identification model to determine whether the tourist behavior is a risk behavior includes:
[0032] The tourist behavior is input into a risk behavior identification model to determine whether the tourist behavior is a risky behavior; wherein the risk behavior identification model performs a series of behavior judgments, and the risk behavior identification model determines whether a series of tourist behaviors consisting of a current tourist behavior and a preset number of past tourist behaviors before the current tourist behavior are risky behaviors, and the current tourist behavior is the tourist behavior most recently received by the risk behavior identification model.
[0033] The second aspect of the present invention discloses an intelligent beach safety protection system based on machine vision, the system comprising: a camera, a tide analysis model, a risk behavior identification model and an MCU controller;
[0034] The camera is used to collect beach pictures;
[0035] The tidal analysis model is used to judge the tidal conditions;
[0036] The risk behavior identification model is used to determine whether the tourist behavior is a risky behavior;
[0037] The MCU controller includes: a picture acquisition unit, a tidal analysis unit, a risk division unit, a monitoring resource allocation unit, a behavior recognition unit, a risk behavior judgment unit, and an alarm unit;
[0038] The picture acquisition unit is used to control the camera to acquire pictures of the beach at preset time intervals to obtain beach pictures;
[0039] The tidal analysis unit is used to input the obtained beach picture into a tidal analysis model to obtain the tidal conditions of the beach; wherein the tidal analysis model determines the tidal conditions of the beach based on the received current beach picture and a preset number of past beach pictures before the current beach picture, and the tidal conditions include high tide, low tide and the position where the tide reaches the beach;
[0040] The risk division unit is used to divide the beach into a risk area and a non-risk area according to the tidal conditions of the beach and the current beach picture;
[0041] The monitoring resource allocation unit is used to allocate the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio; wherein the monitoring resources obtained by the risk area are greater than the monitoring resources obtained by the non-risk area;
[0042] The behavior recognition unit is used to identify tourists on the beach pictures collected by the camera to obtain tourist behaviors after monitoring resource allocation;
[0043] The risk behavior judgment unit is used to input the tourist behavior into a risk behavior recognition model to judge whether the tourist behavior is a risk behavior;
[0044] The alarm unit is used to issue an alarm in response to the tourist behavior belonging to the risky behavior; and to work normally in response to the tourist behavior not belonging to the risky behavior.
[0045] Optionally, the tidal analysis model includes a training module, and the training module includes: a first training unit, a second training unit, a training accurate judgment unit, and a training completion unit;
[0046] The first training unit is used to input a first training beach picture and a position where the sea tide corresponding to the first training beach picture reaches the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach picture and the position where the sea tide corresponding to the first training beach picture reaches the beach;
[0047] The second training unit is used to input a second training beach picture into the tidal analysis model, so that the tidal analysis model obtains a training position where the tide reaches the beach corresponding to the second training beach picture according to the first relationship;
[0048] The training accuracy judgment unit is used to judge whether the training position of the tide reaching the beach corresponding to the second training beach picture is accurate;
[0049] The training completion unit is used to complete the training of the tidal analysis model in response to the accuracy of the tidal analysis model reaching a preset value.
[0050] Optionally, the tide analysis unit specifically includes: a picture input subunit and a tide judgment subunit;
[0051] The picture input subunit is used to input the current beach picture and a preset number of past beach pictures before the current beach picture into the tidal analysis model to obtain the position where the tide reaches the beach corresponding to the current beach picture and the past beach pictures;
[0052] The tide judgment subunit is used to judge whether the beach is at high tide or low tide according to the position where the tide corresponding to the current beach picture and the past beach picture reaches the beach.
[0053] Optionally, the risk division unit specifically includes: a low tide division subunit and a high tide division subunit;
[0054] The low tide division subunit is used for dividing the deep sea area in the current beach picture into a risk area and other areas into non-risk areas in response to the tidal condition being low tide;
[0055] The high tide division subunit is used for dividing the reef area in the current beach picture into a risk area and other areas into non-risk areas in response to the tidal condition being a high tide.
[0056] Optionally, the monitoring resource allocation unit specifically includes: a sensitive area definition subunit and a resource allocation subunit;
[0057] The sensitive area definition subunit is used to define the risk area as a sensitive area and the non-risk area as a non-sensitive area;
[0058] The resource allocation subunit is used to allocate the bit rate resources and pixel resources of the camera to the sensitive area more than the non-sensitive area.
[0059] Optionally, the behavior recognition unit specifically includes: a contour recognition subunit, a joint point acquisition subunit and a tourist behavior acquisition subunit;
[0060] The contour recognition subunit is used to perform character contour recognition on the beach picture captured by the camera to obtain the tourist contour;
[0061] The human joint point acquisition subunit is used to focus image recognition resources on the tourist outline to obtain the human joint point positions of the tourist outline;
[0062] The tourist behavior acquisition subunit is used to obtain the tourist behavior according to the positions of the human body joints and the lines connecting the human body joints.
[0063] Optionally, the risk behavior identification model is specifically used for:
[0064] Perform a single behavior judgment to determine whether the current tourist behavior is a risky behavior, wherein the current tourist behavior is the tourist behavior most recently received by the risky behavior identification model.
[0065] Optionally, the risk behavior identification model is specifically used for:
[0066] A series of behaviors is judged, wherein the risk behavior identification model determines whether a series of tourist behaviors consisting of a current tourist behavior and a preset number of past tourist behaviors before the current tourist behavior are risk behaviors, wherein the current tourist behavior is the tourist behavior most recently received by the risk behavior identification model.
[0067] The beneficial effects of the present invention are as follows: 1. The present invention controls the camera to collect pictures of the beach at a preset time interval to obtain beach pictures; the obtained beach pictures are input into the tidal analysis model to obtain the tidal conditions of the beach; the beach is divided into risk areas and non-risk areas according to the tidal conditions of the beach and the current beach pictures; the monitoring resources of the camera are allocated to the risk areas and non-risk areas according to a preset ratio; after the monitoring resources are allocated, the beach pictures collected by the camera are identified by tourists to obtain tourist behavior; the tourist behavior is input into the risk behavior identification model to determine whether the tourist behavior belongs to risk behavior; in response to the tourist behavior belonging to risk behavior, an alarm is issued. First, the present invention divides the beach into risk areas and non-risk areas through the tidal analysis model, and the monitoring resources of the camera are allocated to the risk areas, so that the risk areas with frequent risks can obtain more monitoring resources, thereby improving the accuracy of risk behavior identification; secondly, the present invention realizes the monitoring of tourist behavior through the risk behavior identification model, replaces manual monitoring, and improves the efficiency of safety protection; finally, the present invention allocates monitoring resources so that the areas that need more attention obtain more monitoring resources, and the areas with low attention levels are allocated less monitoring resources, thereby realizing the reasonable allocation of resources and reducing the waste of resources. 2. The present invention also trains the tidal analysis training model, including: inputting the first training beach picture and the position where the tide corresponding to the first training beach picture arrives at the beach into the tidal analysis model, so that the tidal analysis model obtains the first relationship between the first training beach picture and the position where the tide corresponding to the first training beach picture arrives at the beach; inputting the second training beach picture into the tidal analysis model, so that the tidal analysis model obtains the training position where the tide corresponding to the second training beach picture arrives at the beach according to the first relationship; judging whether the training position where the tide corresponding to the second training beach picture arrives at the beach is accurate; in response to the accuracy of the tidal analysis model reaching a preset value, completing the training of the tidal analysis model. The present invention trains the tidal analysis model inputting the training beach picture and the position where the tide corresponding to the training beach picture arrives at the beach, thereby ensuring the accuracy of the tidal situation judgment, thereby ensuring the credibility of the risk zone, enabling the risk zone to obtain more monitoring resources, and improving the accuracy of risk behavior identification. 3. The present invention performs character contour recognition on the beach picture collected by the camera to obtain the tourist contour; concentrates the image recognition resources on the tourist contour to obtain the human joint point position of the tourist contour; obtains the tourist behavior according to the human joint point position and the connection line of the joint point. The present invention can effectively determine the behavior of tourists through the joints of the human body and their connections, thereby improving the accuracy of risk behavior identification. 4. The present invention can judge risky behaviors by single tourist behaviors and multiple continuous tourist behaviors, thus avoiding misjudgment. In summary, the present invention uses machine vision technology instead of manual monitoring to effectively improve the accuracy of risk behavior identification and safety protection efficiency, thereby ensuring the safety of tourists' lives. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a flowchart of an intelligent beach safety protection method based on machine vision provided by a specific embodiment of the present invention;
[0069] Figure 2 The present invention is a schematic diagram of the structure of an MCU controller of an intelligent beach safety protection system based on machine vision provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0070] The present invention discloses an intelligent beach safety protection method and system based on machine vision. Those skilled in the art can refer to the content of this article and appropriately improve the technical details. It should be particularly pointed out that all similar substitutions and modifications are obvious to those skilled in the art, and they are all considered to be included in the present invention. The method and application of the present invention have been described through preferred embodiments, and relevant personnel can obviously modify or appropriately change and combine the methods and applications described herein without departing from the content, spirit and scope of the present invention to implement and apply the technology of the present invention.
[0071] The applicant has found through research that the existing beach safety system generally implements the same intensity of monitoring for the entire beach, and is unable to implement different intensity monitoring according to the different risks in different areas. If high-level monitoring with high clarity and high bit rate is implemented for the entire beach, it will lead to excessive monitoring resources in areas where there are few risks, resulting in a waste of resources. If low-level monitoring with low clarity and low bit rate is implemented for the entire beach, the success rate of risk identification will be greatly reduced. The existing technology cannot balance the two well.
[0072] Therefore, the embodiment of the present invention provides an intelligent beach safety protection method based on machine vision, such as Figure 1 As shown, the method includes:
[0073] Step S1, controlling the camera to collect pictures of the beach at preset time intervals to obtain beach pictures.
[0074] There are one or more cameras, and the shooting range of the cameras covers the entire beach to avoid blind spots.
[0075] In a specific embodiment, multiple cameras capture images of the beach from different angles to prevent reefs and other shelters from blocking tourists.
[0076] Step S2: input the obtained beach picture into a tidal analysis model to obtain the tidal conditions of the beach.
[0077] Among them, the tidal analysis model judges the tidal conditions of the beach based on the current beach picture received and a preset number of past beach pictures before the current beach picture. The tidal conditions include high tide, low tide and the location where the tide reaches the beach.
[0078] Optional, training steps for the tidal analysis model include:
[0079] Inputting the first training beach image and the position where the sea tide corresponding to the first training beach image arrives at the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach image and the position where the sea tide corresponding to the first training beach image arrives at the beach;
[0080] Inputting the second training beach picture into the tidal analysis model, so that the tidal analysis model obtains the training position where the sea tide corresponding to the second training beach picture reaches the beach according to the first relationship;
[0081] Determine whether the training position of the tide arriving at the beach corresponding to the second training beach picture is accurate; wherein, whether it is accurate is compared with the actual position of the tide arriving at the beach corresponding to the second training beach picture, and if it is within the error range, it is considered accurate.
[0082] In response to the accuracy of the tidal analysis model reaching a preset value, the training of the tidal analysis model is completed. The accuracy is the accuracy of the second sequence of beach pictures.
[0083] In a specific embodiment, when the first training beach image and the position where the tide corresponding to the first training beach image reaches the beach are input into the tidal analysis model, the specific working steps of the tidal analysis model are:
[0084] The heights of the tidal crests in the first training beach image are extracted to obtain the relationship between the tidal crest heights and the position where the tidal wave corresponding to the first training beach image reaches the beach.
[0085] It should be noted that the height of the wave crest represents the driving force of the tide. The higher the wave crest, the greater the driving force of the tide and the farther it reaches the beach, that is, the greater the distance it travels on the beach.
[0086] Optionally, step S2 includes:
[0087] Inputting a current beach image and a preset number of past beach images before the current beach image into a tidal analysis model, obtaining the position where the tide reaches the beach corresponding to the current beach image and the past beach images;
[0088] According to the position where the tide reaches the beach corresponding to the current beach picture and the past beach pictures, it is judged whether the beach is at high tide or low tide.
[0089] In a specific embodiment, the tide analysis model obtains the position of the tide reaching the beach corresponding to two or more beach pictures with a time sequence relationship. If the position of the tide reaching the beach corresponding to the beach picture earlier in time is farther than the position of the tide reaching the beach corresponding to the beach picture later in time, that is, the travel distance on the beach is longer, then it is judged that the current beach is at low tide. If the position of the tide reaching the beach corresponding to the beach picture earlier in time is closer than the position of the tide reaching the beach corresponding to the beach picture later in time, that is, the travel distance on the beach is longer, then it is judged that the current beach is at high tide.
[0090] Step S3: Divide the beach into risk areas and non-risk areas according to the tidal conditions of the beach and the current beach picture.
[0091] Optionally, step S3 includes:
[0092] In response to the tidal condition being low tide, the deep sea area in the current beach image is classified as a risk area, and other areas are classified as non-risk areas;
[0093] Or in response to the tidal condition being high tide, the reef area in the current beach image is classified as a risk area, and other areas are classified as non-risk areas.
[0094] It should be noted that at low tide, tourists are easily pushed away from the shore by the sea water and into the deep sea area. Therefore, the deep sea area is an area where accidents frequently occur at low tide and is classified as a risk area. At high tide, due to the rising sea water, it is easy for tourists to be trapped on the reefs and submerged. Therefore, the reef area is an area where accidents frequently occur at high tide and is classified as a risk area.
[0095] Step S4: Allocate the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio;
[0096] Among them, the monitoring resources obtained in risk areas are greater than those obtained in non-risk areas.
[0097] It should be noted that in risk areas, the probability of tourists getting into accidents is higher, so more monitoring resources are needed to ensure that the image of the area is clear and complete, so that risk behavior identification is accurate. In non-risk areas, the probability of tourists getting into accidents is low, and the environment is relatively safe, so too many monitoring resources are not needed to avoid waste of resources, but it does not mean that there is no monitoring at all, but it is to reduce the investment in monitoring resources while ensuring that the accuracy of risk behavior identification meets the requirements. Among them, monitoring resources can include pixel resources and bit rate resources. Pixel resources ensure the clarity during shooting, and bit rate resources perform high-quality lossless encoding to ensure the clarity of the image after transmission.
[0098] In a specific embodiment, step S4 includes:
[0099] Define risk areas as sensitive areas and non-risk areas as non-sensitive areas;
[0100] The bit rate resources and pixel resources of the camera are allocated to the sensitive area more than the non-sensitive area.
[0101] In this embodiment, ROI (region of interest) technology is used to delineate the risk area as a sensitive area to obtain more monitoring resources, which can reduce the recognition time of risky behaviors and increase accuracy.
[0102] Step S5: After monitoring resource allocation, tourists are identified on the beach pictures captured by the camera to obtain tourist behaviors.
[0103] Optionally, perform visitor identification on the beach images captured by the camera to obtain visitor behavior, including:
[0104] Perform human outline recognition on the beach pictures captured by the camera to obtain the outline of tourists;
[0105] Focus image recognition resources on the tourist outline to obtain the human joint points of the tourist outline;
[0106] According to the positions of human joints and the lines connecting them, the tourist behavior is obtained.
[0107] It should be noted that the embodiment of the present invention obtains the tourist behavior through the posture presented by the connection of the human body joints. In the actual process, because the sea water or other objects often block each human body joint, the embodiment of the present invention can obtain the tourist behavior through the connection of some human body joints, and the present invention identifies the human body joints from top to bottom to avoid the recognition error caused by the lower human body being blocked by the sea water.
[0108] Step S6: input the tourist behavior into the risk behavior identification model to determine whether the tourist behavior is a risk behavior; in response to the tourist behavior being a risk behavior, an alarm is issued; in response to the tourist behavior not being a risk behavior, normal operation is performed.
[0109] Optionally, the tourist behavior is input into a risk behavior identification model to determine whether the tourist behavior is a risky behavior, including:
[0110] The tourist behavior is input into the risk behavior identification model to determine whether the tourist behavior is a risky behavior; wherein the risk behavior identification model performs a single behavior judgment to determine whether the current tourist behavior is a risky behavior, and the current tourist behavior is the latest tourist behavior received by the risk behavior identification model.
[0111] It should be noted that only one corresponding beach picture is needed to judge a single behavior, and it is relatively fast to judge risky behaviors.
[0112] Optionally, the tourist behavior is input into a risk behavior identification model to determine whether the tourist behavior is a risky behavior, including:
[0113] The tourist behavior is input into the risk behavior identification model to determine whether the tourist behavior is a risky behavior; wherein the risk behavior identification model performs a series of behavior judgments, and the risk behavior identification model determines whether the current tourist behavior and a series of tourist behaviors consisting of a preset number of past tourist behaviors before the current tourist behavior are risky behaviors, and the current tourist behavior is the latest tourist behavior received by the risk behavior identification model.
[0114] It should be noted that serial behavior judgment requires multiple consecutive beach pictures, which can be mutually verified and corrected through multiple tourists' behaviors, thereby achieving a high accuracy rate in risk behavior identification.
[0115] In a specific embodiment, the risk behavior identification model uses both single behavior judgment and series behavior judgment to make judgments, thereby ensuring the efficiency and accuracy of risk behavior identification.
[0116] Optionally, the training steps of the risk behavior identification model include:
[0117] Inputting the training tourist behavior and the result of whether the training tourist behavior belongs to risky behavior into the risky behavior identification model, thereby training the risky behavior identification model;
[0118] After the training reaches the preset amount, the risk behavior identification model is tested and the tourist behavior is input for judgment;
[0119] When the recognition accuracy of the risk behavior identification model reaches the requirement, it can be put into practical application; when the recognition accuracy of the risk behavior identification model reaches the requirement, further training is required.
[0120] Through this training method, the accuracy of risk behavior identification can be ensured.
[0121] Based on the above-disclosed intelligent beach safety protection method based on machine vision, an embodiment of the present invention further discloses an intelligent beach safety protection system based on machine vision, the system comprising: a camera, a tidal analysis model, a risk behavior identification model and an MCU controller;
[0122] A camera to capture beach pictures;
[0123] Tidal analysis model, used to judge tidal conditions;
[0124] Risk behavior identification model, used to determine whether tourists’ behavior is risky behavior;
[0125] MCU controller such as Figure 2The diagram includes: a picture acquisition unit 201, a tide analysis unit 202, a risk classification unit 203, a monitoring resource allocation unit 204, a behavior recognition unit 205, a risk behavior judgment unit 206, and an alarm unit 207;
[0126] The picture acquisition unit 201 is used to control the camera to acquire pictures of the beach at preset time intervals to obtain beach pictures;
[0127] The tide analysis unit 202 is used to input the obtained beach picture into the tide analysis model to obtain the tide condition of the beach; wherein the tide analysis model determines the tide condition of the beach based on the received current beach picture and a preset number of past beach pictures before the current beach picture, and the tide condition includes high tide, low tide and the position where the tide reaches the beach;
[0128] The risk division unit 203 is used to divide the beach into a risk area and a non-risk area according to the tidal conditions of the beach and the current beach picture;
[0129] A monitoring resource allocation unit 204 is used to allocate the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio; wherein the monitoring resources obtained by the risk area are greater than the monitoring resources obtained by the non-risk area;
[0130] The behavior recognition unit 205 is used to identify tourists from the beach pictures collected by the camera and obtain the tourists' behavior after the monitoring resources are allocated;
[0131] The risk behavior judgment unit 206 is used to input the tourist behavior into the risk behavior recognition model to judge whether the tourist behavior is a risk behavior;
[0132] The alarm unit 207 is used to issue an alarm in response to the tourist behavior being a risky behavior; and to operate normally in response to the tourist behavior not being a risky behavior.
[0133] Optionally, the tidal analysis model includes a training module, the training module includes: a first training unit, a second training unit, a training accurate judgment unit, and a training completion unit;
[0134] A first training unit is used to input a first training beach image and a position where the sea tide corresponding to the first training beach image reaches the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach image and the position where the sea tide corresponding to the first training beach image reaches the beach;
[0135] A second training unit is used to input a second training beach picture into the tidal analysis model, so that the tidal analysis model obtains a training position where the sea tide reaches the beach corresponding to the second training beach picture according to the first relationship;
[0136] A training accuracy judgment unit, used to judge whether the training position of the sea tide reaching the beach corresponding to the second training beach picture is accurate;
[0137] The training completion unit is used to complete the training of the tidal analysis model in response to the accuracy of the tidal analysis model reaching a preset value.
[0138] Optionally, the tide analysis unit 202 specifically includes: a picture input subunit and a tide judgment subunit;
[0139] The picture input subunit is used to input the current beach picture and a preset number of past beach pictures before the current beach picture into the tidal analysis model to obtain the position where the tide reaches the beach corresponding to the current beach picture and the past beach pictures;
[0140] The tide judgment subunit is used to judge whether the beach is in high tide or low tide according to the position where the tide reaches the beach corresponding to the current beach picture and the past beach pictures.
[0141] Optionally, the risk division unit 203 specifically includes: a low tide division subunit and a high tide division subunit;
[0142] The low tide division subunit is used to divide the deep sea area in the current beach image into a risk area and other areas into non-risk areas in response to the tidal condition being low tide;
[0143] The high tide division subunit is used to divide the reef area in the current beach picture into a risk area and other areas into non-risk areas in response to the tidal condition being high tide.
[0144] Optionally, the monitoring resource allocation unit 204 specifically includes: a sensitive area definition subunit and a resource allocation subunit;
[0145] A sensitive area definition subunit is used to define a risk area as a sensitive area and a non-risk area as a non-sensitive area;
[0146] The resource allocation subunit is used to allocate the bit rate resources and pixel resources of the camera to the sensitive area more than the non-sensitive area.
[0147] Optionally, the behavior recognition unit 205 specifically includes: a contour recognition subunit, a joint point acquisition subunit and a tourist behavior acquisition subunit;
[0148] The contour recognition subunit is used to perform character contour recognition on the beach pictures collected by the camera to obtain the tourist contour;
[0149] The human joint point acquisition subunit is used to focus the image recognition resources on the tourist outline to obtain the human joint point positions of the tourist outline;
[0150] The tourist behavior acquisition subunit is used to obtain the tourist behavior according to the positions of the human body joints and the lines connecting the human body joints.
[0151] Optionally, the risk behavior identification model is specifically used for:
[0152] Perform a single behavior judgment to determine whether the current tourist behavior is a risky behavior. The current tourist behavior is the latest tourist behavior received by the risk behavior identification model.
[0153] Optionally, the risk behavior identification model is specifically used for:
[0154] A series of behaviors are judged. The risk behavior identification model determines whether the current tourist behavior and a series of tourist behaviors consisting of a preset number of past tourist behaviors before the current tourist behavior are risky behaviors. The current tourist behavior is the latest tourist behavior received by the risk behavior identification model.
[0155] The embodiment of the present invention controls the camera to collect pictures of the beach at a preset time interval to obtain beach pictures; inputs the obtained beach pictures into a tidal analysis model to obtain the tidal conditions of the beach; divides the beach into risk areas and non-risk areas according to the tidal conditions of the beach and the current beach pictures; allocates the monitoring resources of the camera to the risk areas and non-risk areas according to a preset ratio; after the monitoring resources are allocated, the beach pictures collected by the camera are identified by tourists to obtain tourist behaviors; the tourist behaviors are input into a risk behavior recognition model to determine whether the tourist behaviors belong to risk behaviors; in response to the tourist behaviors belonging to risk behaviors, an alarm is issued. Firstly, the embodiment of the present invention divides the beach into risk areas and non-risk areas through a tidal analysis model, and focuses on allocating the monitoring resources of the camera to the risk areas, so that the risk areas with frequent risks can obtain more monitoring resources, thereby improving the accuracy of risk behavior recognition; secondly, the embodiment of the present invention realizes the monitoring of tourist behaviors through a risk behavior recognition model, replaces manual monitoring, and improves the efficiency of safety protection; finally, the embodiment of the present invention allocates monitoring resources so that areas that need more attention obtain more monitoring resources, and areas with low attention levels are allocated less monitoring resources, thereby realizing the reasonable allocation of resources and reducing the waste of resources. The embodiment of the present invention also trains the tidal analysis training model, including: inputting the first training beach picture and the position where the tide corresponding to the first training beach picture arrives at the beach into the tidal analysis model, so that the tidal analysis model obtains the first relationship between the first training beach picture and the position where the tide corresponding to the first training beach picture arrives at the beach; inputting the second training beach picture into the tidal analysis model, so that the tidal analysis model obtains the training position where the tide corresponding to the second training beach picture arrives at the beach according to the first relationship; judging whether the training position where the tide corresponding to the second training beach picture arrives at the beach is accurate; in response to the accuracy of the tidal analysis model reaching a preset value, completing the training of the tidal analysis model. The embodiment of the present invention trains the tidal analysis model inputting the training beach picture and the position where the tide corresponding to the training beach picture arrives at the beach, thereby ensuring the accuracy of the tidal situation judgment, thereby ensuring the credibility of the risk area, enabling the risk area to obtain more monitoring resources, and improving the accuracy of risk behavior identification. The embodiment of the present invention performs character contour recognition on the beach picture collected by the camera to obtain the tourist contour; concentrates the image recognition resources on the tourist contour to obtain the human joint point position of the tourist contour; obtains the tourist behavior according to the human joint point position and the connection line of the joint point. The embodiment of the present invention can effectively determine the behavior of tourists through the joints of the human body and their connections, thereby improving the accuracy of risk behavior identification. The embodiment of the present invention can judge risky behavior by single tourist behavior and multiple continuous tourist behaviors, avoiding misjudgment. In summary, the embodiment of the present invention uses machine vision technology instead of manual monitoring to effectively improve the accuracy of risk behavior identification and safety protection efficiency, thereby ensuring the safety of tourists.
[0156] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0157] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0158] The above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. An intelligent beach safety protection method based on machine vision, characterized in that: The method comprises: Step S1, controlling the camera to collect pictures of the beach at preset time intervals to obtain beach pictures; Step S2, inputting the obtained beach picture into a tidal analysis model to obtain the tidal conditions of the beach; wherein the tidal analysis model judges the tidal conditions of the beach based on the received current beach picture and a preset number of past beach pictures before the current beach picture, wherein the tidal conditions include high tide, low tide and the position where the tide reaches the beach; Step S3, dividing the beach into a risk area and a non-risk area according to the tidal conditions of the beach and the current beach picture; Step S4, allocating the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio; wherein the monitoring resources obtained by the risk area are greater than the monitoring resources obtained by the non-risk area; Step S5: After monitoring resource allocation, tourist identification is performed on the beach pictures collected by the camera to obtain tourist behavior; Step S6, inputting the tourist behavior into a risk behavior identification model to determine whether the tourist behavior is a risk behavior; in response to the tourist behavior being a risk behavior, issuing an alarm; in response to the tourist behavior not being a risk behavior, operating normally; Among them, the inputting of the tourist behavior into the risk behavior identification model to determine whether the tourist behavior is a risky behavior includes: inputting the tourist behavior into the risk behavior identification model to determine whether the tourist behavior is a risky behavior; the risk behavior identification model performs a single behavior judgment or a series of behavior judgments; wherein, when the risk behavior identification model performs a single behavior judgment, it determines whether the current tourist behavior is a risky behavior; when the risk behavior identification model performs a series of behavior judgments, the risk behavior identification model determines whether the current tourist behavior and a series of tourist behaviors consisting of a preset number of past tourist behaviors before the current tourist behavior are risky behaviors; the current tourist behavior is the tourist behavior most recently received by the risk behavior identification model.
2. The intelligent beach safety protection method based on machine vision according to claim 1 is characterized in that: The training steps of the tidal analysis model include: Inputting a first training beach image and a position where the sea tide corresponding to the first training beach image reaches the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach image and the position where the sea tide corresponding to the first training beach image reaches the beach; Inputting a second training beach picture into the tidal analysis model, so that the tidal analysis model obtains a training position where the sea tide corresponding to the second training beach picture reaches the beach according to the first relationship; Determining whether the training position of the tide reaching the beach corresponding to the second training beach picture is accurate; In response to the accuracy of the tidal analysis model reaching a preset value, the training of the tidal analysis model is completed.
3. The intelligent beach safety protection method based on machine vision according to claim 1 is characterized in that: The step S2 comprises: Inputting the current beach picture and a preset number of past beach pictures before the current beach picture into the tidal analysis model, and obtaining the positions where the tides corresponding to the current beach picture and the past beach pictures reach the beach; According to the positions where the tides corresponding to the current beach picture and the past beach pictures reach the beach, it is determined whether the beach is at high tide or low tide.
4. The intelligent beach safety protection method based on machine vision according to claim 1 is characterized in that: The step S3 comprises: In response to the tidal condition being low tide, the deep sea area in the current beach image is divided into a risk area, and other areas are divided into non-risk areas; Or in response to the tidal condition being high tide, the reef area in the current beach image is divided into a risk area, and other areas are divided into non-risk areas.
5. The intelligent beach safety protection method based on machine vision according to claim 1 is characterized in that: The step S4 comprises: The risk area is defined as a sensitive area, and the non-risk area is defined as a non-sensitive area; The bit rate resources and pixel resources of the camera are allocated to the sensitive area more than the non-sensitive area.
6. The intelligent beach safety protection method based on machine vision according to claim 1 is characterized in that: The step of performing tourist identification on the beach image captured by the camera to obtain tourist behavior includes: Performing character outline recognition on the beach picture captured by the camera to obtain a tourist outline; Focusing image recognition resources on the tourist outline to obtain the positions of human joint points of the tourist outline; The tourist behavior is obtained according to the positions of the human body joints and the lines connecting the human body joints.
7. An intelligent beach safety protection system based on machine vision, characterized in that: The system includes: a camera, a tidal analysis model, a risk behavior identification model and an MCU controller; The camera is used to collect beach pictures; The tidal analysis model is used to judge the tidal conditions; The risk behavior identification model is used to determine whether a tourist behavior is a risky behavior; The MCU controller includes: a picture acquisition unit, a tidal analysis unit, a risk division unit, a monitoring resource allocation unit, a behavior recognition unit, a risk behavior judgment unit, and an alarm unit; The picture acquisition unit is used to control the camera to acquire pictures of the beach at preset time intervals to obtain beach pictures; The tidal analysis unit is used to input the obtained beach picture into a tidal analysis model to obtain the tidal conditions of the beach; wherein the tidal analysis model determines the tidal conditions of the beach based on the received current beach picture and a preset number of past beach pictures before the current beach picture, and the tidal conditions include high tide, low tide and the position where the tide reaches the beach; The risk division unit is used to divide the beach into a risk area and a non-risk area according to the tidal conditions of the beach and the current beach picture; The monitoring resource allocation unit is used to allocate the monitoring resources of the camera to the risk area and the non-risk area according to a preset ratio; wherein the monitoring resources obtained by the risk area are greater than the monitoring resources obtained by the non-risk area; The behavior recognition unit is used to identify tourists on the beach pictures collected by the camera to obtain tourist behaviors after monitoring resource allocation; The risk behavior judgment unit is used to input the tourist behavior into a risk behavior recognition model to judge whether the tourist behavior is a risk behavior; The alarm unit is used to issue an alarm in response to the tourist behavior belonging to the risk behavior; and to work normally in response to the tourist behavior not belonging to the risk behavior; Among them, the inputting of the tourist behavior into the risk behavior identification model to determine whether the tourist behavior is a risky behavior includes: inputting the tourist behavior into the risk behavior identification model to determine whether the tourist behavior is a risky behavior; the risk behavior identification model performs a single behavior judgment or a series of behavior judgments; wherein, when the risk behavior identification model performs a single behavior judgment, it determines whether the current tourist behavior is a risky behavior; when the risk behavior identification model performs a series of behavior judgments, the risk behavior identification model determines whether the current tourist behavior and a series of tourist behaviors consisting of a preset number of past tourist behaviors before the current tourist behavior are risky behaviors; the current tourist behavior is the tourist behavior most recently received by the risk behavior identification model.
8. The intelligent beach safety protection system based on machine vision according to claim 7 is characterized in that: The tidal analysis model includes a training module, and the training module includes: a first training unit, a second training unit, a training accurate judgment unit, and a training completion unit; The first training unit is used to input a first training beach picture and a position where the sea tide corresponding to the first training beach picture reaches the beach into the tidal analysis model, so that the tidal analysis model obtains a first relationship between the first training beach picture and the position where the sea tide corresponding to the first training beach picture reaches the beach; The second training unit is used to input a second training beach picture into the tidal analysis model, so that the tidal analysis model obtains a training position where the tide reaches the beach corresponding to the second training beach picture according to the first relationship; The training accuracy judgment unit is used to judge whether the training position of the sea tide reaching the beach corresponding to the second training beach picture is accurate; The training completion unit is used to complete the training of the tidal analysis model in response to the accuracy of the tidal analysis model reaching a preset value.
