Warehouse storage location detection method and device based on meta learning, equipment and medium
By employing a meta-learning-based approach and utilizing pre-trained networks and small sample support sets, we have achieved low-cost, rapid iteration, and high accuracy for warehouse location detection. This addresses the issues of high data annotation costs, slow iteration, and insufficient detection of unknown goods in existing technologies, and adapts to the dynamic changes in warehousing scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN TODAY INT SOFTWARE TECH CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies for warehouse location inspection suffer from high data labeling costs, long iteration cycles, difficulty in handling frequent changes, and a lack of ability to detect unknown goods. This is especially true in scenarios with a large number of SKUs and frequent category updates, where it is difficult to achieve accurate and easily iterative inspection.
A meta-learning-based approach is adopted, which extracts feature vectors through a pre-trained backbone network and feature mapping layer. Combined with a dynamic support set of small samples and a meta-learning strategy, the feature vectors of the support sample images are aggregated, the distance metric is calculated and converted into a probability distribution, and the detection results are generated. The confidence threshold is used for accurate identification.
It achieves efficient and accurate warehouse location detection under conditions of limited samples, supports rapid iteration and identification of new product categories, improves detection accuracy and robustness, and adapts to dynamic changes in warehousing scenarios.
Smart Images

Figure CN121937743B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, equipment and medium for detecting warehouse storage locations based on meta-learning. Background Technology
[0002] With the rapid development of e-commerce and intelligent manufacturing, modern warehousing and logistics systems are placing higher demands on the automation and intelligence of cargo identification and location management. Accurate and efficient identification of cargo types and location information is a key technological foundation for realizing applications such as intelligent warehousing, automated sorting, and unmanned forklifts.
[0003] Currently, deep learning algorithms are widely used in the field of cargo recognition. However, traditional deep learning methods still have the following significant shortcomings when applied to cargo recognition:
[0004] (1) High data annotation cost. Traditional methods require the collection and annotation of a large number of training samples for each product category. Usually, hundreds or even thousands of annotated images are needed for each category to achieve acceptable recognition accuracy. For warehousing scenarios with a large number of SKUs (StockKeeping Units) and frequent category updates, continuous data annotation work requires a lot of manpower and resources. The annotation cost of a single SKU is high, which seriously restricts the economic feasibility and large-scale deployment of the system.
[0005] (2) Long model iteration cycle. When a new category of goods is introduced into the warehouse, traditional methods require the collection of a large amount of sample data of the new category and the retraining or fine-tuning of the recognition model. This process usually takes several days or even weeks, which cannot meet the needs of rapid business response.
[0006] (3) Difficult to handle frequent changes. In actual warehouse operations, the types of goods are updated frequently. Seasonal goods, temporary promotional items, and new product trial sales require the system to have the ability to quickly adapt to new categories. However, the long-cycle iteration mode of traditional methods is difficult to adapt to such dynamic changes.
[0007] (4) Lack of effective unknown goods detection capability. Traditional classification models tend to force all inputs into one of the known categories. Even if the input image does not belong to any known category, the model will still give a category prediction result, which may lead to serious management errors in actual warehousing applications.
[0008] Therefore, how to achieve accurate and easily iterative warehouse location detection under conditions of a small number of samples has become an urgent problem to be solved. Summary of the Invention
[0009] In view of the above, it is necessary to provide a method, device, equipment and medium for warehouse location detection based on meta-learning, which aims to solve the problems of high cost, difficulty in iteration and low detection accuracy of warehouse location detection.
[0010] In a first aspect, embodiments of the present invention provide a warehouse location detection method based on meta-learning, the warehouse location detection method based on meta-learning comprising:
[0011] In response to a detection command for a target storage location, an image of the target storage location is acquired as an image to be identified;
[0012] A feature extraction network, including a pre-trained backbone network and a feature mapping layer, is obtained, and the feature extraction network is used to extract features from the image to be identified to obtain a query feature vector.
[0013] Support sample images of each category are loaded from the dynamic support set of small samples, and feature vectors of each category's support sample images are extracted through the feature extraction network.
[0014] Based on the meta-learning strategy, the feature vectors of the supporting sample images of each category are aggregated to obtain the category representative vector of each category;
[0015] Calculate the distance metric between the query feature vector and the category representative vector of each product category;
[0016] The scaled distance is obtained by scaling each distance metric value based on the temperature parameter, and the scaled distance is then converted into a probability distribution.
[0017] The detection results for the target storage location are generated based on the probability distribution and confidence threshold.
[0018] Secondly, embodiments of the present invention also provide a warehouse location detection device based on meta-learning, characterized in that the warehouse location detection device based on meta-learning includes:
[0019] The acquisition unit is used to acquire an image of the target storage location as an image to be identified in response to a detection command for the target storage location;
[0020] The extraction unit is used to acquire a feature extraction network including a pre-trained backbone network and a feature mapping layer, and to use the feature extraction network to extract features from the image to be identified to obtain a query feature vector.
[0021] The extraction unit is also used to load support sample images of each category from the dynamic support set of small samples, and extract the feature vectors of the support sample images of each category through the feature extraction network.
[0022] The aggregation unit is used to aggregate the feature vectors of the supporting sample images of each category based on the meta-learning strategy to obtain the category representative vector of each category.
[0023] The calculation unit is used to calculate the distance metric between the query feature vector and the category representative vector of each product category;
[0024] The scaling unit is used to scale each distance metric value based on the temperature parameter to obtain a scaled distance, and to convert the scaled distance into a probability distribution;
[0025] The generation unit is used to generate the detection results of the target storage location based on the probability distribution and confidence threshold.
[0026] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0027] A memory for storing at least one instruction; and a processor for executing the instructions stored in the memory to implement the meta-learning-based warehouse location detection method.
[0028] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing at least one instruction, which is executed by a processor in a computer device to implement the meta-learning-based warehouse location detection method.
[0029] As can be seen from the above technical solutions, this invention can acquire a feature extraction network including a pre-trained backbone network and a feature mapping layer, and use the feature extraction network to extract features from the image to be identified, realizing the transformation from raw pixels to structured feature vectors, reducing data redundancy, and highlighting the distinguishing features of the storage location; through a dynamic support set, it can support low-cost detection in small sample scenarios and rapid iteration of new categories; based on the meta-learning strategy, it aggregates the feature vectors of the support sample images of each category, which can effectively use a small number of samples to represent the overall distribution of the category; and generates the detection results of the target storage location according to the probability distribution and confidence threshold, which can effectively filter low-confidence and low-similarity samples based on dual constraints, thereby improving the detection accuracy. Attached Figure Description
[0030] Figure 1 This is a flowchart of a preferred embodiment of the warehouse location detection method based on meta-learning of the present invention;
[0031] Figure 2 This is a functional block diagram of a preferred embodiment of the warehouse location detection device based on meta-learning of the present invention;
[0032] Figure 3This is a schematic diagram of the structure of a computer device that implements a preferred embodiment of the warehouse location detection method based on meta-learning according to the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of the warehouse location detection method based on meta-learning of the present invention. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.
[0035] The meta-learning-based warehouse location detection method is applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0036] The computer device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.
[0037] The computer equipment may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0038] The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0039] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0040] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0041] The network in which the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).
[0042] S10, in response to the detection command for the target storage location, acquire an image of the target storage location as an image to be identified.
[0043] In this embodiment, the detection command can be triggered by relevant personnel according to actual needs.
[0044] In this embodiment, images of the warehouse site can be collected using industrial cameras, mobile terminal cameras, or machine vision devices as the images to be identified.
[0045] Specifically, the images collected can include images of goods on shelves, images of storage location labels, images of pallets, etc. Supported image formats include common formats such as JPEG, PNG, and BMP, and supported image file extensions include .jpg, .jpeg, .png, .bmp, and their uppercase forms. The collected raw images will be used as input for subsequent recognition processing.
[0046] Unlike traditional deep learning methods that require collecting hundreds to thousands of labeled images for each category, this embodiment only requires 1 to 5 sample images for each category to achieve effective recognition, which greatly reduces the cost of data collection and labeling.
[0047] In the API (Application Programming Interface) service implementation of this embodiment, uploaded image files can be received through the HTTP (Hypertext Transfer Protocol) request interface. The maximum size of a single file is a configurable parameter, such as 10MB.
[0048] In this embodiment, in order to improve image quality, the image to be identified also needs to be preprocessed.
[0049] Specifically, after acquiring the image of the target warehouse location as the image to be identified, the method further includes:
[0050] The image to be identified is converted to a specified resolution to obtain the current image;
[0051] Convert the current image into a tensor representation to obtain the current tensor;
[0052] Collect image samples of the target warehouse storage location;
[0053] Calculate the channel-level mean vector and the channel-level standard deviation vector based on the image samples;
[0054] For each pixel in the current tensor, calculate the difference between the pixel and the channel-level mean vector, and calculate the quotient of the difference and the channel-level standard deviation vector to obtain the standard pixel value corresponding to the pixel.
[0055] For example, preprocessing operations may include:
[0056] (1) Size normalization: Adjust the size of the original image to a fixed resolution of H×W. H and W are both configurable parameters, with a default value of 224×224. Bilinear interpolation can be used for scaling to maintain the smoothness of the image content;
[0057] (2) Tensor conversion: Convert the image from PIL (Python Imaging Library) format to PyTorch (an open-source deep learning computing framework) tensor format, and convert the pixel values from the integer range of [0,255] to the floating-point range of [0.0,1.0].
[0058] (3) Pixel value normalization: Normalization is performed on a channel-by-channel basis. The calculation formula is as follows:
[0059] ;
[0060] in, represents the normalized pixel value; 'c' represents the color channel (R, G, B). This represents the original pixel value of that channel. and These are the mean vector and standard deviation vector for each channel, respectively. Both the mean and standard deviation vectors are configurable parameters, and users can customize them according to the statistical characteristics of the data in a specific warehousing scenario. When using ImageNet (a large-scale image classification benchmark dataset) to pre-train weights, it is recommended to use the statistical values from the ImageNet dataset as the default parameters, i.e., the mean vector for each channel μ = [0.485, 0.456, 0.406], and the standard deviation vector for each channel σ = [0.229, 0.224, 0.225].
[0061] During the training phase, to enhance the robustness of the model, data augmentation operations can be applied to the preprocessed images. Specific augmentation strategies include: random horizontal flipping (probability 0.5), random rotation (rotation angle range [-R, R] degrees, where R is a configurable parameter), random color jitter (brightness, contrast, and saturation changes are all configurable parameters), and random cropping. These data augmentation strategies are specifically optimized for the uneven lighting and variable shooting angles characteristic of warehouse environments.
[0062] S11, obtain a feature extraction network including a pre-trained backbone network and a feature mapping layer, and use the feature extraction network to extract features from the image to be identified to obtain a query feature vector.
[0063] In this embodiment, the backbone network is a configurable component, supporting classic convolutional neural network architectures such as ResNet18 (Residual Network 18, 18-layer residual network), ResNet34 (Residual Network 34, 34-layer residual network), ResNet50 (Residual Network 50, 50-layer residual network), EfficientNet-B0 (Efficient Network-B0, Level 0 efficient convolutional network), EfficientNet-B1 (Efficient Network-B1, Level 1 efficient convolutional network), MobileNetV3-Small (Mobile Network V3-Small, third-generation small mobile network), and MobileNetV3-Large (Mobile Network V3-Large, third-generation large mobile network). These networks can all be pre-trained on large-scale datasets such as ImageNet and possess excellent image feature extraction capabilities.
[0064] Pre-training refers to pre-training a model on a large-scale general dataset to learn general visual feature representation capabilities, which can then be transferred to tasks in specific domains. The selection of the backbone network is a configurable parameter, which users can choose based on the computational resource constraints of the deployment environment. After loading the pre-trained weights, the backbone network can selectively freeze the parameters of the first few layers to accelerate training convergence; the number of frozen layers is a configurable parameter. The output calculation process of the backbone network can be represented as follows:
[0065] ;
[0066] Where, x norm This represents the preprocessed input image tensor with dimensions [B, 3, H, W], where B is the batch size, Backbone(·) represents the forward computation of the backbone network, and h represents the feature vector output by the backbone network with dimensions [B, 3, H, W]. , It depends on the structure of the selected backbone network.
[0067] In this embodiment, before obtaining the feature extraction network including the pre-trained backbone network and feature mapping layer, the method further includes:
[0068] A training dataset is constructed based on images of all categories of goods corresponding to the target storage location;
[0069] Meta-task sampling is performed on the training dataset to obtain each meta-training round; wherein each meta-training round includes a first number of randomly selected categories, each category includes a second number of randomly selected support samples and a third number of randomly selected query feature vectors, wherein the support samples and the query feature vectors do not overlap;
[0070] For each meta-training round, perform forward computation;
[0071] During the forward computation, the cross-entropy loss function is used to calculate the loss between the predicted probability and the true label, and the network parameters are updated through backpropagation and gradient pruning.
[0072] The accuracy of the network during training is verified according to a preset verification frequency, and an early stopping mechanism is used to stop training when the accuracy does not improve for a preset number of consecutive times.
[0073] The network obtained from the current training is identified as the feature extraction network.
[0074] For example, to further improve the generalization ability and inter-class discrimination of the feature extraction network in warehousing scenarios, this embodiment uses an episode-based meta-learning training method to fine-tune the feature extraction network. The training process includes the following steps:
[0075] (1) Constructing the training dataset: Collect images of goods in the warehousing scenario and organize them into a training set according to categories. Each category requires at least K+Q sample images. The directory structure of the dataset is the same as that of the dynamic support set, with each subdirectory corresponding to a category;
[0076] (2) Episode Meta-Task Sampling: The training task is constructed using the Episode sampler. Each training Episode performs the following sampling process: N categories (N-way) are randomly selected from the training dataset, where N is a configurable parameter; for each selected category, K samples are randomly selected as the support set (K-shot) of the Episode, where K is a configurable parameter; additionally, Q non-overlapping samples are randomly selected from the same category as the query set of the Episode, where Q is a configurable parameter, and the default values are N=5, K=5, and Q=15. An Episode (meta-training round) is the basic training unit in meta-learning, and each Episode simulates an independent few-shot classification task. The total number of samples in each Episode is N×(K+Q).
[0077] (3) Forward computation: For each episode, the feature extraction network is used to extract the feature vectors of all samples in the support set and the query set respectively; the support set feature vectors are grouped by category and the mean is calculated to obtain the prototype vectors of N categories; the distance metric between the feature vector of each sample in the query set and the N prototype vectors is calculated; the predicted probability distribution of each query feature vector belonging to each category is obtained by temperature scaling and the Softmax function;
[0078] (4) Loss Calculation and Backpropagation: The cross-entropy loss function is used to calculate the loss between the predicted probabilities and the true labels. The cross-entropy loss function measures the difference between the probability distribution predicted by the model and the true label distribution; the more accurate the prediction, the smaller the loss value. The calculation formula is as follows:
[0079] ;
[0080] in, The cross-entropy loss value is represented by M = N × Q, where Q is the total number of query feature vectors. Let i be the true class label of the i-th query feature vector. Let i be the feature vector of the i-th query feature vector. The model predicts the probability that the sample belongs to the true class.
[0081] The gradient of the loss with respect to the network parameters is calculated through backpropagation, and gradient clipping is performed (the maximum norm is a configurable parameter, defaulting to 1.0). Then, the parameters of the feature extraction network are updated using the optimizer. Gradient clipping refers to proportionally reducing the gradient when the L2 norm of the gradient vector exceeds a set threshold, preventing training instability caused by gradient explosion. The optimizer type is configurable and supports Adam (an adaptive learning rate optimization algorithm), AdamW (an Adam variant with weight decay correction), and SGD (Stochastic Gradient Descent). The learning rate is a configurable parameter, defaulting to 0.001; the weight decay coefficient (used to apply L2 regularization constraints to the model parameters to prevent overfitting) is also a configurable parameter, defaulting to 0.0001.
[0082] (5) Learning Rate Scheduling: During training, a learning rate scheduling strategy is used to dynamically adjust the learning rate, enabling the model to converge quickly in the early stages of training and finely adjust it in the later stages. Supported scheduling strategies include: StepLR (i.e., the learning rate is multiplied by a decay factor every fixed number of episodes), Cosine AnnealingLR (i.e., the learning rate gradually decays from the initial value to near zero and then rises again according to a cosine curve, with periodic adjustments), and ReduceLROnPlateau (i.e., the learning rate is automatically reduced when the validation accuracy stagnates). The scheduling strategy type and its parameters are all configurable.
[0083] (6) Validation and Early Stopping: The model is evaluated using an independent validation episode according to the preset validation frequency (configurable parameter, default is once every 500 episodes). The evaluation process is the same as the forward computation, but gradient updates are not performed.
[0084] Early stopping mechanism is adopted: if the validation accuracy does not exceed the historical best value for 10 consecutive periods (configurable parameter, default is 10), the training is terminated early to avoid model overfitting.
[0085] During training, the model parameters with the highest validation accuracy are saved as the optimal model.
[0086] (7) After training is complete, output the parameter file of the optimal model. This parameter file contains all the weights and training state information of the feature extraction network, which can be used for subsequent inference deployment. The total number of training episodes is a configurable parameter, with a default value of 10,000.
[0087] The feature extraction network trained by the above meta-learning method can better capture the distinguishing features of warehouse goods compared to the backbone network that only uses ImageNet pre-trained weights. The extracted feature vectors are more clustered within the same category and more separated between different categories, thereby further improving the accuracy of few-sample recognition.
[0088] It should be noted that the above embodiments describe in detail the preferred implementation of meta-learning using Prototypical Networks, but the technical framework of the present invention is not limited thereto. In other embodiments, the meta-learning strategy may also employ Model-Agnostic Meta-Learning (MAML) methods, which learn a set of model initialization parameters sensitive to new tasks, enabling the model to quickly adapt to new goods category recognition tasks within a few gradient update steps; or employ Matching Networks methods, which calculate the matching degree between the query feature vector and the supporting samples through an attention mechanism. All of the above-mentioned different meta-learning strategies can achieve few-sample recognition of warehouse goods within the technical framework of the present invention and fall within the scope of protection of the present invention.
[0089] In this embodiment, the feature mapping layer includes a first fully connected layer, a batch normalization layer, a modified linear unit activation function layer, a random deactivation layer, and a second fully connected layer, which are connected end to end in sequence.
[0090] Specifically, the feature mapping layer is used to map the output of the backbone network to a unified target feature dimension, and its structure consists of the following modules in sequence:
[0091] (1) First fully connected layer (FC1): Outputs the feature dimension from the backbone network. Mapped to the target feature dimension d, where the target feature dimension d is a configurable parameter with a default value of 512;
[0092] (2) Batch Normalization Layer (BatchNorm1d): Normalizes each dimension of the features to accelerate training convergence and improve model stability;
[0093] (3) Modified linear unit activation function layer (ReLU activation function layer): Introduce nonlinear transformation, the formula is as follows ;
[0094] (4) Random deactivation layer (Dropout layer): Randomly sets some features to zero with probability p to prevent overfitting. p is a configurable parameter with a default value of 0.2;
[0095] (5) Second fully connected layer (FC2): Further refine the feature representation, and the output dimension is also d.
[0096] The overall calculation process of the feature mapping layer can be represented as follows:
[0097] ;
[0098] Where h is the high-dimensional feature vector output by the backbone network. , , This is the weight matrix of the first fully connected layer. b1 and b2 are the corresponding bias vectors, BN(·) represents batch normalization, Dropout(·,p) represents random zeroing with probability p, and f is the mapped feature vector with dimension [B,d].
[0099] Finally, the mapped feature vectors are subjected to L2 normalization to ensure that they lie on the unit hypersphere (i.e., the sphere formed by all vectors with a magnitude of 1), which facilitates subsequent distance calculations. The formula is as follows:
[0100] ;
[0101] Where q is the normalized query feature vector. Let q represent the L2 norm of the j-th dimension vector f. After L2 normalization, the magnitude of q is 1, i.e. This normalization operation is particularly important for subsequent distance measurement using cosine similarity, because the inner product of two unit vectors is the cosine of the angle between them.
[0102] In this embodiment, the step of using the feature extraction network to extract features from the image to be identified to obtain a query feature vector includes:
[0103] The backbone network is used to extract convolutional features from the image to be identified, resulting in a high-dimensional feature representation.
[0104] The high-dimensional feature representation is projected using the feature mapping layer to obtain a feature vector of the target dimension.
[0105] The feature vector of the target dimension is subjected to L2 normalization to obtain the query feature vector.
[0106] Through the above embodiments, high-dimensional semantic features of images can be extracted using a backbone network, retaining core discriminative information such as cargo location identification and cargo shape. Furthermore, by mapping the backbone output to a fixed-dimensional vector through a feature mapping layer, the consistency between the query features and the support set features is ensured, providing a foundation for subsequent distance measurement. Simultaneously, the transformation from raw pixels to structured feature vectors is achieved, reducing data redundancy and highlighting the discriminative features of cargo locations.
[0107] S12, load the support sample images of each category from the dynamic support set of small samples, and extract the feature vectors of the support sample images of each category through the feature extraction network.
[0108] In this embodiment, the dynamic support set is a core component of the prototype network, storing sample images of all product categories that need to be identified. The dynamic support set is organized using a file system directory structure, where each subdirectory corresponds to a product category, and the subdirectory name is the product category name. The directory stores the supporting sample image files for that product category.
[0109] When loading the dynamic support set through the support set manager, the following operations are performed sequentially: traverse all non-hidden subdirectories under the root directory of the dynamic support set, recording each subdirectory name as a category name; preprocess the image files within each category directory; and extract the feature vector of each support sample from the preprocessed images using the feature extraction network. In practical applications, it is recommended that the number of support samples for each category be 5 to 10, including samples from different angles and under different lighting conditions to enhance representativeness.
[0110] In the above embodiments, the small sample characteristics of the dynamic support set are adapted to scenarios with few samples, and the category prototype can be constructed without a large amount of labeled data. Furthermore, the dynamic support set supports the addition of new categories without retraining the model; only supplementary support samples are needed to expand the recognition capability.
[0111] S13, Based on the meta-learning strategy, the feature vectors of the supporting sample images of each category are aggregated to obtain the category representative vector of each category.
[0112] In this embodiment, the aggregation of feature vectors of support sample images for each category based on the meta-learning strategy to obtain category representative vectors for each category includes:
[0113] Calculate the mean of the feature vectors of the supporting sample images for each category to obtain the category representative vector for each category.
[0114] Within this framework, supporting samples of the same category tend to cluster in the feature space, while samples from different categories are separated from each other. The category representative vector for each category is located at the center of its respective category sample cluster.
[0115] In this embodiment, the category representative vectors for each product category are cached after calculation to avoid repeated calculations for each identification request, thereby improving system response speed.
[0116] One approach is to use a delayed computation strategy for caching: the prototype computation is triggered and the result is cached when the first identification request is made, and subsequent requests can directly use the cached prototype vectors (i.e., category representative vectors for each product category). When the dynamic support set changes, the original cache can be cleared and all prototypes can be recalculated for the next identification request.
[0117] In the above embodiments, meta-learning strategies (such as prototype networks) generate category centers through mean aggregation, effectively utilizing a small number of samples to represent the overall distribution of categories. Using the category representative vector as the unique anchor point for each category in the feature space simplifies the classification logic and avoids complex fully connected layer designs. Furthermore, it enhances the model's generalization ability to new categories, enabling it to quickly learn the distribution characteristics of unknown categories, meeting the needs of dynamically changing categories in warehousing scenarios.
[0118] S14, calculate the distance metric between the query feature vector and the category representative vector of each product category.
[0119] In this embodiment, the distance metric is used to measure the similarity between the query feature vector and the category representative vector of each product category.
[0120] For example, Euclidean distance or cosine similarity can be used as the distance metric. The distance metric is a configurable parameter and can be selected according to the actual scenario.
[0121] (1) Euclidean distance: Calculates the straight-line distance between feature vectors in Euclidean space. Query the feature vector q and the c-th category prototype vector p. c The formula for calculating the Euclidean distance between them is:
[0122] ;
[0123] In the program implementation, the calculation of Euclidean distance can be performed in batches: matrix operations are used to calculate the distance matrix between all query feature vectors and all prototypes at once, thereby significantly improving computational efficiency.
[0124] (2) Cosine similarity: Calculate the cosine value of the angle between the feature vectors. Since the feature vectors in this embodiment have been L2 normalized (i.e., Cosine similarity can be simplified to the following vector inner product form:
[0125] ;
[0126] Where d is the dimension of the feature vector (configurable), q j and p j c These represent the components of the query feature vector and the prototype vector in the j-th dimension, respectively.
[0127] Specifically, Euclidean distance is suitable for scenarios with low feature dimensionality and isotropic feature distribution; cosine similarity is more stable in high-dimensional spaces, less sensitive to changes in feature amplitude, and more suitable for feature spaces after L2 normalization.
[0128] In the above embodiments, a distance metric is used instead of a traditional classification layer, which can directly measure the similarity between the query feature vector and known categories. The distance result intuitively reflects the sample's belonging tendency, providing an interpretable similarity basis for subsequent probability transformation. At the same time, it can avoid the overfitting problem of parameterized classifiers, and is more stable, especially in small sample scenarios.
[0129] S15, scale each distance metric value based on the temperature parameter to obtain the scaled distance, and convert the scaled distance into a probability distribution.
[0130] In this embodiment, the temperature parameter τ is a key hyperparameter for controlling the sharpness of the probability distribution.
[0131] First, the distance metric values are converted into scaled logits (i.e., the unnormalized raw scores obtained after scaling by distance metric and temperature, which are used as input to the Softmax function for probability transformation):
[0132] When using Euclidean distance, since a smaller distance indicates greater similarity, the distance should be negative and then divided by the temperature parameter.
[0133] ;
[0134] When using cosine similarity, a higher similarity value indicates greater similarity; this is directly calculated by dividing by the temperature parameter.
[0135] ;
[0136] Then, the scaled logical value is processed using the Softmax function. This transforms the vector into a normalized probability distribution. The Softmax function is a standard function that transforms any real vector into a probability distribution, where each component of the output is non-negative and the sum of all components is 1. The calculation formula is:
[0137] ;
[0138] Where C represents the total number of product categories, and P(y=c|q) represents the probability that the query feature vector belongs to the c-th product category, satisfying the condition that the sum of the probabilities of all product categories is 1. The temperature parameter τ is a configurable parameter, ranging from 0.01 to 1.0, with a recommended value of 0.05 to 0.2, where 0.1 is a commonly used default value. The smaller the value of τ, the more concentrated the probability distribution of the Softmax output is on the nearest product category, resulting in higher confidence but lower fault tolerance; the larger the value of τ, the smoother the probability distribution, suitable for scenarios where the distinction between product categories is small.
[0139] In the above embodiments, the temperature parameter is an adjustable probability distribution sharpness: high temperature makes the distribution smoother and enhances robustness; low temperature makes the distribution sharper, thereby highlighting the high confidence category.
[0140] The distance metric is converted into a Softmax probability distribution, and the result is normalized to the [0,1] interval, which facilitates the subsequent determination of the confidence threshold.
[0141] At the same time, it provides a probabilistic basis for the detection of unknown categories, which can avoid forcibly classifying ambiguous samples.
[0142] S16, Generate the detection result of the target storage location based on the probability distribution and confidence threshold.
[0143] In this embodiment, generating the detection result of the target storage location based on the probability distribution and confidence threshold includes:
[0144] The category with the highest probability is selected from the probability distribution as the candidate predicted category, and the probability value of the candidate predicted category is determined as the identification confidence level.
[0145] Obtain the distance metric between the query feature vector and the candidate predicted category as the target distance metric;
[0146] When the identification confidence level is less than the confidence threshold, or the target distance metric exceeds the valid metric range, the detection result is determined to be an unknown goods category; or
[0147] When the identification confidence level is greater than or equal to the confidence threshold, and the target distance metric falls within the range of the valid metric values, the detection result is determined to be the candidate predicted category.
[0148] Specifically, the final identification result needs to be determined by comprehensively considering the probability distribution, confidence threshold, and distance threshold. The specific judgment logic is as follows:
[0149] (1) Obtain the category c* with the highest probability from the probability distribution as the candidate predicted category, where the argmax function represents taking the parameter value that maximizes the objective function value:
[0150] ;
[0151] Simultaneously, the highest probability category and its probability value are obtained within a preset number for user reference, such as 3 categories. The preset number refers to the result of selecting the first preset item after arranging the items by probability value from highest to lowest.
[0152] (2) The maximum probability value P(y=c*|q) is used as the recognition confidence level conf;
[0153] (3) Calculate the original distance between the query feature vector and the candidate predicted category prototype vector;
[0154] (4) Determine the recognition result based on the following conditions:
[0155] When using Euclidean distance, if the identification confidence conf < confidence threshold θ_conf or Euclidean distance d(q,p^{c*}) > Euclidean distance threshold θ_dist, the detection result will be marked as "unknown goods category".
[0156] When using cosine similarity, if the recognition confidence conf < confidence threshold θ_conf or cosine similarity sim(q, p^{c*}) < cosine similarity threshold θ_sim, the detection result will be marked as "unknown goods category".
[0157] Otherwise, output the candidate predicted category c* as the final detection result.
[0158] Wherein, θ_conf is the confidence threshold, a configurable parameter with a value range of 0 to 1 and a default value of 0.6; θ_dist is the Euclidean distance threshold, a configurable parameter with a default value of 1.2; and θ_sim is the cosine similarity threshold, a configurable parameter with a default value of 0.5.
[0159] By employing both confidence level and distance constraints, it can effectively identify unknown items that are not within the known category range, avoiding the forced classification of unknown items into a known category, thereby improving reliability and practicality in real-world warehousing scenarios. Furthermore, it enhances detection robustness, adapting to complex warehousing scenarios such as blurred location markings, camera angle deviations, and lighting variations.
[0160] The detection results can simultaneously include information such as the predicted category name, confidence level value, whether it is an unknown item, and a predicted list of pre-set quantities, which facilitates subsequent processing by downstream systems and manual verification.
[0161] This embodiment can quickly register new product categories during operation without retraining the model.
[0162] Specifically, after generating the detection result of the target storage location based on the probability distribution and confidence threshold, the method further includes:
[0163] When a new product category is detected, obtain the name of the new product category and the corresponding supporting sample image;
[0164] Check whether the new product category has been written into the dynamic support set;
[0165] When the new product category has been written into the dynamic support set, the support sample images corresponding to the new product category are incrementally updated to the support set subdirectory corresponding to the new product category in the dynamic support set; or
[0166] When the new product category is not written into the dynamic support set, a new subdirectory named after the new product category is created in the dynamic support set, and the support sample image corresponding to the new product category is stored in the new subdirectory.
[0167] Reload the updated dynamic support set and update the category representative vectors for each category in the dynamic support set.
[0168] For example, the specific steps include:
[0169] (1) In response to a new category registration request, receive the new category name and the corresponding supporting sample images. Each category typically requires 1 to 5 representative sample images, which can include samples from different angles and under different lighting conditions to enhance the representativeness of the prototype vector;
[0170] (2) Determine whether the new category name already exists in the dynamic support set. If the category already exists, append the new support sample image to the subdirectory of the category to expand the support sample set of the existing category; if the category does not exist, create a new subdirectory named after the category name and store the support sample image in the subdirectory.
[0171] (3) Reload the dynamic support set and use the feature extraction network to extract the feature vectors of each support sample;
[0172] (4) Clear the existing prototype vector cache, recalculate the prototype vectors of all categories including the new category, and cache them. The newly registered category will take effect immediately and can be used for subsequent identification.
[0173] Furthermore, this embodiment also supports deleting existing product categories. When a product category deletion request is received, the corresponding product category record and image data can be removed from the dynamic support set, the prototype vector cache can be cleared simultaneously, and a recalculation can be triggered.
[0174] The aforementioned dynamic registration and deletion mechanism allows new product categories to be identified by the system in just a few minutes from the time a sample is taken, greatly improving the system's responsiveness to business changes.
[0175] The aforementioned dynamic registration and deletion mechanism, combined with the low annotation requirements of few-sample learning, reduces the overall deployment cost by more than an order of magnitude compared to traditional deep learning solutions. Traditional solutions require professional annotators to annotate hundreds of samples for each category (typically 200 to 500 samples per person per day), and each category change requires retraining the model (typically several hours to several days). In contrast, this embodiment only requires warehouse staff to take a few sample photos with a mobile terminal, which can complete the registration of new categories in minutes, achieving true cost reduction and efficiency improvement.
[0176] This embodiment achieves efficient detection of warehouse goods and storage locations through a few-shot learning mechanism within a meta-learning framework, combined with dynamic support set management, temperature parameter adjustment, dual threshold judgment based on confidence and distance, and episode-based meta-learning training. Key parameters in this embodiment (including backbone network type, feature dimension, Dropout probability, temperature parameter, confidence threshold, distance threshold, and training hyperparameters) are all configurable and can be flexibly adjusted according to the specific needs of the warehousing scenario. Compared with traditional deep learning methods, this embodiment has significant advantages such as low annotation cost (only 5 to 10 samples per category, reducing cost by more than two orders of magnitude), fast registration of new categories (deployment within minutes, no need to retrain the model), strong adaptability (supporting dynamic addition and deletion of categories during operation), and support for unknown item detection (dual constraint mechanism of confidence and distance). While ensuring detection accuracy, it significantly reduces system deployment and maintenance costs, providing effective technical support for cost reduction and efficiency improvement in warehousing logistics.
[0177] As can be seen from the above technical solutions, this invention can acquire a feature extraction network including a pre-trained backbone network and a feature mapping layer, and use the feature extraction network to extract features from the image to be identified, realizing the transformation from raw pixels to structured feature vectors, reducing data redundancy, and highlighting the distinguishing features of the storage location; through a dynamic support set, it can support low-cost detection in small sample scenarios and rapid iteration of new categories; based on the meta-learning strategy, it aggregates the feature vectors of the support sample images of each category, which can effectively use a small number of samples to represent the overall distribution of the category; and generates the detection results of the target storage location according to the probability distribution and confidence threshold, which can effectively filter low-confidence and low-similarity samples based on dual constraints, thereby improving the detection accuracy.
[0178] like Figure 2The diagram shown is a functional block diagram of a preferred embodiment of the warehouse location detection device based on meta-learning of the present invention. The warehouse location detection device 11 based on meta-learning includes a data acquisition unit 110, an extraction unit 111, an aggregation unit 112, a calculation unit 113, a scaling unit 114, and a generation unit 115. The module / unit referred to in this invention refers to a series of computer program segments that can be executed by a processor and perform a fixed function, and are stored in memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0179] The acquisition unit 110 is used to acquire an image of the target storage location as an image to be identified in response to a detection command for the target storage location.
[0180] The extraction unit 111 is used to obtain a feature extraction network including a pre-trained backbone network and a feature mapping layer, and to use the feature extraction network to extract features from the image to be identified to obtain a query feature vector.
[0181] The extraction unit 111 is also used to load support sample images of each category from the dynamic support set of small samples, and extract feature vectors of support sample images of each category through the feature extraction network.
[0182] The aggregation unit 112 is used to aggregate the feature vectors of the supporting sample images of each category based on the meta-learning strategy to obtain the category representative vector of each category.
[0183] The calculation unit 113 is used to calculate the distance metric between the query feature vector and the category representative vector of each product category;
[0184] The scaling unit 114 is used to scale each distance metric value based on the temperature parameter to obtain a scaled distance, and convert the scaled distance into a probability distribution;
[0185] The generation unit 115 is used to generate the detection result of the target storage location based on the probability distribution and confidence threshold.
[0186] As can be seen from the above technical solutions, this invention can acquire a feature extraction network including a pre-trained backbone network and a feature mapping layer, and use the feature extraction network to extract features from the image to be identified, realizing the transformation from raw pixels to structured feature vectors, reducing data redundancy, and highlighting the distinguishing features of the storage location; through a dynamic support set, it can support low-cost detection in small sample scenarios and rapid iteration of new categories; based on the meta-learning strategy, it aggregates the feature vectors of the support sample images of each category, which can effectively use a small number of samples to represent the overall distribution of the category; and generates the detection results of the target storage location according to the probability distribution and confidence threshold, which can effectively filter low-confidence and low-similarity samples based on dual constraints, thereby improving the detection accuracy.
[0187] like Figure 3 The diagram shown is a schematic representation of the computer device used to implement the meta-learning-based warehouse location detection method of the present invention.
[0188] The computer device 1 may include a memory 12, a processor 13, and a bus (the arrow in the figure represents the bus), and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a warehouse location detection program based on meta-learning.
[0189] Those skilled in the art will understand that the schematic diagram is merely an example of computer device 1 and does not constitute a limitation on computer device 1. Computer device 1 can be either a bus topology or a star topology. Computer device 1 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, computer device 1 may also include input / output devices, network access devices, etc.
[0190] It should be noted that the computer device 1 described is merely an example. Other existing or future electronic products that are adaptable to this invention should also be included within the scope of protection of this invention and are incorporated herein by reference.
[0191] The memory 12 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a portable hard drive of the computer device 1. In other embodiments, the memory 12 can be an external storage device of the computer device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 1. Furthermore, the memory 12 can include both internal and external storage units of the computer device 1. The memory 12 can be used not only to store application software and various types of data installed on the computer device 1, such as the code of a warehouse location detection program based on meta-learning, but also to temporarily store data that has been output or will be output.
[0192] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the computer device 1, connecting various components of the computer device 1 via various interfaces and lines. It executes programs or modules stored in the memory 12 (e.g., executing a meta-learning-based warehouse location detection program) and calls data stored in the memory 12 to perform various functions of the computer device 1 and process data.
[0193] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes these applications to implement the steps in the various embodiments of the meta-learning-based warehouse location detection method described above, for example... Figure 1 The steps are shown.
[0194] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, which describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a collection unit 110, an extraction unit 111, an aggregation unit 112, a calculation unit 113, a scaling unit 114, and a generation unit 115.
[0195] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the meta-learning-based warehouse location detection method described in the various embodiments of this invention.
[0196] If the modules / units integrated in the computer device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.
[0197] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.
[0198] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.
[0199] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0200] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 3 The bus is represented by only one straight line, but this does not mean that there is only one bus or one type of bus. The bus is configured to enable communication between the memory 12 and at least one processor 13, etc.
[0201] Although not shown, the computer device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 13 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0202] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the computer device 1 and other computer devices.
[0203] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the computer device 1 and to display a visual user interface.
[0204] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0205] It will be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0206] Combination Figure 1 The memory 12 in the computer device 1 stores multiple instructions to implement a warehouse location detection method based on meta-learning, and the processor 13 can execute the multiple instructions to achieve the following:
[0207] In response to a detection command for a target storage location, an image of the target storage location is acquired as an image to be identified;
[0208] A feature extraction network, including a pre-trained backbone network and a feature mapping layer, is obtained, and the feature extraction network is used to extract features from the image to be identified to obtain a query feature vector.
[0209] Support sample images of each category are loaded from the dynamic support set of small samples, and feature vectors of each category's support sample images are extracted through the feature extraction network.
[0210] Based on the meta-learning strategy, the feature vectors of the supporting sample images of each category are aggregated to obtain the category representative vector of each category;
[0211] Calculate the distance metric between the query feature vector and the category representative vector of each product category;
[0212] The scaled distance is obtained by scaling each distance metric value based on the temperature parameter, and the scaled distance is then converted into a probability distribution.
[0213] The detection results for the target storage location are generated based on the probability distribution and confidence threshold.
[0214] Specifically, the processor 13's implementation method for the above instructions can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0215] It should be noted that all the data involved in this case was legally obtained.
[0216] If any AI models, software tools, or components not belonging to this company appear in the embodiments of this invention, they are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this invention has been obtained by an entity authorized (with the knowledge and consent) or fully authorized by all parties through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0217] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0218] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0219] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0220] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0221] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0222] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0223] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this invention can also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0224] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A warehouse location detection method based on meta-learning, characterized in that, The meta-learning-based warehouse location detection method includes: In response to a detection command for a target storage location, an image of the target storage location is acquired as an image to be identified; A feature extraction network, including a pre-trained backbone network and a feature mapping layer, is obtained, and the feature extraction network is used to extract features from the image to be identified to obtain a query feature vector. Support sample images of each category are loaded from the dynamic support set of small samples, and feature vectors of each category's support sample images are extracted through the feature extraction network. Based on the meta-learning strategy, the feature vectors of the supporting sample images of each category are aggregated to obtain the category representative vector of each category; Calculate the distance metric between the query feature vector and the category representative vector of each product category; The scaled distance is obtained by scaling each distance metric value based on the temperature parameter, and the scaled distance is then converted into a probability distribution. The detection results for the target storage location are generated based on the probability distribution and confidence threshold. The images to be identified include images of goods on shelves, images of storage location labels, and images of pallets; the feature mapping layer includes a first fully connected layer, a batch normalization layer, a modified linear unit activation function layer, a random deactivation layer, and a second fully connected layer connected sequentially.
2. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, After acquiring the image of the target warehouse location as the image to be identified, the method further includes: The image to be identified is converted to a specified resolution to obtain the current image; Convert the current image into a tensor representation to obtain the current tensor; Collect image samples of the target warehouse storage location; Calculate the channel-level mean vector and the channel-level standard deviation vector based on the image samples; For each pixel in the current tensor, calculate the difference between the pixel and the channel-level mean vector, and calculate the quotient of the difference and the channel-level standard deviation vector to obtain the standard pixel value corresponding to the pixel.
3. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, Before acquiring the feature extraction network including the pre-trained backbone network and feature mapping layer, the method further includes: A training dataset is constructed based on images of all categories of goods corresponding to the target storage location; Meta-task sampling is performed on the training dataset to obtain each meta-training round; wherein each meta-training round includes a first number of randomly selected categories, each category includes a second number of randomly selected support samples and a third number of randomly selected query feature vectors, wherein the support samples and the query feature vectors do not overlap; For each meta-training round, perform forward computation; During the forward computation, the cross-entropy loss function is used to calculate the loss between the predicted probability and the true label, and the network parameters are updated through backpropagation and gradient pruning. The accuracy of the network during training is verified according to a preset verification frequency, and an early stopping mechanism is used to stop training when the accuracy does not improve for a preset number of consecutive times. The network obtained from the current training is identified as the feature extraction network.
4. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, The feature mapping layer includes a first fully connected layer, a batch normalization layer, a modified linear unit activation function layer, a random deactivation layer, and a second fully connected layer connected sequentially. The step of using the feature extraction network to extract features from the image to be identified, obtaining a query feature vector, includes: The backbone network is used to extract convolutional features from the image to be identified, resulting in a high-dimensional feature representation. The high-dimensional feature representation is projected using the feature mapping layer to obtain a feature vector of the target dimension. The feature vector of the target dimension is subjected to L2 normalization to obtain the query feature vector.
5. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, The meta-learning strategy aggregates the feature vectors of the supporting sample images for each category to obtain the category representative vectors for each category, including: Calculate the mean of the feature vectors of the supporting sample images for each category to obtain the category representative vector for each category.
6. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, The step of generating the detection result for the target storage location based on the probability distribution and confidence threshold includes: The category with the highest probability is selected from the probability distribution as the candidate predicted category, and the probability value of the candidate predicted category is determined as the identification confidence level. Obtain the distance metric between the query feature vector and the candidate predicted category as the target distance metric; When the identification confidence level is less than the confidence threshold, or the target distance metric exceeds the valid metric range, the detection result is determined to be an unknown goods category; or When the identification confidence level is greater than or equal to the confidence threshold, and the target distance metric falls within the range of the valid metric values, the detection result is determined to be the candidate predicted category.
7. The warehouse location detection method based on meta-learning as described in claim 1, characterized in that, After generating the detection result of the target storage location based on the probability distribution and confidence threshold, the method further includes: When a new product category is detected, obtain the name of the new product category and the corresponding supporting sample image; Check whether the new product category has been written into the dynamic support set; When the new product category has been written into the dynamic support set, the support sample images corresponding to the new product category are incrementally updated to the support set subdirectory corresponding to the new product category in the dynamic support set; or When the new product category is not written into the dynamic support set, a new subdirectory named after the new product category is created in the dynamic support set, and the support sample image corresponding to the new product category is stored in the new subdirectory. Reload the updated dynamic support set and update the category representative vectors for each category in the dynamic support set.
8. A warehouse location detection device based on meta-learning, characterized in that, The meta-learning-based warehouse location detection device includes: The acquisition unit is used to acquire an image of the target storage location as an image to be identified in response to a detection command for the target storage location; The extraction unit is used to acquire a feature extraction network including a pre-trained backbone network and a feature mapping layer, and to use the feature extraction network to extract features from the image to be identified to obtain a query feature vector. The extraction unit is also used to load support sample images of each category from the dynamic support set of small samples, and extract the feature vectors of the support sample images of each category through the feature extraction network. The aggregation unit is used to aggregate the feature vectors of the supporting sample images of each category based on the meta-learning strategy to obtain the category representative vector of each category. The calculation unit is used to calculate the distance metric between the query feature vector and the category representative vector of each product category; The scaling unit is used to scale each distance metric value based on the temperature parameter to obtain a scaled distance, and to convert the scaled distance into a probability distribution; A generation unit is used to generate the detection results of the target storage location based on the probability distribution and confidence threshold. The images to be identified include images of goods on shelves, images of storage location labels, and images of pallets; the feature mapping layer includes a first fully connected layer, a batch normalization layer, a modified linear unit activation function layer, a random deactivation layer, and a second fully connected layer connected sequentially.
9. A computer device, characterized in that, The computer device includes: A memory for storing at least one instruction; and a processor for executing the instructions stored in the memory to implement the meta-learning-based warehouse location detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, which is executed by a processor in a computer device to implement the meta-learning-based warehouse location detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Bearing steel open set classification system and method based on differential pulsed eddy current and double-branch network
CN121071655A
Unknown protocol identification method based on comparative learning
CN121151080A