The invention discloses an improved YOLOv8-based
hydraulic cylinder structure size identification method and
system, and the method comprises the steps: constructing an improved YOLOv8 target detection model: embedding a direction sensitive
convolution module in front of a spatial
pyramid rapid
pooling module of a
backbone network, introducing an external attention mechanism into a cross-stage partial fusion module, and carrying out the detection of the target detection model; a multi-scale attention aggregation module is integrated in the neck network; performing multi-size cooperative detection on a
hydraulic cylinder drawing by using the trained model, identifying various installation size areas, and generating an identification image; segmenting each size region, extracting a structure-installation size association sub-graph, identifying a size text in the structure-installation size association sub-graph through an optical character identification model, and generating structured association data; checking, matching and associating the associated data based on a predefined installation size mapping function; and fusing the recognition and
verification results, performing multi-level
verification based on the geometric constraint of the
hydraulic cylinder structure and a tolerance accumulation rule, and generating a
natural language output result.