A laboratory consumable intelligent identification and counting method and system based on a semantic visual model

By using a semantic vision model-based approach, combined with the visual features of laboratory consumables for semantic discrimination and deduplication, the problem of fine-grained differentiation and duplicate detection of consumable targets in laboratory scenarios is solved, achieving high-precision recognition and counting.

CN122435337APending Publication Date: 2026-07-21JIANGSU SUPERVISION & INSPECTION INST FOR PROD QUALITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU SUPERVISION & INSPECTION INST FOR PROD QUALITY
Filing Date
2026-04-29
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies struggle to perform fine-grained semantic differentiation of consumable targets in laboratory settings, and suffer from severe duplication of detection, leading to inaccurate identification and counting, and poor system scalability.

Method used

A semantic vision model-based approach is adopted to construct an intelligent identification and counting system for laboratory consumables through image input and candidate target detection, semantic feature extraction, semantic discrimination and category mapping, and semantic consistency deduplication. The system utilizes geometric, color, and texture features for semantic reasoning and combines spatial location and category consistency for deduplication.

Benefits of technology

It achieves high-precision identification and stable counting of laboratory consumables, reduces semantic confusion of similar-looking targets, and improves identification accuracy, system interpretability, and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122435337A_ABST
    Figure CN122435337A_ABST
Patent Text Reader

Abstract

The application discloses a kind of laboratory consumable intelligent identification and counting method and system based on semantic visual model, it is related to artificial intelligence and intelligent identification cross technical field, for the problem of serious problem of difficult identification and repeated detection in laboratory scene, this method first utilizes general target detection model to obtain candidate target area in image, then based on detection area extraction geometric feature, color feature and texture feature, construct semantic discrimination model, realize the mapping of detection result to laboratory consumable semantic category;Again based on the multiple constraint deduplication method of semantic consistency, by fusing spatial position relationship and scale relationship, repeated detection result is screened and merged, finally realizes the high-precision identification and stable counting of consumable target under complex laboratory scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for intelligent identification and counting of laboratory consumables based on a semantic visual model, belonging to the interdisciplinary field of artificial intelligence and intelligent identification. Background Technology

[0002] With the increasing demand for intelligent laboratory management, vision-based recognition and counting methods are gradually becoming an important part of information technology infrastructure. In chemical laboratories, biological laboratories, and industrial testing scenarios, there is often a need for rapid identification and quantity counting of different types of consumables, such as reagent bottles, amber bottles, and reagent kits. Traditional manual inventory methods are not only inefficient but also easily affected by factors such as changing perspectives, target obstruction, dense placement of consumables, and differences in personnel experience, making it difficult to meet the real-time and accuracy requirements of complex laboratory environments.

[0003] In existing technologies, a common approach is to directly detect and classify laboratory scene images using deep learning-based object detection models. The acquired images are input into the YOLO object detection network, where the backbone network extracts image features, the neck network performs multi-scale feature fusion, and the detection head finally outputs the target location and category results, thus achieving object detection and quantity statistics. To further improve detection performance, some existing technologies also improve the basic detection network, such as by replacing the feature extraction structure in the backbone network, introducing attention modules, adding context modeling units, or improving the detection head structure, to enhance the detection capability for small targets, dense targets, or targets in complex backgrounds.

[0004] However, the aforementioned end-to-end methods based on improved object detection networks still have significant shortcomings in laboratory consumable scenarios. First, laboratory consumable targets have strong domain attributes; different categories of consumables often have highly similar overall outlines. Reagent bottles and brown bottles show little difference in their external structure, making it difficult to achieve fine-grained semantic differentiation in laboratory scenarios by relying solely on the category results output by a general detection network. Second, such methods typically heavily rely on a large number of domain-labeled samples and network retraining processes. If the target category changes or the application scenario shifts, it is often necessary to recreate the dataset and retrain the model, resulting in high deployment costs and poor system scalability.

[0005] Another approach combines image preprocessing with post-detection processing to count targets. Large images are segmented, then input into a detection model to obtain local detection results. Finally, the results are mapped to obtain the final count. This type of method is applicable to industrial counting and some dense target detection scenarios. Its advantage lies in its ability to improve target recall in large images or densely populated areas through image segmentation and post-processing strategies, and to suppress some duplicate detection results through post-processing.

[0006] However, the aforementioned counting methods based on image preprocessing and post-detection processing are also difficult to directly apply to laboratory consumable identification scenarios. Laboratory consumables are diverse and similar in appearance; relying solely on general detection categories is insufficient to address semantic confusion between categories such as reagent bottles, brown bottles, reagent kits, and storage boxes. Furthermore, in densely packed laboratory settings, sliding window detection often results in the same physical target being repeatedly detected in different windows. Traditional non-maximum suppression methods typically rely solely on intersection-union comparisons (IUCN) to filter detection boxes. While this can eliminate some overlapping boxes, it can lead to the retention of multiple detection boxes for the same object. Moreover, existing post-processing strategies mostly filter detection boxes from a geometrical perspective, lacking constraints on the semantic consistency of target categories, thus making it difficult to guarantee the accuracy of the counting results at the semantic level.

[0007] Therefore, how to construct an intelligent identification and counting method for laboratory consumables that can combine visual features of laboratory consumables to achieve semantic discrimination and perform semantic constraint deduplication on duplicate detection results has become a technical problem that urgently needs to be solved in this field. To address the above problem, this invention proposes an intelligent identification and counting method for laboratory consumables based on a semantic visual model. By introducing a semantic reasoning mechanism driven by multi-dimensional visual features and further constructing a global deduplication method based on semantic consistency, it achieves high-precision identification and stable counting of consumable targets in complex laboratory scenarios. Summary of the Invention

[0008] The purpose of this invention is to address the problems of difficulty in fine-grained target differentiation and serious duplicate detection in laboratory consumable counting scenarios. It proposes an intelligent identification and counting method and system for laboratory consumables based on a semantic vision model. This invention combines candidate target detection, semantic feature modeling, semantic category reasoning, and semantic consistency deduplication to achieve high-precision identification and stable counting of laboratory consumable targets.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0010] On the one hand, the present invention provides a method for intelligent identification and counting of laboratory consumables based on a semantic visual model, comprising the following steps:

[0011] Step 1, Image Input and Candidate Object Detection: Acquire laboratory scene images and process the input images using a general object detection model to obtain multiple candidate object regions and their corresponding location and confidence information;

[0012] Step 2, Semantic Feature Extraction: After obtaining the candidate target regions, each target region is cropped and its features are analyzed to construct a semantic feature representation of the target.

[0013] Step 3, Semantic discrimination and category mapping: Semantic reasoning is performed on candidate target regions through preset semantic discrimination rules to obtain the semantic category of laboratory consumables, realizing the semantic mapping of general visual detection results to laboratory-specific target categories;

[0014] Step 4: Global deduplication based on semantic consistency: A unified screening is performed on multiple candidate target regions. By jointly analyzing the spatial positional relationship, scale relationship and semantic category consistency between candidate target regions, duplicate detection results belonging to the same physical target are identified, and duplicate detection results are merged or suppressed, retaining only the unique detection result corresponding to each physical target, thereby avoiding duplicate counting.

[0015] Step 5, Target Counting and Result Output: Based on the deduplicated detection results, count the number of laboratory consumables in different semantic categories, and output the identification results, category labels, and counting results in a visual form.

[0016] As a further preferred embodiment of this solution, in step 1, the image source is a static image collected by a fixed camera, mobile inspection equipment, handheld terminal, or unmanned inspection platform; at the same time, the whole image detection or sliding window segmentation detection method is used to extract candidate regions from the image; when sliding window segmentation is used, the original image is divided into several sub-images with overlapping regions, each sub-image is input into a general target detection model for detection, and the local detection results are mapped back to the original image coordinate system for unified management.

[0017] As a further preferred embodiment of this scheme, in step 2, the geometric features, color features, and texture features of the target region are extracted respectively, and a semantic feature vector of the target is constructed:

[0018]

[0019] in, Representing geometric features, Indicates color characteristics, Represents texture features;

[0020] The geometric features are used to characterize the shape and structure information of the target area, including width, height, area and aspect ratio, to distinguish slender targets, regular block targets and general bottle-shaped targets;

[0021] The color features are used to characterize the color distribution information of the target area, including the proportion of brown pixels, the proportion of dark areas, and the proportion of low-saturation and high-brightness areas, to distinguish brown bottles, transparent reagent bottles, and box-shaped targets.

[0022] The texture features are used to characterize the texture complexity of the target surface, including edge density and grayscale variance, and are used to distinguish between storage box targets with relatively smooth surfaces and reagent kit targets with rich texture variations.

[0023] By constructing a combination of three types of features, a semantic description of laboratory consumables is formed from three levels: the appearance geometry, visual color, and local texture of the target, providing a basis for subsequent semantic discrimination.

[0024] As a further preferred embodiment of this solution, in step 3, a semantic discriminant function is established based on the differences in geometric shape, color distribution, and texture structure of different laboratory consumables:

[0025]

[0026] in, This represents the semantic feature vector of the i-th candidate target region. This indicates the semantic category corresponding to the candidate target region; the semantic categories include reagent bottles, brown bottles, reagent kits, storage boxes, and gas cylinders. Through this semantic discrimination mechanism, the system no longer relies on the original category labels given by the general object detection model, but performs independent semantic reasoning based on the visual features of the target region itself, thereby realizing the semantic reconstruction of the detection results, improving the recognition accuracy in laboratory-specific scenarios, and enhancing the interpretability and scalability of the system.

[0027] As a further preferred embodiment of this solution, the semantic discrimination rules in step 3 specifically include: when the target region has slender structural features and a large overall scale, it is determined to be a gas cylinder; when the proportion of brown pixels and dark areas in the target region is high, it is determined to be a brown bottle; when the target region has a high proportion of low-saturation and high-brightness areas and low texture complexity, it is determined to be a storage box; when the target region is regularly blocky and has high edge density, it is determined to be a reagent kit; for target regions with bottle-shaped structures but not meeting the criteria for brown bottles, they are determined to be reagent bottles.

[0028] As a further preferred embodiment of this scheme, in step 4, the spatial relationship is described by the intersection-union ratio and the center point inclusion relationship between candidate target regions, wherein two candidate target regions and The intersection-union ratio is expressed as:

[0029]

[0030] When the intersection-union ratio (IU) between two candidate target regions is large, or when the center point of one candidate target region falls inside the other candidate target region, they are considered to have a strong spatial overlap. By simultaneously utilizing IU and center point inclusion relationships, duplicate targets caused by sliding window detection, multiple detections, and local offsets can be effectively identified, overcoming the problem of insufficient ability to identify low-overlapping duplicate boxes when relying solely on a single IU criterion.

[0031] As a further preferred embodiment of this scheme, in step 4, the scale relationship is determined by the area ratio between candidate target regions, specifically expressed as follows:

[0032]

[0033] in, and These represent the areas of two candidate target regions. When the area ratio is greater than a preset threshold, the two candidate target regions are considered to be consistent in scale. By introducing scale relationship constraints, a correspondence between the same physical target can be established between multi-scale detection results, avoiding the erroneous identification of dissimilar targets with significantly different sizes as duplicate targets, thereby improving the accuracy and stability of the deduplication process.

[0034] As a further preferred embodiment of this scheme, in step 4, semantic consistency is determined by whether the semantic categories of the candidate target regions are consistent, specifically:

[0035]

[0036] in, and These represent the semantic categories corresponding to the two candidate target regions. Merging or suppression operations are only performed on the two candidate target regions if they meet preset conditions in terms of spatial location and scale relationship, and their semantic categories are consistent. By adding semantic consistency constraints during the deduplication process, erroneous fusion of targets of different categories in cases of local overlap or adjacent distribution can be effectively avoided, thus elevating the traditional geometric-level bounding box deduplication problem to a target selection problem oriented towards semantic consistency.

[0037] As a further preferred embodiment of this scheme, in step 5, the various types of laboratory consumables are classified and statistically analyzed based on the deduplicated target set. The counting result of the m-th type of laboratory consumables is expressed as:

[0038]

[0039] in, For indicator functions, The semantic category of the k-th final target is represented; the final retained detection box, the corresponding semantic category label, and the quantity information of each category are superimposed onto the original laboratory scene image for visualization output. Through this method, not only can the accurate counting of laboratory consumable targets be achieved, but also an intuitive display of recognition results can be provided to users, facilitating subsequent management, verification, and analysis.

[0040] On the other hand, the present invention also provides a laboratory consumables intelligent identification and counting system based on a semantic visual model. This system is used to implement the method described above, and includes:

[0041] The image input and candidate target detection module is used to acquire laboratory scene images and process the input images using a general target detection model to obtain multiple candidate target regions and their corresponding location information and confidence information.

[0042] The semantic feature extraction module is used to crop and analyze the features of each target region to construct the semantic feature representation of the target.

[0043] Semantic discrimination and category mapping are used to perform semantic reasoning on candidate target regions to obtain the semantic category of laboratory consumables, realizing the semantic mapping from general visual detection results to laboratory-specific target categories;

[0044] The global deduplication module is used to identify duplicate detection results belonging to the same physical target, and to merge or suppress duplicate detection results, retaining only the unique detection result corresponding to each physical target;

[0045] The target counting and result output module is used to count the number of laboratory consumables in different semantic categories, and output the identification results, category labels and counting results in a visual form.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] First, this invention employs a decoupled detection and semantic discrimination framework. It uses the output of a general object detection model as the candidate region localization result, and then combines this with the visual features of laboratory consumables for semantic reconstruction, achieving fine-grained differentiation of targets such as reagent bottles, brown reagent bottles, reagent kits, storage boxes, and gas cylinders. Compared to existing methods that rely solely on general object detection category mapping, this invention effectively reduces semantic confusion between similar-looking targets, especially in distinguishing between reagent kits, storage boxes, and bottle-shaped targets. The comparison results show that, on the same set of samples, the official YOLOv8 mapping method only identified 2 reagent kits and 0 storage boxes, while this invention identified 161 and 29 respectively, demonstrating that this invention can more fully exploit the semantic appearance features of laboratory consumables and significantly improve the classification and recognition ability of box-shaped targets.

[0048] Secondly, this invention constructs semantic feature vectors by fusing multi-dimensional visual information such as geometry, color, and texture, and employs a global deduplication method based on semantic consistency, which better reflects the differences in appearance and physical properties of laboratory consumables. In terms of counting performance, this invention exhibits higher completeness and stability compared to existing technologies. The comparison results across five categories show that this invention achieves a count of 26 for reagent bottles (compared to 8 for the comparison method); 2 for brown reagent bottles (compared to 1 for the comparison method); 161 for reagent kits (compared to only 2 for the comparison method); and 29 for storage boxes (compared to 0 for the comparison method). Therefore, this invention significantly outperforms existing mapping methods in recognizing and counting common laboratory bottle and box types.

[0049] Finally, this invention can output visualized recognition and counting results, which is suitable for application scenarios such as laboratory consumables inventory, and has high engineering application value and promotion prospects. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the overall process of the intelligent identification and counting method for laboratory consumables based on a semantic visual model proposed in this invention.

[0051] Figure 2 This is a schematic diagram showing the results of identifying and counting laboratory consumables using the method of the present invention.

[0052] Figure 3 This is a schematic diagram showing the results of testing the same laboratory consumables scenario using the unoptimized YOLO detection algorithm.

[0053] Figure 4 This is a comparison chart of the classification, identification, and counting results of the method of this invention and the unoptimized YOLO detection algorithm in a laboratory consumables scenario. Detailed Implementation

[0054] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0055] like Figure 1 As shown, this invention proposes an intelligent identification and counting method for laboratory consumables based on a semantic visual model. The method mainly includes five stages: image input and candidate target detection, semantic feature extraction, semantic category discrimination, semantic consistency deduplication, and target counting and result output. This method is designed for complex scenarios such as laboratory shelves, storage cabinets, refrigerator interiors, and gas cylinder placement areas. It fully considers the problems of diverse laboratory consumables, similar appearances, dense placement, and partial occlusion, and constructs an intelligent identification scheme that does not rely on a dedicated end-to-end training model. The specific steps of this method are as follows:

[0056] Step 1, Image Input and Candidate Object Detection

[0057] The system first acquires images of the laboratory scene, which can be static images collected by fixed cameras, mobile inspection equipment, handheld terminals, or unmanned inspection platforms. Due to the characteristics of laboratory scenes, such as significant differences in target size, dense distribution of small targets, and rich details in local areas, the system can use whole-image detection or sliding window segmentation to extract candidate regions. When using the sliding window segmentation strategy, the original image is divided into several sub-images with overlapping regions. Each sub-image is input into a general object detection model for detection, and the local detection results are mapped back to the original image coordinate system for unified management.

[0058] Let the input image be After processing by a general object detection model, multiple candidate object regions are obtained, denoted as the first... The candidate target areas are The candidate target region includes the target bounding box coordinates, width and height information, and confidence information. It should be noted that the general target detection model in this invention can be an existing common target detection network, whose main function is to provide coarse target localization capabilities, rather than undertaking the final task of classifying laboratory consumables. Therefore, this invention only retains the positional and confidence information of candidate targets at this stage, rather than directly using their original category labels as the final recognition result. This processing method decouples visual localization from semantic classification, avoiding semantic biases generated by the general model in laboratory-specific category recognition.

[0059] Step 2, semantic feature extraction

[0060] After obtaining candidate target regions, the system performs cropping and feature analysis on each target region to construct a semantic feature representation of the target. Considering the appearance characteristics of laboratory consumables, this invention extracts semantically relevant features from three dimensions: geometric structure, color distribution, and surface texture.

[0061] In terms of geometric features, the system extracts parameters such as the width, height, area, and aspect ratio of the target region. Width and height reflect the basic size information of the target, area reflects the overall spatial range occupied by the target, and aspect ratio can distinguish between slender targets and regular blocky targets. For example, gas cylinders usually have a higher height and a smaller aspect ratio, box-shaped targets often exhibit a more regular rectangular proportion, and bottle-shaped targets are in between.

[0062] Regarding color features, the system performs color space conversion on the target area and further analyzes features such as the proportion of brown pixels, the proportion of dark areas, and the proportion of low-saturation, high-brightness areas. For laboratory consumables, brown bottles typically have a high proportion of brown and dark colors, while transparent reagent bottles show significant differences in brightness and color distribution. Storage boxes and reagent kits often exhibit different patterns in surface reflection and overall color uniformity. Therefore, color features play an important role in the semantic discrimination of laboratory consumables.

[0063] Regarding texture features, the system extracts parameters such as edge density and grayscale variance through edge detection and grayscale statistics. Targets with more complex surface textures and richer label boundaries typically exhibit higher edge density, while targets with smoother surfaces and less texture variation show lower edge response. By quantifying texture information, the system's ability to distinguish between reagent kits, storage boxes, and some bottle-shaped targets can be effectively improved.

[0064] After combining the above three types of features, the system constructs semantic feature vectors of candidate target regions to provide a unified representation of the targets, thus providing a foundation for subsequent semantic discrimination.

[0065] Step 3, Semantic discrimination and category mapping

[0066] After constructing semantic feature vectors, the system employs a rule-based semantic reasoning mechanism to classify consumable targets. Unlike existing methods that directly rely on neural network output category labels, this invention explicitly constructs the correspondence between visual features and consumable categories, transforming candidate target regions into laboratory semantic targets. Semantic categories include reagent bottles, brown bottles, reagent kits, storage boxes, and gas cylinders. Specifically, when a target region exhibits a slender structure and a large overall scale, the system preferentially classifies it as a gas cylinder; when the target region has a high proportion of brown and obvious dark areas, the system preferentially classifies it as a brown bottle; when the target region exhibits a regular block shape and rich surface edges, the system tends to classify it as a reagent kit; when the target region has a smooth surface, high brightness, and low texture complexity, the system tends to classify it as a storage box; targets that are bottle-shaped but do not meet the brown bottle criteria are classified as reagent bottles.

[0067] Through the above semantic discrimination process, the present invention can complete the fine-grained classification of laboratory consumables without retraining a dedicated classification model. This not only enhances the flexibility of recognition but also makes the discrimination criteria for each category clearer, facilitating rule adjustment and expansion in subsequent applications based on actual scenarios.

[0068] Step 4: Global deduplication based on semantic consistency

[0069] In laboratory settings, especially when using sliding window segmentation detection, multi-scale detection, and dense target detection, the same physical target can easily be detected as multiple candidate boxes. Directly counting all candidate boxes inevitably leads to duplicate statistics. Therefore, this invention designs a global deduplication mechanism based on semantic consistency. By jointly analyzing spatial overlap, scale similarity, and semantic category consistency, it merges or suppresses duplicate candidate target regions. Furthermore, for some duplicate boxes with low intersection-union ratios due to local offsets, the system also uses center point inclusion relationships for auxiliary judgment; that is, when the center point of one candidate box falls inside another candidate box, they are considered to have a potential duplicate relationship.

[0070] Secondly, the system constrains the scale similarity between candidate target regions. For candidate boxes with significantly different sizes, even if there is some spatial overlap, they are not directly identified as the same physical target to avoid mistakenly merging different targets. Scale relationships can be measured by area ratio to filter out obviously unreasonable repetitive relationships.

[0071] Furthermore, the system introduces a semantic category consistency constraint. The system only allows deduplication if the semantic categories of two candidate target regions are identical; if the semantic categories of two target regions are different, they will not be merged even if there is spatial overlap or similar scale. This mechanism effectively avoids erroneous merging between adjacent targets or partially occluded targets.

[0072] By combining the above three types of constraints, this invention elevates the traditional detection box selection, which relies solely on geometric overlap, to a target uniqueness representation problem under semantic constraints. Finally, for candidate target regions that satisfy the repetition condition, the system retains the detection boxes with higher confidence or more complete representation as the final result, ensuring that each physical target corresponds to only one final detection box.

[0073] Step 5, Target Count and Result Output

[0074] After deduplication, the system obtains the final set of targets in the laboratory scenario. Subsequently, the system classifies all targets according to semantic categories and counts the quantity of different types of consumables, such as reagent bottles, brown bottles, reagent kits, storage boxes, and gas cylinders.

[0075] During the results output phase, the system overlays the final target bounding box, semantic category labels, and quantity information for each type of consumable onto the original image to form a visual result image. The top left corner of the image or a preset display area can display the count results for each category and the total number of items, facilitating quick verification of inventory status by laboratory managers. This result can not only be used for single-test display but can also be further integrated into the laboratory management platform for consumable inventory updates, safety monitoring, and historical record analysis.

[0076] In addition, to support the implementation of the above method, this invention also constructs a laboratory consumables intelligent identification and counting system based on a semantic visual model, which includes:

[0077] The image input and candidate target detection module is used to acquire laboratory scene images and process the input images using a general target detection model to obtain multiple candidate target regions and their corresponding location information and confidence information.

[0078] The semantic feature extraction module is used to crop and analyze the features of each target region to construct the semantic feature representation of the target.

[0079] Semantic discrimination and category mapping are used to perform semantic reasoning on candidate target regions to obtain the semantic category of laboratory consumables, realizing the semantic mapping from general visual detection results to laboratory-specific target categories;

[0080] The global deduplication module is used to identify duplicate detection results belonging to the same physical target, and to merge or suppress duplicate detection results, retaining only the unique detection result corresponding to each physical target;

[0081] The target counting and result output module is used to count the number of laboratory consumables in different semantic categories, and output the identification results, category labels and counting results in a visual form.

[0082] The embodiments of this application are further illustrated below with specific application examples:

[0083] Taking a laboratory shelf scenario as an example, the input image contains multiple reagent bottles, brown bottles, reagent kits, and storage boxes, some of which are closely packed, occluded, or have significant scale differences. The system first obtains a set of candidate target regions using a general object detection model. Since some targets are repeatedly detected near the sliding window boundaries, the initial number of candidate targets is greater than the actual number of physical targets. Subsequently, the system extracts geometric, color, and texture features from each candidate target region and performs semantic discrimination, mapping them to laboratory consumable categories. Then, the system filters duplicate candidate targets based on intersection-union ratio, center point inclusion relationship, scale similarity, and semantic category consistency, removing duplicate boxes caused by multi-window overlap and retaining only the best detection results. Finally, the system accurately counts each category of consumables and overlays the results onto the original image.

[0084] For example, in the task of detecting the placement area of ​​gas cylinders, since gas cylinders usually have a high aspect ratio and a large overall size, the system can quickly distinguish them from ordinary bottle-shaped consumables based on geometric features during the semantic discrimination stage; even if there are partially overlapping candidate boxes in a complex background, the deduplication module can still achieve accurate screening through scale relationship and semantic consistency constraints to avoid duplicate counting.

[0085] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0086] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the scope of protection of the present invention in any way, and all technical solutions obtained by equivalent substitution or other means fall within the scope of protection of the present invention. Parts not covered in this invention are the same as or can be implemented using existing technology.

Claims

1. A method for intelligent identification and counting of laboratory consumables based on a semantic visual model, characterized in that, Includes the following steps: Step 1, Image Input and Candidate Object Detection: Acquire laboratory scene images and process the input images using a general object detection model to obtain multiple candidate object regions and their corresponding location and confidence information; Step 2, Semantic Feature Extraction: After obtaining the candidate target regions, each target region is cropped and its features are analyzed to construct a semantic feature representation of the target. Step 3, Semantic discrimination and category mapping: Semantic reasoning is performed on candidate target regions through preset semantic discrimination rules to obtain the semantic category of laboratory consumables, realizing the semantic mapping of general visual detection results to laboratory-specific target categories; Step 4: Global deduplication based on semantic consistency: A unified screening is performed on multiple candidate target regions. By jointly analyzing the spatial positional relationship, scale relationship and semantic category consistency between candidate target regions, duplicate detection results belonging to the same physical target are identified, and duplicate detection results are merged or suppressed, retaining only the unique detection result corresponding to each physical target, thereby avoiding duplicate counting. Step 5, Target Counting and Result Output: Based on the deduplicated detection results, count the number of laboratory consumables in different semantic categories, and output the identification results, category labels, and counting results in a visual form.

2. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 1, the image source is a static image collected by a fixed camera, mobile inspection equipment, handheld terminal or unmanned inspection platform; at the same time, the whole image detection or sliding window segmentation detection method is used to extract candidate regions from the image; when sliding window segmentation is used, the original image is divided into several sub-images with overlapping regions, each sub-image is input into a general target detection model for detection, and the local detection results are mapped back to the original image coordinate system for unified management.

3. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 2, the geometric features, color features, and texture features of the target region are extracted respectively, and the semantic feature vector of the target is constructed: in, Representing geometric features, Indicates color characteristics, Represents texture features; The geometric features are used to characterize the shape and structure information of the target area, including width, height, area and aspect ratio, to distinguish slender targets, regular block targets and general bottle-shaped targets; The color features are used to characterize the color distribution information of the target area, including the proportion of brown pixels, the proportion of dark areas, and the proportion of low-saturation and high-brightness areas, to distinguish brown bottles, transparent reagent bottles, and box-shaped targets. The texture features are used to characterize the texture complexity of the target surface, including edge density and grayscale variance, and are used to distinguish between storage box targets with relatively smooth surfaces and reagent kit targets with rich texture variations. By constructing a combination of three types of features, a semantic description of laboratory consumables is formed from three levels: the appearance geometry, visual color, and local texture of the target, providing a basis for subsequent semantic discrimination.

4. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 3, a semantic discriminant function is established based on the differences in geometric shape, color distribution, and texture structure of different laboratory consumables: in, This represents the semantic feature vector of the i-th candidate target region. This indicates the semantic category corresponding to the candidate target region; the semantic category includes reagent bottle, brown bottle, reagent kit, storage box, and gas cylinder.

5. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 4, characterized in that, In step 3, the semantic discrimination rules specifically include: when the target region has slender structural features and a large overall scale, it is determined to be a gas cylinder; when the target region has a high proportion of brown pixels and a high proportion of dark areas, it is determined to be a brown bottle; when the target region has a high proportion of low-saturation and high-brightness areas and low texture complexity, it is determined to be a storage box; when the target region has a regular block distribution and a high edge density, it is determined to be a reagent kit; for target regions with a bottle-shaped structure but that do not meet the brown bottle discrimination criteria, they are determined to be reagent bottles.

6. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 4, the spatial relationship is described by the intersection-union ratio and the center point inclusion relationship between candidate target regions, where two candidate target regions... and The intersection-union ratio is expressed as: When the intersection ratio between two candidate target regions is large, or when the center point of one candidate target region falls inside the other candidate target region, it is considered that the two have a strong spatial overlap.

7. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 4, the scale relationship is determined by the area ratio between candidate target regions, specifically as follows: in, and These represent the areas of the two candidate target regions respectively; when the area ratio is greater than a preset threshold, the two candidate target regions are considered to be consistent in scale.

8. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 4, semantic consistency is determined by whether the semantic categories of candidate target regions are consistent, specifically: in, and These represent the semantic categories corresponding to the two candidate target regions. Merging or suppression operations are only performed on the two candidate target regions when they meet the preset conditions in terms of spatial location and scale relationship, and when their semantic categories are consistent.

9. The intelligent identification and counting method for laboratory consumables based on a semantic visual model according to claim 1, characterized in that, In step 5, the various types of laboratory consumables are classified and statistically analyzed based on the deduplicated target set. The counting result of the m-th type of laboratory consumables is expressed as: in, For indicator functions, The semantic category of the k-th final target is represented; the final retained detection box, the corresponding semantic category label, and the quantity information of each category are superimposed onto the original laboratory scene image for visualization output.

10. A laboratory consumables intelligent identification and counting system based on a semantic visual model, characterized in that, The system is used to implement the method as described in any one of claims 1 to 9, the system comprising: The image input and candidate target detection module is used to acquire laboratory scene images and process the input images using a general target detection model to obtain multiple candidate target regions and their corresponding location information and confidence information. The semantic feature extraction module is used to crop and analyze the features of each target region to construct the semantic feature representation of the target. Semantic discrimination and category mapping are used to perform semantic reasoning on candidate target regions to obtain the semantic category of laboratory consumables, realizing the semantic mapping from general visual detection results to laboratory-specific target categories; The global deduplication module is used to identify duplicate detection results belonging to the same physical target, and to merge or suppress duplicate detection results, retaining only the unique detection result corresponding to each physical target; The target counting and result output module is used to count the number of laboratory consumables in different semantic categories, and output the identification results, category labels and counting results in a visual form.