Worker specification operation recognition system yolov5

Worker standard operation recognition system Through yolov5+python network model technology, the worker standard operation recognition system monitors the worker's operation in real time. When the worker standard operation recognition system detects that the worker's operation does not comply with the standard, it will automatically send out an alarm to remind relevant personnel to take measures . In YOLOv5, the Mosaic data enhancement method is still used in the training model stage, which is improved on the basis of the CutMix data enhancement method. CutMix only uses two pictures for stitching, while the Mosaic data enhancement method uses 4 pictures, and stitches them according to random scaling, random cropping and random arrangement. This enhancement method can combine several pictures into one, which not only enriches the data set, but also greatly improves the training speed of the network, and reduces the memory requirements of the model.

In the YOLO series of algorithms, for different data sets, it is necessary to set anchor boxes of specific length and width. In the network training phase, the model outputs the corresponding prediction frame based on the initial anchor frame, calculates the gap between it and the GT frame, and performs a reverse update operation to update the parameters of the entire network, so the initial anchor point is set The frame is also a crucial part. In the YOLOv3 and YOLOv4 detection algorithms, when training different data sets, the initial anchor box is obtained by running a separate program. YOLOv5 embeds this function into the code, and calculates the best anchor box adaptively according to the name of the data set during each training. Users can turn off or turn on the function according to their own needs. The specific command is parser. add_argument('–noautoanchor', action='store_ true', help='disable autoanchor check'), if you need to open it, you only need to add the –noautoanch or option when training the code.

YOLOv5 is a single-stage target detection algorithm. Based on YOLOv4, this algorithm has added some new improvement ideas, so that its speed and accuracy have been greatly improved. The main improvement ideas are as follows:

  • Input : In the model training phase, some improvement ideas were proposed, mainly including Mosaic data enhancement, adaptive anchor frame calculation, and adaptive image scaling;
  • Benchmark network : Integrating some new ideas in other detection algorithms, mainly including: Focus structure and CSP structure;
  • Neck network : The target detection network often inserts some layers between the BackBone and the final Head output layer, and the FPN+PAN structure is added to Yolov5;
  • Head output layer : The anchor frame mechanism of the output layer is the same as that of YOLOv4. The main improvement is the loss function GIOU_Loss during training and DIOU_nms for prediction frame screening.

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/131349278