[The 3rd Xuantie Cup RISC-V Application Innovation Competition] LicheePi "Floodway Safety Warning Control System" Part 2: Capture the thief and capture the king
[Copy link]
Wu Sunzi said: Walking on the flood discharge channel is like putting up a sign to sell the first |
There is a strategy in the Thirty-Six Stratagems: "Capture the thief and the king", and the explanation says: destroy their strength and seize their leader.
Last time, I mentioned that the host flashed the LicheePi 4A with the system "LPI4A_20231023_FULL". Why? Because this version comes with pre-installed Python3.11 and AI environment. In detail, it is to prepare pre-compiled yolov5n/yolov5s executable examples.
The project selected by the host is "Floodway Safety Warning Control System". Here is a brief popular science. The host is ignorant and misleading, and is a laughing stock. If there is anything wrong with what I said, please criticize yourself if you are deceived to watch.
This is a photo of the dam. The red frame is the main dam, and the yellow frame is the spillway:
As the saying goes, "water and fire are merciless." In recent years, disasters caused by floods have occurred frequently, among which property losses and personal injuries have occurred frequently due to staying, playing, or even living in the spillway. For example, on August 14, 2022, a sudden flood occurred in Longcaogou, Pengzhou City, Sichuan Province, causing 7 deaths and 8 minor injuries. One of the important reasons was that the spillway was regarded as a "net celebrity check-in place" and was not evacuated in time before the disaster occurred. In order to achieve the "dual carbon" goal, my country has continued to make efforts in the field of renewable energy in recent years, and traditional hydropower has also received more attention. In the process of hydropower production and operation, especially when the flood season comes, it is necessary to promptly discover the stranded personnel on the spillway, otherwise personal injury accidents are very likely to occur. Due to the characteristics of hydropower enterprises, the number of long-term on-site personnel is not large, so it is necessary to adopt automated means to monitor the spillway and reduce safety risks.
This "Spillway Safety Warning Control System" is used to identify whether there are stubborn people on the spillway who don't care about their lives. If they are found, one is to warn and drive them away quickly, and the other is to temporarily prohibit the action of flood discharge to avoid personal injury. Therefore, the core of this system is to have the ability to identify people. In the examples mentioned
in the "Typical Applications" of the official website manual ( https://wiki.sipeed.com/hardware/zh/lichee/th1520/lpi4a/8_application.html ), you can see many examples, among which Yolov5n and Yolov5s both have the ability to detect human bodies. Open the home of the Litchi Pie Sipeed user, you can find the sample code of these two models. It can be seen that the code is not much different, mainly the model is different. In this case, I will not retrain it, just take a look at the effect of the model.
This picture is a photo of a spillway:
I used AIGC to create several test images containing people:
There are 2 more close ones
In the original model, the ID of "person" is 0. After the experiment, each of the "photo frauds" identified 1 person, and the "confidence" was 0.631990, 0.731210, 0.806071, and 0.843233. Obviously, if there are fewer pixels of a person, the credibility of the recognition will be reduced.
In order to test the recognition effect of the distant view, a few more photos were created:
As a result, except for the last photo where two people were barely recognized, the others could not be recognized. It can be seen that multiple cameras need to be installed on the spillway to ensure that the width of a person in the entire picture is not less than 2%.
So the model selection and testing are solved. The next step is to consider how to control it.
This is exactly:
destroy the strong, seize the leader, determine the core function, and integrate without panic.
To know what happens next, please wait for the next chapter.
|