River water level scale identification and early warning yolov7

The river water level scale identification and early warning system uses the python+yolov7 network model technology and the river water level scale identification and early warning algorithm to monitor the river water level scale in real time. When there is an abnormality in the river water level, the river water level scale identification and early warning algorithm will automatically issue an alarm to remind the background management personnel Take timely measures. The YOLO series algorithm is a typical one-stage target detection algorithm. It uses the anchor box to combine the regression problem of classification and target positioning, so as to achieve high efficiency, flexibility and good generalization performance, so it is also very popular in the industry. . The Yolo model uses the method of pre-defining the prediction area to complete the target detection. Specifically, the original image is divided into 7x7=49 grids (grid), and each grid allows to predict 2 bounding boxes (bounding box, containing a certain The rectangular box of the object), a total of 49x2=98 bounding boxes. We understand it as 98 prediction areas, which roughly cover the entire area of ​​the picture, and target detection is performed in these 98 prediction areas. 

The development direction of YOLOv7 is different from the current mainstream real-time object detectors, and the research team hopes that it can support both mobile GPUs and GPU devices from the edge to the cloud. In addition to architecture optimization, the method proposed in this study also focuses on the optimization of the training process, focusing on some optimization modules and optimization methods. This may increase the training cost to improve the accuracy of object detection, but not the inference cost. The researchers refer to the proposed modules and optimization methods as trainable "bag-of-freebies". For model reparameterization, this study analyzes model reparameterization strategies applicable to different network layers using the concept of gradient propagation paths, and proposes a planned reparameterization model. In addition, the researchers found that when using dynamic label assignment techniques, a model with multiple output layers will generate new problems during training: "How to assign dynamic targets to the outputs of different branches?" To solve this problem, the researchers proposed a A new label assignment method called guided label assignment from coarse-to-fine.

In terms of architecture, E-ELAN only changes the architecture of the computing block, while the architecture of the transition layer remains unchanged at all. The strategy of YOLOv7 is to use group convolutions to expand the channels and cardinality of computational blocks. The researchers will apply the same group parameters and channel multipliers to all computation blocks of the computation layer. Then, the feature maps calculated by each calculation block are shuffled into g groups according to the set group parameter g, and then they are connected together. At this point, the number of channels for each set of feature maps will be the same as in the original architecture. Finally, the method adds g sets of feature maps to perform merge cardinality. In addition to maintaining the original ELAN design architecture, E-ELAN can also guide different groups of computing blocks to learn more diverse features. Therefore, for series-based models, we cannot analyze the different expansion factors separately, but must consider them together. The research proposes Figure (c), that is, when extending the cascade-based model, only the depth in the calculation block needs to be expanded, and the remaining transmission layers are expanded correspondingly. This composite extension approach preserves the identity and optimal structure of the model at the time of its initial design.


 

The Adapter interface defines the following methods:

public abstract void registerDataSetObserver (DataSetObserver observer)

Adapter represents a data source. This data source may change, such as adding data, deleting data, and modifying data. When the data changes, it must notify the corresponding AdapterView to make corresponding changes. In order to realize this function, the Adapter uses the observer mode. The Adapter itself is equivalent to the observed object, and the AdapterView is equivalent to the observer. Register the observer for the Adapter by calling the registerDataSetObserver method.

public abstract void unregisterDataSetObserver (DataSetObserver observer)

Unregister the observer by calling the unregisterDataSetObserver method.

public abstract int getCount () returns the number of data in the Adapter.

public abstract Object getItem (int position)

The data in the Adapter is similar to an array, and each item in it corresponds to a piece of data, and each piece of data has an index position, that is, position, and the corresponding data item in the Adapter can be obtained according to the position.

public abstract long getItemId (int position)

Get the id of the specified position data item, usually the position will be used as the id. In Adapter, relatively speaking, position is used more frequently than id.

public abstract boolean hasStableIds ()

hasStableIds indicates whether the id of the original data item will change when the data source changes. If it returns true, it means the Id remains unchanged, and if it returns false, it means it may change. The hasStableIds method of Adapter subclasses (including direct subclasses and indirect subclasses) provided by Android all return false.

public abstract View getView (int position, View convertView, ViewGroup parent)

getView is a very important method in Adapter, which will create corresponding UI items for AdapterView according to the index of the data item.

Guess you like

Origin blog.csdn.net/KO_159/article/details/131280014