The invention belongs to the field of disaster early warning, and provides a disaster early warning method and
system based on key target detection and
image segmentation, and the method comprises the steps: obtaining the real-time image data of
a site, and carrying out the preprocessing of an image;
processing the preprocessed image through a YOLOv5 target detection
algorithm, detecting a key target in a disaster site, and outputting a category
label and a bounding box of the target; performing pixel-by-pixel segmentation
processing on a bounding box region output by target detection by using a U-Net
image segmentation algorithm to generate an
accurate segmentation mask of the target; and inputting the
image segmentation mask, historical disaster data, meteorological data and
geographic information system data into an LSTM prediction model, carrying out multi-
source data fusion and
time sequence analysis, and outputting
dynamic prediction information and early warning levels of disasters. According to the invention, real-time monitoring and early warning of disasters are realized, the response speed of the
early warning system is obviously improved, more comprehensive disaster early warning information is provided, high precision of disaster prediction is ensured, and the phenomena of
false alarm and missing alarm are reduced.