Morning inspection machine hand wound discrimination method, device, equipment and medium based on meta learning enhancement

By employing a meta-learning-based enhancement method, a lightweight meta-learning model and a wound-specific attention module are used for hand wound detection. This addresses the challenges of scarce samples, complex scene interference, and limited hardware resources, achieving high-precision and interference-resistant wound recognition.

CN122265266APending Publication Date: 2026-06-23SUZHOU DEWO INTELLIGENT SYST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU DEWO INTELLIGENT SYST
Filing Date
2026-04-24
Publication Date
2026-06-23

Smart Images

  • Figure CN122265266A_ABST
    Figure CN122265266A_ABST
Patent Text Reader

Abstract

The application discloses a morning inspection machine hand wound discrimination method and device based on meta-learning enhancement, equipment and medium. The method comprises the following steps: acquiring an initial hand image collected by a morning inspection machine, and determining a hand region mask in the initial hand image; preprocessing the initial hand image based on the hand region mask, extracting features from the preprocessed image based on a pre-constructed lightweight meta-learning model, and strengthening the features through a wound-specific attention module to obtain wound strengthened features; performing few-sample feature matching on the wound strengthened features and wound prototype features in the lightweight meta-learning model, and determining a hand wound discrimination result according to a matching result. The application achieves the technical effects of few sample requirements, strong anti-interference capability, high recognition accuracy and adaptive morning inspection machine embedded operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and few-shot target detection technology, and in particular to a method, device, equipment and medium for identifying hand wounds in a morning inspection machine based on meta-learning reinforcement. Background Technology

[0002] Hand hygiene of food service workers is directly related to food safety. According to the "National Food Safety Standard for Health Management of Food Production and Operation Personnel," personnel with open wounds on their hands (such as scratches, abrasions, lacerations, etc.) without effective protection are prohibited from working in direct contact with food. Morning inspection machines, as automated detection equipment in this process, must accurately determine the presence of wounds in pre-defined hand areas, providing a basis for determining compliance with work regulations.

[0003] Current hand wound detection faces several technical bottlenecks: First, wound samples are scarce and diverse, with significant differences in shape, depth, and color between different wounds, ranging from superficial scratches to open lacerations. Traditional target detection algorithms, which rely on training with a large number of labeled samples, are ill-suited for this. Second, the catering environment presents complex interference, with hands potentially contaminated by water stains, detergent residue, food stains, etc., which can be easily confused with wound color and texture, leading to misjudgments. Third, morning inspection machines are mostly embedded devices with limited hardware resources, making it difficult to deploy complex, low-sample detection models. Fourth, manual inspection relies on experience, which can easily lead to missed detections of small, superficial wounds due to fatigue or subjective judgment. Summary of the Invention

[0004] This invention provides a method, device, equipment, and medium for identifying hand wounds in a morning inspection machine based on meta-learning reinforcement, so as to achieve accurate identification of hand wounds with a small number of samples and efficient deployment of embedded devices.

[0005] According to one aspect of the present invention, a method for identifying hand wounds in a morning health check machine based on meta-learning reinforcement is provided, the method comprising: Acquire the initial hand image collected by the morning inspection machine, and determine the hand region mask in the initial hand image; The initial hand image is preprocessed based on the hand region mask, and features are extracted from the preprocessed image based on a pre-built lightweight meta-learning model. The features are then enhanced through a wound-specific attention module to obtain wound enhancement features. The wound enhancement features are matched with the wound prototype features in the lightweight meta-learning model using few-sample feature matching, and the hand wound discrimination result is determined based on the matching result.

[0006] According to another aspect of the present invention, a hand wound discrimination device for a morning inspection machine based on meta-learning reinforcement is provided, the device comprising: The region mask determination module is used to acquire the initial hand image collected by the morning inspection machine and determine the hand region mask in the initial hand image; The feature enhancement module is used to preprocess the initial hand image based on the hand region mask, extract features from the preprocessed image based on a pre-built lightweight meta-learning model, and enhance the features through a wound-specific attention module to obtain wound enhancement features. The wound discrimination module is used to perform few-sample feature matching between the wound enhancement features and the wound prototype features in the lightweight meta-learning model, and determine the hand wound discrimination result based on the matching result.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and memory that is communicatively connected to at least one processor; The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that at least one processor can execute the method for identifying hand wounds based on meta-learning reinforcement in morning inspection machines according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute and implement the meta-learning-enhanced hand wound discrimination method for morning inspection machines according to any embodiment of the present invention.

[0009] The technical solution of this invention involves acquiring an initial hand image from a morning inspection machine and determining a hand region mask within that initial hand image. Based on the hand region mask, the initial hand image is preprocessed. Features are extracted from the preprocessed image using a pre-built lightweight meta-learning model, and these features are enhanced using a wound-specific attention module to obtain enhanced wound features. The enhanced wound features are then matched with the wound prototype features in the lightweight meta-learning model using a few-sample feature matching process. Based on the matching results, the hand wound discrimination result is determined. This solution addresses the technical problems of traditional detection methods, such as reliance on a large number of samples, strong scene interference, and difficulty in model deployment. It achieves the technical advantages of low sample requirements, strong anti-interference capabilities, high recognition accuracy, and compatibility with embedded operation of morning inspection machines.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a method for identifying hand wounds using a morning health check machine based on meta-learning reinforcement, provided in an embodiment of the present invention; Figure 2 A flowchart of another method for hand wound discrimination based on meta-learning reinforcement provided in an embodiment of the present invention; Figure 3 A schematic diagram of a hand wound discrimination device for a morning inspection machine based on meta-learning reinforcement provided in an embodiment of the present invention; Figure 4 A schematic diagram of the structure of an electronic device for implementing a method for identifying hand wounds in a morning inspection machine based on meta-learning reinforcement, according to an embodiment of the present invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0015] Figure 1This is a flowchart illustrating a method for hand wound identification using a morning inspection machine based on meta-learning reinforcement, provided by an embodiment of the present invention. This embodiment is applicable to situations where hand wound identification is performed using a morning inspection machine. The method can be executed by a hand wound identification device, which can be implemented in hardware and / or software. This device can be configured in a morning inspection machine or other electronic devices for wound identification. Figure 1 As shown, the method specifically includes the following steps: S110. Obtain the initial hand image collected by the morning inspection machine, and determine the hand region mask in the initial hand image.

[0016] Among them, the morning inspection machine can be understood as an integrated intelligent device used in industries such as catering and food processing to automatically detect the health status of employees before they start work; the initial hand image can be understood as the original hand image directly captured by the morning inspection machine; and the hand area mask can be understood as a binarized image that distinguishes the hand from the background.

[0017] Specifically, the image acquisition unit on the morning inspection machine takes pictures of the hands of the person to be inspected, obtaining raw, unprocessed initial hand images. Then, the hand region mask output by the hand region segmentation module that comes with the morning inspection machine is directly called and determined. The binarized mask result output by the module is used to locate and retain the effective hand region in the initial hand image, and remove irrelevant background regions, providing accurate regional basis for subsequent image preprocessing.

[0018] Optionally, the hand region mask is a binary mask used to distinguish hand pixels from background pixels, and is used to preserve the effective hand pixel region covered by the mask in the initial hand image.

[0019] The binarization mask can be understood as containing only two pixel values, 0 and 1, used to distinguish the foreground from the background. The effective pixel region of the hand can be understood as the set of pixels in the initial hand image that are covered by the hand region mask and belong to the real hand. It does not contain irrelevant pixels such as background, desktop, or clothing, and is only used for the target region for identification and processing.

[0020] Specifically, the hand region mask is a binary mask, which distinguishes hand pixels from background pixels, retaining only the effective hand pixel area covered by the mask in the initial hand image, reducing computational interference caused by invalid areas, and improving subsequent processing efficiency and recognition accuracy.

[0021] Optionally, the preprocessing of the initial hand image based on the hand region mask includes: cropping the initial hand image using the hand region mask to retain the effective hand region; performing bilateral filtering on the effective hand region to suppress scene interference; and stretching the grayscale contrast of the denoised image to enhance wound features.

[0022] Cropping can be understood as an image processing operation that removes the background portion from the initial hand image according to the boundaries of the hand region mask, retaining only the area enclosed by the mask; bilateral filtering denoising can be understood as a filtering method that preserves image edge details while smoothing the image and removing noise; scene interference can be understood as interference information in a catering scene, such as water stains, oil stains, detergent residue, and food stains, which can affect wound recognition; grayscale contrast stretching can be understood as an image enhancement operation that increases the difference in brightness between the wound area and the normal skin area by adjusting the grayscale range of the image; wound features can be understood as key information in the image, such as edges, grayscale, and texture, that can be used to determine whether a wound exists.

[0023] Specifically, the initial hand image is cropped using a hand region mask, retaining only the effective hand area; bilateral filtering is applied to the cropped area to denoise and suppress interference from food scene elements such as water stains and dirt; then grayscale contrast stretching is applied to the denoised image to enhance the feature difference between the wound and normal skin, making the wound features easier for the model to recognize.

[0024] Preferably, the binarized hand mask M output by the morning inspection machine corresponds to the original RGB image. and a small number of wound samples As input, effective features are focused through three steps: Mask cropping: Preserve the hand area and remove background interference, using the following formula: ; in, This is the cropped image of the hand. This indicates pixel-by-pixel multiplication, ensuring that only the pixel information of the hand covered by the mask is retained.

[0025] Interference suppression: Bilateral filtering is used to remove noise such as stains and watermarks while preserving the details of the wound edges. The formula is as follows: ; in, For the target pixel coordinates, For the neighboring pixel coordinates, These are the pixel values ​​after noise reduction; For spatial distance Gaussian kernel, The grayscale difference Gaussian kernel, , These represent the standard deviations of the corresponding kernels; W is the normalization coefficient, ensuring a stable range of output pixel values.

[0026] Feature enhancement: Contrast stretching is applied to easily confused grayscale features in the wound area, using the following formula: ; in, This is the final image after preprocessing; , These are the minimum and maximum gray values ​​within the hand area, respectively. The gray value difference between the wound and normal skin is enhanced by stretching.

[0027] S120. The initial hand image is preprocessed based on the hand region mask, and features are extracted from the preprocessed image based on a pre-built lightweight meta-learning model. The features are then enhanced through a wound-specific attention module to obtain wound enhancement features.

[0028] Among them, preprocessing can be understood as performing optimization processing such as noise reduction and enhancement on the image; the lightweight meta-learning model can be understood as a recognition model suitable for running on embedded devices and based on a small number of samples; the wound-specific attention module can be understood as a computational unit specifically designed to enhance the features of the wound region; and the wound enhancement features can be understood as feature data that highlights wound information and suppresses interference.

[0029] Specifically, the initial hand image is processed using a hand region mask to preserve the hand region and remove background interference. The processed image is then input into a pre-trained lightweight meta-learning model to extract features. At the same time, wound-related features are enhanced through a wound-specific attention module to finally obtain enhanced wound features.

[0030] Optionally, the lightweight meta-learning model is an improved lightweight prototype network, which uses a lightweight encoder containing depthwise separable convolutions and inverted residual blocks as its backbone structure; the lightweight encoder uses depthwise separable convolutions and reduces the number of up-dimensionality channels in the inverted residual blocks.

[0031] Among them, the improved lightweight prototype network can be understood as a meta-learning network with simplified structure and reduced computational cost; the lightweight encoder can be understood as a lightweight network structure used to extract image features; the depthwise separable convolution can be understood as a convolution method that splits computation and reduces the number of parameters; and the inverted residual block can be understood as a network structure unit that maintains feature accuracy.

[0032] Specifically, the lightweight meta-learning model employs an improved lightweight prototype network with a lightweight encoder containing depthwise separable convolutions and inverted residual blocks as its backbone. By replacing traditional convolutions with depthwise separable convolutions and reducing the number of upscaling channels in the inverted residual blocks, the model achieves lightweighting, reduces the number of parameters and computational overhead, and is compatible with the hardware of the morning inspection machine. Preferably, depthwise separable convolutions are used to replace traditional convolutions, splitting the standard convolution into depthwise convolutions and pointwise convolutions, significantly reducing the number of parameters and computational overhead; combined with the inverted residual block structure, the network layers are further simplified and the number of channels is reduced (e.g., the number of upscaling channels in the standard inverted residual block is reduced from 128 to 64).

[0033] Optionally, before extracting features from the preprocessed image based on the pre-built lightweight meta-learning model, the method further includes: constructing a small sample set consisting of images of wounded hands and images of unwounded hands; dividing the small sample set into a support set for generating feature prototypes and a query set for model validation; using a round-based training approach, sequentially inputting the support set and the query set into the initial lightweight meta-learning model, and calculating the matching error between the query set features and the support set prototype features; updating the parameters of the initial lightweight meta-learning model in reverse based on the matching error to reduce feature classification bias; and determining the completed lightweight meta-learning model when the model's classification error no longer decreases and the classification accuracy reaches a preset accuracy threshold.

[0034] Here, a small sample set can be understood as a limited collection of images with and without wounds; a support set can be understood as a set of samples used to generate standard features; a query set can be understood as a set of samples used to validate the model; training rounds can be understood as training in batches; matching error can be understood as the difference value of feature comparison; and classification accuracy can be understood as the degree of recognition accuracy.

[0035] Specifically, before model inference, a small sample set is constructed and divided into a support set and a query set according to categories. The two types of samples are input into the initial model using a round-based training method. The matching error between the prototype features of the query set and the support set is calculated. The model parameters are updated in reverse based on the error to reduce the classification bias. When the model classification error no longer decreases and the accuracy reaches a preset threshold, the trained lightweight meta-learning model is obtained. The preset accuracy threshold can be set in advance based on experience. This embodiment does not impose specific restrictions on it.

[0036] Preferably, an improved lightweight ProtoNet is used as the meta-learning backbone, and general features are learned through a "support set-query set" episodic training mode. The core steps are as follows: Sample construction: A small set of wound samples Divided into support sets (Samples with wounds / no wounds) and query set Each training round constructs one episode, as shown in the following formula: ; in, , These are the support set and query set images, respectively. , The corresponding labels are 1 for wounds and 0 for no wounds, and k and m are the number of samples in each class, respectively.

[0037] General Feature Encoding: An improved MobileNet-V3 is used as the encoder to extract feature vectors from the support set and the query set, as shown in the following formula: ; in, , respectively, are the feature matrices of the support set and the query set, where D is the feature dimension; Encoder is a lightweight network containing depthwise separable convolutions and inverted residual blocks to reduce computational overhead.

[0038] Category prototype generation: Cluster the support set features by label, and calculate the prototype features for each category, as shown in the following formula: ; in, For tags Corresponding prototype features To support centralized labeling The number of samples, To support centralized labeling The feature subset is aggregated by class center to gather common information of features of the same type.

[0039] Optionally, the feature extraction of the preprocessed image based on the lightweight meta-learning model includes: encoding the preprocessed image using a lightweight encoder in the model to obtain corresponding query set features; inputting the query set features into a wound-specific attention module to extract wound edge gradient features and prior features of hand injury-prone locations, respectively; weighting and fusing the attention weights corresponding to the wound edge gradient features and the prior features of hand injury-prone locations according to a preset fusion coefficient to obtain target attention weights; and using the target attention weights to weight the query set features to obtain wound enhancement features that highlight wound region information.

[0040] The lightweight encoder can be understood as a lightweight network backbone equipped with depthwise separable convolution and inverse residual block structures, used to transform images into high-dimensional feature vectors, thus reducing the computational burden on the embedded device of the morning inspection machine; feature encoding can be understood as transforming preprocessed image information into digitized feature vectors that the model can compute through layer-by-layer convolution and downsampling by the encoder; query set features can be understood as features extracted from the hand image to be detected by the encoder, used for subsequent matching with prototype features; wound edge gradient features can be understood as the information on the abrupt changes in wound boundary texture calculated by the Laplacian operator, used to locate the wound contour; prior features of hand injury-prone locations can be understood as the location distribution patterns of high-frequency injury areas such as the palm and fingertips derived from a large number of sample statistics; preset fusion coefficients can be understood as fixed values ​​used to balance the weight ratio of edge gradients and prior location. The target attention weight can be understood as a weight map obtained after fusion, used to highlight the wound area; Weighted processing can be understood as multiplying the target attention weights with the query set features channel by channel to strengthen the wound region features and suppress useless region features.

[0041] Specifically, the preprocessed image, after noise reduction and contrast stretching, is first input into a lightweight meta-learning model. The lightweight encoder within the model performs multi-layer convolution and feature mapping on the image, transforming the image information into a fixed-dimensional query set feature, thus completing the image-to-feature conversion. Then, the query set feature is fed into a wound-specific attention module. First, gradient features of the wound edges are extracted using gradient calculation to highlight the wound contour. Then, prior features of the hand's injury-prone areas are generated based on statistical patterns to identify high-risk regions. Next, the attention weights corresponding to the two features are weighted and summed according to a preset fusion coefficient to obtain a target attention weight that balances edge and location information. The preset fusion coefficient can be pre-set based on experience; this embodiment does not impose specific restrictions on it. Finally, the target attention weight is used to perform a dimensional weighted operation on the query set feature, increasing the numerical intensity of the wound region feature and reducing the feature proportion of normal skin and background areas. This ultimately yields wound enhancement features that highlight wound region information and suppress interference information, providing high-quality features for subsequent few-sample matching.

[0042] Preferably, a dual-branch attention module is designed, which enhances features based on the wound's "edge gradient" and "location prior" respectively, to suppress interference from normal skin areas, as shown in the following formula: The edge attention branch extracts the gradient features of the wound edge using the Laplacian operator to generate attention weights. ; in, This is the Laplacian operator, used to calculate the second derivative of an image because the gradient values ​​are large in edge regions; For gradient plots; Adjust the number of channels for a 1×1 convolution; This is an edge attention weight map, where the weight value is high in the wound edge region.

[0043] The location prior branch generates location weights based on the prior knowledge that hand wounds are mostly distributed in easily rubbed areas such as the palm and fingertips. ; in, This is a location attention weight map; The center coordinates of the vulnerable areas of the hand were obtained through statistical analysis of a small sample. It is a Gaussian function that creates weighted peaks around the target region.

[0044] For example, combining attention and feature enhancement: ; ; in, The preset fusion coefficient (balancing edge and position features) has a value range of [0,1], which can be preset based on experience. This embodiment does not impose specific restrictions on it. For target attention weights; This is a dimension adjustment operation to match the dimensions of the weight map with those of the feature vectors. The enhanced query set features, i.e. wound enhancement features, amplify the feature signals of the wound region.

[0045] S130. Perform few-sample feature matching between the wound enhancement features and the wound prototype features in the lightweight meta-learning model, and determine the hand wound discrimination result based on the matching result.

[0046] Among them, the wound prototype features can be understood as the standard features of having a wound or not having a wound learned by the model; the few-sample feature matching can be understood as completing feature comparison and identification with a small number of samples; and the hand wound discrimination result can be understood as the final result of identifying whether there is a wound or not.

[0047] Specifically, the wound enhancement features are compared with the wound prototype features preset in the model for similarity, and the final hand wound discrimination result is determined based on the comparison results. The entire process can be completed with only a small number of samples.

[0048] The technical solution of this invention involves acquiring an initial hand image from a morning inspection machine and determining a hand region mask within that initial hand image. Based on the hand region mask, the initial hand image is preprocessed. Features are extracted from the preprocessed image using a pre-built lightweight meta-learning model, and these features are enhanced using a wound-specific attention module to obtain enhanced wound features. The enhanced wound features are then matched with the wound prototype features in the lightweight meta-learning model using a few-sample feature matching process. Based on the matching results, the hand wound discrimination result is determined. This solution addresses the technical problems of traditional detection methods, such as reliance on a large number of samples, strong scene interference, and difficulty in model deployment. It achieves the technical advantages of low sample requirements, strong anti-interference capabilities, high recognition accuracy, and compatibility with embedded operation of morning inspection machines.

[0049] Figure 2This is a flowchart of another method for hand wound discrimination using a morning inspection machine based on meta-learning enhancement, provided by an embodiment of the present invention. Building upon the above embodiments, this embodiment further refines the method described in the above embodiments for few-sample feature matching of the wound enhancement features and the wound prototype features, and determines the hand wound discrimination result based on the matching result. Specific implementation details can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 2 As shown, the method specifically includes the following steps: S210. Obtain the initial hand image collected by the morning inspection machine, and determine the hand region mask in the initial hand image.

[0050] S220. The initial hand image is preprocessed based on the hand region mask, and features are extracted from the preprocessed image based on a pre-built lightweight meta-learning model. The features are then enhanced through a wound-specific attention module to obtain wound enhancement features.

[0051] S230. Calculate the cosine distance between the wound enhancement feature and the prototype features of the wound category and the prototype features of the non-wound category, respectively.

[0052] In this context, the prototype features for the "wounded" category can be understood as the standard feature vector representing the common features of wounds obtained during model training by clustering the features of all samples in the support set labeled as having hand wounds. This vector serves as the feature reference for the "wounded" category. Similarly, the prototype features for the "no-wound" category can be understood as the standard feature vector representing the common features of normal skin obtained during model training by clustering the features of all samples in the support set labeled as having no hand wounds. This vector serves as the feature reference for the "no-wound" category. Cosine distance can be understood as a metric for measuring the similarity between two sets of features.

[0053] Specifically, after obtaining wound enhancement features that highlight the wound area, similarity calculations are performed between these features and pre-trained prototype features for both wound-affected and wound-free categories within the model. Cosine distance is used as a measure of feature similarity. The cosine distance between the wound enhancement features and the prototype features for wound-affected categories, representing common characteristics of wounds, is calculated, as is the cosine distance between the wound enhancement features and the prototype features for wound-free categories, representing common characteristics of normal skin. These two independent cosine distance calculations yield two sets of numerical results. The magnitude of these results directly reflects the similarity between the detected feature and its corresponding prototype feature; a smaller cosine distance indicates a closer similarity in feature distribution, providing a quantitative basis for determining subsequent discrimination results.

[0054] S240. Select the category corresponding to the smallest cosine distance as the discrimination result of the current hand image; wherein, the discrimination result includes whether there is a wound or not.

[0055] The discrimination result can be understood as the final recognition result output by the model.

[0056] Specifically, after obtaining two sets of cosine distance values ​​corresponding to the wound enhancement features and the prototype features of the wound category and the non-wound category, respectively, these two values ​​are compared, and the set with the smaller value is selected. Since a smaller cosine distance indicates a higher similarity between the detected feature and the corresponding category, the category corresponding to the smallest cosine distance is used as the final classification category of the current hand image, thereby completing the automatic identification of hand wounds. The final output of this embodiment only includes two cases: the wound category where a wound is detected, and the non-wound category where no wound is detected. It does not involve the differentiation and determination of additional information such as wound type, size, or depth.

[0057] Preferably, the distance between the enhanced features and the prototype features of the support set is calculated to achieve few-shot classification, as shown in the following formula: ; ; in, This is the cosine distance calculation function; the smaller the distance, the higher the feature similarity. It is an L2 norm; To predict the label, the category to which the sample belongs is determined by the minimum distance.

[0058] Preferably, for samples with wounds, the formula for predicting the bounding box of the wound region is as follows: ; in, For bounding box regression head; To predict bounding box parameters, The coordinates of the center of the box Given the width and height of the bounding box, the wound location is determined based on enhanced features.

[0059] Preferably, the results are optimized using confidence-based adaptive non-maximum suppression (NMS) to avoid overlapping of multiple boxes.

[0060] The confidence score is calculated by combining classification similarity and bounding box regression stability, as shown in the following formula: ; Where C represents the overall confidence level; , To support the average width and height of the wound samples, stability is improved by penalizing frames with large deviations from the average size.

[0061] Preferably, adaptive NMS dynamically adjusts the IOU (Intersection over Union) threshold based on the confidence level, as shown in the following formula: ; ; in, The threshold is adaptive to IOU; the higher the confidence level, the more lenient the threshold. The function for calculating the intersection-union ratio; This is a function for calculating the area of ​​a region. When the intersection-to-union ratio of the two frames is greater than... At that time, the boxes with high confidence are retained, and the final output is the optimized wound discrimination result and bounding box.

[0062] The technical solution of this invention achieves accurate classification and determination of hand wounds under conditions of few samples by comparing the similarity between wound enhancement features and two types of prototype features based on cosine distance. It achieves the technical effect of simple discrimination logic, stable and reliable recognition results, and strong anti-interference ability.

[0063] Figure 3 This is a schematic diagram of a hand wound detection device for a morning inspection machine based on meta-learning reinforcement, provided as an embodiment of the present invention. Figure 3 As shown, the device includes: a region mask determination module 310, a feature enhancement module 320, and a wound discrimination module 330.

[0064] The system includes a region mask determination module 310, which acquires an initial hand image from a morning inspection machine and determines a hand region mask in the initial hand image; a feature enhancement module 320, which preprocesses the initial hand image based on the hand region mask, extracts features from the preprocessed image based on a pre-built lightweight meta-learning model, and enhances the features through a wound-specific attention module to obtain wound enhancement features; and a wound discrimination module 330, which performs few-sample feature matching between the wound enhancement features and the wound prototype features in the lightweight meta-learning model, and determines the hand wound discrimination result based on the matching result.

[0065] The technical solution of this invention involves acquiring an initial hand image from a morning inspection machine and determining a hand region mask within that initial hand image. Based on the hand region mask, the initial hand image is preprocessed. Features are extracted from the preprocessed image using a pre-built lightweight meta-learning model, and these features are enhanced using a wound-specific attention module to obtain enhanced wound features. The enhanced wound features are then matched with the wound prototype features in the lightweight meta-learning model using a few-sample feature matching process. Based on the matching results, the hand wound discrimination result is determined. This solution addresses the technical problems of traditional detection methods, such as reliance on a large number of samples, strong scene interference, and difficulty in model deployment. It achieves the technical advantages of low sample requirements, strong anti-interference capabilities, high recognition accuracy, and compatibility with embedded operation of morning inspection machines.

[0066] Optionally, the lightweight meta-learning model is an improved lightweight prototype network, which uses a lightweight encoder containing depthwise separable convolutions and inverted residual blocks as its backbone structure; the lightweight encoder uses depthwise separable convolutions and reduces the number of up-dimensionality channels in the inverted residual blocks.

[0067] Optionally, the device further includes: A small sample set construction module is used to construct a small sample set consisting of wounded hand images and unwound hand images before performing feature extraction on preprocessed images based on a pre-built lightweight meta-learning model. The sample partitioning module is used to divide the small sample set into a support set for generating feature prototypes and a query set for model validation according to categories. The training module is used to sequentially input the support set and the query set into the initial lightweight meta-learning model in a round-training manner, and calculate the matching error between the query set features and the support set prototype features. The parameter update module is used to update the parameters of the initial lightweight meta-learning model in reverse based on the matching error, so as to reduce the feature classification bias. The model determination module is used to determine the completed lightweight meta-learning model when the classification error of the model no longer decreases and the classification accuracy reaches a preset accuracy threshold.

[0068] Optionally, the feature enhancement module includes: The feature encoding unit is used to encode the features of the preprocessed image through the lightweight encoder in the model to obtain the corresponding query set features; The feature extraction unit is used to input the query set features into the wound-specific attention module to extract the wound edge gradient features and the prior features of the hand's vulnerable injury locations, respectively. The weight determination unit is used to perform weighted fusion of the attention weights corresponding to the wound edge gradient features and the prior features of the hand injury-prone location according to the preset fusion coefficient, so as to obtain the target attention weight; The feature enhancement unit is used to weight the query set features using the target attention weights to obtain wound enhancement features that highlight wound region information.

[0069] Optionally, the wound detection module includes: The cosine distance determination unit is used to calculate the cosine distance between the wound enhancement feature and the prototype feature of the wound category and the prototype feature of the non-wound category, respectively. The discrimination unit is used to select the category corresponding to the smallest cosine distance as the discrimination result of the current hand image; wherein, the discrimination result includes whether there is a wound or no wound.

[0070] Optionally, the hand region mask is a binary mask used to distinguish hand pixels from background pixels, and is used to preserve the effective hand pixel region covered by the mask in the initial hand image.

[0071] Optionally, the feature enhancement module includes: A cropping unit is used to crop the initial hand image using the hand region mask to preserve the effective area of ​​the hand; A noise reduction unit is used to perform bilateral filtering noise reduction on the effective area of ​​the hand to suppress scene interference; The contrast stretching unit is used to stretch the grayscale contrast of the denoised image to enhance wound features.

[0072] The hand wound discrimination device for morning inspection machines based on meta-learning reinforcement provided in this embodiment of the invention can execute the hand wound discrimination method for morning inspection machines based on meta-learning reinforcement provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0073] Figure 4 This is a schematic diagram of the electronic device used to implement the meta-learning-reinforcement-based hand wound detection method for morning inspection machines, as described in this embodiment of the invention. The electronic device is intended to represent various forms of digital computers, such as laptops, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0074] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0075] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0076] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the method for identifying hand wounds on a morning inspection machine based on meta-learning reinforcement.

[0077] In some embodiments, the method for meta-learning-enhanced hand wound detection in morning health check machines can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method described above for meta-learning-enhanced hand wound detection in morning health check machines can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the method for meta-learning-enhanced hand wound detection in morning health check machines by any other suitable means (e.g., by means of firmware).

[0078] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0079] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0080] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0081] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0082] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0083] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0084] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0085] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for identifying hand wounds in a morning health check machine based on meta-learning reinforcement, characterized in that, include: Acquire the initial hand image collected by the morning inspection machine, and determine the hand region mask in the initial hand image; The initial hand image is preprocessed based on the hand region mask, and features are extracted from the preprocessed image based on a pre-built lightweight meta-learning model. The features are then enhanced through a wound-specific attention module to obtain wound enhancement features. The wound enhancement features are matched with the wound prototype features in the lightweight meta-learning model using few-sample feature matching, and the hand wound discrimination result is determined based on the matching result.

2. The method according to claim 1, characterized in that, The lightweight meta-learning model is an improved lightweight prototype network, which uses a lightweight encoder containing depthwise separable convolutions and inverted residual blocks as its backbone structure; the lightweight encoder uses depthwise separable convolutions and reduces the number of up-dimensional channels in the inverted residual blocks.

3. The method according to claim 1, characterized in that, Before performing feature extraction on the preprocessed image based on a pre-built lightweight meta-learning model, the following steps are also included: Construct a small sample set consisting of images of hands with wounds and images of hands without wounds; The small sample set is divided into a support set for generating feature prototypes and a query set for model validation according to categories. A round-based training approach is adopted, in which the support set and the query set are sequentially input into the initial lightweight meta-learning model, and the matching error between the query set features and the support set prototype features is calculated. The parameters of the initial lightweight meta-learning model are updated in reverse based on the matching error to reduce the feature classification bias. If the classification error of the model no longer decreases and the classification accuracy reaches the preset accuracy threshold, then the trained lightweight meta-learning model is determined.

4. The method according to claim 1, characterized in that, The feature extraction of the preprocessed image based on the lightweight meta-learning model includes: The preprocessed image is feature-encoded using a lightweight encoder in the model to obtain the corresponding query set features; The query set features are input into the wound-specific attention module to extract the wound edge gradient features and the prior features of the hand's vulnerable locations, respectively. The attention weights corresponding to the wound edge gradient features and the prior features of the hand injury-prone locations are weighted and fused according to a preset fusion coefficient to obtain the target attention weights. The query set features are weighted using the target attention weights to obtain wound enhancement features that highlight wound region information.

5. The method according to claim 1, characterized in that, The step of performing few-sample feature matching between the wound enhancement features and the wound prototype features, and determining the hand wound discrimination result based on the matching result, includes: Calculate the cosine distance between the wound enhancement feature and the prototype features of the wound category and the prototype features of the non-wound category, respectively. The category corresponding to the smallest cosine distance is selected as the discrimination result of the current hand image; wherein, the discrimination result includes whether there is a wound or not.

6. The method according to claim 1, characterized in that, The hand region mask is a binary mask used to distinguish hand pixels from background pixels, and is used to preserve the effective pixel area of ​​the hand covered by the mask in the initial hand image.

7. The method according to claim 1, characterized in that, The preprocessing of the initial hand image based on the hand region mask includes: The initial hand image is cropped using the hand region mask to preserve the effective hand area; Bilateral filtering is applied to the effective area of ​​the hand to reduce scene interference; The grayscale contrast of the denoised image is stretched to enhance wound features.

8. A hand wound detection device for a morning inspection machine based on meta-learning reinforcement, characterized in that, include: The region mask determination module is used to acquire the initial hand image collected by the morning inspection machine and determine the hand region mask in the initial hand image; The feature enhancement module is used to preprocess the initial hand image based on the hand region mask, extract features from the preprocessed image based on a pre-built lightweight meta-learning model, and enhance the features through a wound-specific attention module to obtain wound enhancement features. The wound discrimination module is used to perform few-sample feature matching between the wound enhancement features and the wound prototype features in the lightweight meta-learning model, and determine the hand wound discrimination result based on the matching result.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for identifying hand wounds based on meta-learning reinforcement as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the method for identifying hand wounds on a morning inspection machine based on meta-learning reinforcement, as described in any one of claims 1-7.