Model training method and device based on label-free sample, equipment and storage medium

By using an unlabeled sample training method, and leveraging augmented view processing and pre-defined features to determine the model, the dependence of traditional supervised learning on labeled data is resolved. This enables efficient training and cross-task adaptation of the model in unlabeled images, improving the model's generalization ability and deployment efficiency.

CN121837831AInactive Publication Date: 2026-04-10SHANGHAI MEDICAL IMAGE INSIGHTS INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI MEDICAL IMAGE INSIGHTS INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-03-12
Publication Date
2026-04-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies rely on high-cost manually labeled datasets for model training, which limits the generalization ability of the models, makes it impossible to effectively utilize unlabeled image data, and makes downstream task deployment cumbersome, thus hindering the popularization of artificial intelligence in multiple scenarios.

Method used

By acquiring unlabeled sample images, performing augmented view processing to construct multiple training images, using preset features to determine the model for training, and constructing a target feature determination model when the convergence condition is met, adapting to different downstream tasks.

Benefits of technology

It enables the learning of visual features from massive amounts of unlabeled images without manual annotation, improving the model's generalization ability and cross-task adaptability, reducing training costs, and supporting low-cost, highly adaptive intelligent vision systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837831A_ABST
    Figure CN121837831A_ABST
Patent Text Reader

Abstract

The invention discloses a model training method and device based on unlabeled samples, equipment and a storage medium. The method comprises the steps that an original sample image used for model training is acquired, and the original sample image is an image without a data label; performing enhanced view processing on the original sample image, and constructing a plurality of sample training images of different views; and performing model training according to a pre-constructed preset feature determination model and the sample training image, and when a preset convergence condition is satisfied, determining that the training of the preset feature determination model is ended. And based on a predetermined model task type, according to the trained preset feature determination model, constructing a target feature determination model corresponding to the model task type. According to the method, the model training task is completed through massive label-free images, and the learned image features are migrated to various downstream tasks of the model, so that the training cost of the model is effectively reduced, and the generalization ability and the cross-task adaptive ability of the model are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neural network model training technology, and in particular to model training methods, apparatus, devices and storage media based on unlabeled samples. Background Technology

[0002] Currently, the mainstream solutions for model training tasks in fields such as image recognition, retrieval, and classification generally rely on supervised learning schemes. These schemes train models based on large-scale, high-quality manually labeled datasets.

[0003] However, data annotation is a labor-intensive task, consuming enormous time and economic costs, constituting a core bottleneck in technological development. Secondly, the performance and generalization ability of models are limited by the scale and quality of the finite labeled data, resulting in the ineffective utilization of massive amounts of unlabeled image data on the internet and in reality, and the unrealized potential of models not being fully realized.

[0004] Finally, at the application deployment level, when faced with new downstream tasks of a trained model, it is usually necessary to collect and label data from scratch and retrain the model. The process is cumbersome and difficult to deploy quickly, which seriously restricts the popularization and application efficiency of artificial intelligence technology in multiple scenarios. Summary of the Invention

[0005] This invention provides a model training method, apparatus, device, and storage medium based on unlabeled samples, which enables the model training task to be completed using massive amounts of unlabeled images, and transfers the learned image features to various downstream tasks of the model, effectively reducing the training cost of the model and significantly improving the model's generalization ability and cross-task adaptability.

[0006] According to one aspect of the present invention, a model training method based on unlabeled samples is provided. The method includes:

[0007] Obtain raw sample images for model training, wherein the raw sample images are unlabeled sample images;

[0008] For each original sample image, the original sample image is subjected to enhanced view processing to construct sample training images with multiple different views;

[0009] The model is trained based on a pre-constructed preset feature determination model and the sample training images. When a preset convergence condition is met, the training of the preset feature determination model is terminated. The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-constructed deep neural network model.

[0010] Based on a predetermined model task type, a model is determined according to preset features after training, and a target feature determination model corresponding to the model task type is constructed.

[0011] According to another aspect of the present invention, a model training apparatus based on unlabeled samples is provided. The apparatus includes:

[0012] The sample image acquisition module is used to acquire raw sample images for model training, wherein the raw sample images are unlabeled sample images;

[0013] The training image acquisition module is used to perform enhanced view processing on each original sample image to construct multiple sample training images with different views.

[0014] The model training execution module is used to train the model based on the pre-built preset features and the sample training images. When the preset convergence condition is met, the training of the preset feature determination model ends. The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-built deep neural network model.

[0015] The feature model construction module is used to determine the model based on the preset features after training, based on the pre-determined model task type, and to construct the target feature determination model corresponding to the model task type.

[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model training method based on unlabeled samples as described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the model training method based on unlabeled samples as described in any embodiment of the present invention.

[0021] The technical solution of this invention involves acquiring original sample images for model training, wherein the original sample images are unlabeled sample images; for each original sample image, the original sample image undergoes augmented view processing to construct multiple sample training images with different views; the model is trained using a pre-constructed preset feature determination model and the sample training images; when a preset convergence condition is met, the preset feature determination model training is considered complete. Based on a pre-determined model task type, the model is determined according to the preset features after training, and a target feature determination model corresponding to the model task type is constructed, solving the problem of heavy dependence on large-scale labeled data and high cost in traditional supervised learning methods. Through a self-supervised contrastive learning paradigm, visual feature representations can be automatically learned from massive unlabeled images without manual annotation, and the learned features can be transferred to various downstream visual tasks such as image classification, retrieval, and object detection, significantly improving the model's generalization ability and cross-task adaptability, laying a key technical foundation for building a low-cost, highly adaptive intelligent vision system.

[0022] 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

[0023] 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.

[0024] Figure 1 This is a flowchart of a model training method based on unlabeled samples according to an embodiment of the present invention;

[0025] Figure 2 This is a flowchart of another model training method based on unlabeled samples provided according to an embodiment of the present invention;

[0026] Figure 3 This is a structural diagram of a model training device based on unlabeled samples according to an embodiment of the present invention;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the model training method based on unlabeled samples according to embodiments of the present invention. Detailed Implementation

[0028] 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.

[0029] 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.

[0030] Figure 1 This is a flowchart illustrating a model training method based on unlabeled samples, provided in an embodiment of the present invention. This embodiment is applicable to situations where unlabeled samples are used to train models. The method can be executed by a model training device based on unlabeled samples, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0031] S101. Obtain the original sample images for model training.

[0032] The original sample image is an unlabeled sample image. Unlabeled means that the image has not been labeled with data.

[0033] The objective of this invention is to automatically learn high-quality, general, and discriminative visual feature representations from large-scale, messy raw image data without manually labeled (unsupervised) samples. By eliminating dependence on labels, the model learns the basic visual features required for various downstream tasks by observing the inherent structure and relationships of the data itself.

[0034] In this invention, the original sample images can refer to the original image data required for training the model. Specifically, the original sample images can be obtained by filtering from a pre-constructed unlabeled image dataset, or by using web-based methods such as image crawling.

[0035] S102. For each original sample image, perform enhanced view processing on the original sample image to construct sample training images with multiple different views.

[0036] Here, the training image can refer to the sample image obtained after performing enhanced view processing on the original sample image. For example, enhanced view processing may include, but is not limited to, cropping, rotation, color jittering, and Gaussian blur.

[0037] Specifically, for each original sample image, an enhanced view processing is performed to construct multiple sample training images with different views. For each enhanced view processing, key parameters should be determined, such as the cropping ratio range (e.g., [0.08, 1.0]), rotation angle range (e.g., [-30°, 30°]), intensity of color jitter (adjustment range of brightness, contrast, saturation, and hue), kernel size and standard deviation of Gaussian blur, and the number of sample training images generated.

[0038] For example, the step of enhancing the view processing of the original sample image to construct multiple sample training images with different views includes: randomly combining various image processing techniques on the original sample image to obtain sample view images from different perspectives. Based on the sample view images, sample training images are constructed.

[0039] Specifically, in addition to utilizing individual enhanced view processing, this invention can also perform enhanced view processing by randomly combining various image processing techniques to obtain sample view images from different perspectives. After obtaining the sample view images, multiple sample view images can be selected as sample training images, or multiple sample training images and the original sample image can be selected as sample training images.

[0040] It should be noted that in this invention, typically two sample view images are generated for each original sample image within the same batch, forming a positive sample pair. The specific number of sample view images generated can be set as needed; this invention only explains the quantity and does not impose a specific limitation on it.

[0041] S103. The model is trained based on the pre-constructed preset features and the sample training images. When the preset convergence condition is met, the training of the preset feature-determined model ends.

[0042] The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-built deep neural network model, such as a convolutional neural network (CNN) or a visual transformer (ViT).

[0043] The core architecture of the feature encoder can be chosen from ResNet-50 and ViT-S / 16, or selected based on actual needs. The core architecture directly determines the model's capacity and computational complexity. The output of the feature encoder is typically a globally pooled feature vector (e.g., 2048-dimensional).

[0044] The projection head is a temporary module, typically implemented using a small multilayer perceptron (MLP). The output dimension of the last layer of the projection head determines the dimension of the projection space in which contrastive learning takes place. The projection space is designed to optimize the contrastive loss and facilitates similarity calculation.

[0045] The feature encoder is connected to the projection head, and the output vector of the encoder is used as the input of the projection head to map the sample training images to a projection space that can be used for contrastive learning.

[0046] Specifically, the sample training images are input into the preset feature determination model for model training. When the preset feature determination model meets the preset convergence conditions (e.g., reaching the preset training rounds or training error convergence), the training of the preset feature determination model is determined to be over.

[0047] S104. Based on the predetermined model task type, determine the model according to the preset features after training, and construct the target feature determination model corresponding to the model task type.

[0048] Here, "model task type" can refer to the type of task required for determining the downstream tasks of the model based on preset features. Downstream tasks can refer to building a network model with more specific functions based on the model determined by preset features.

[0049] For example, model task types may include image retrieval tasks, image classification tasks, image semantic segmentation tasks, and object detection tasks.

[0050] Specifically, for different model task types, corresponding model modifications need to be made based on the preset feature determination model after training to obtain the target feature determination model corresponding to the model task type.

[0051] For example, the step of determining the model based on a pre-determined model task type and pre-defined features after training, and constructing a target feature determination model corresponding to the model task type, includes:

[0052] The feature encoder in the preset feature determination model is retained to obtain the image feature extractor;

[0053] Based on the model construction rules corresponding to the model task type, and according to the image feature extractor, a target feature determination model corresponding to the model task type is constructed.

[0054] It should be noted that, in the technical solution of this invention, the improvement of the downstream task of the preset feature determination model can be made only based on the feature encoder. Specifically, after the preset feature determination model is trained, the projection head in the preset feature determination model is removed, and the feature encoder is retained as a general image feature extractor. Improvements are then made based on the image feature extractor.

[0055] It is worth noting that each model task type has its own corresponding model building rules. Based on the model building rules corresponding to the model task type, the image feature extractor is improved to construct a target feature determination model corresponding to the model task type.

[0056] For example, the step of constructing a target feature determination model corresponding to the model task type based on the model construction rules corresponding to the model task type and according to the image feature extractor includes:

[0057] When the model task type is an image retrieval task, the image feature extractor is determined as the target feature determination model for feature vector extraction;

[0058] When the model task type is an image classification task, the parameters of the image feature extractor are fixed, and the image feature extractor is connected to a preset classifier to construct a target feature determination model for image classification.

[0059] When the model task type is image semantic segmentation task, the image feature extractor is used as an encoding network, and the encoding network is connected to a pre-determined preset decoding network to construct a target feature determination model for image semantic segmentation.

[0060] When the model task type is object detection, the image feature extractor is determined as the backbone network of the detection model, and the backbone network is connected to the proposal network and the detection head to construct a target feature determination model for object detection.

[0061] Specifically, for image retrieval tasks, the image feature extractor is determined as the target feature determination model for feature vector extraction. This invention can pre-extract feature vectors for all images in an image library using the target feature determination model and construct a feature database to perform image retrieval tasks using the feature database.

[0062] For image classification tasks, the parameters of a pre-trained image feature extractor are fixed or slightly unfrozen, and a newly initialized classifier (such as a fully connected layer) with the same output dimension as the number of target categories is connected to the back end of the image feature extractor, thereby obtaining a target feature determination model for image classification. In this invention, a small amount of labeled data from the downstream task can also be used to perform supervised fine-tuning of the classifier (or the entire network), thereby quickly obtaining a target feature determination model with high performance in classification.

[0063] For image semantic segmentation tasks, a pre-trained image feature extractor is used as an encoder network and connected to a pre-defined decoder network (such as the ASPP module of U-Net or DeepLab series) to progressively recover spatial details, thereby obtaining a target feature determination model for image semantic segmentation. Based on this, the target feature determination model can be fine-tuned in a supervised manner using labeled data (containing pixel-level labels) from the segmentation task. The encoder weights can be initialized by pre-trained parameters, thus efficiently performing pixel-level classification.

[0064] For object detection tasks, a pre-trained image feature extractor is used as the backbone network of the detection model, connected to a Region Proposal Network (RPN) and a detection head (such as Faster R-CNN or RetinaNet architecture) to obtain an object feature determination model for object detection. This model is then fine-tuned in a supervised manner using labeled data (including bounding boxes and class labels) from the detection task, where the backbone network weights are initialized with pre-trained parameters. This allows for rapid and accurate localization and recognition of multiple objects in an image.

[0065] For example, after obtaining the target feature determination model, the method further includes: acquiring target image data to be identified and recognized; inputting the target image data into the target feature determination model for feature recognition; and obtaining the feature recognition result based on the output of the target feature determination model.

[0066] Specifically, after obtaining the target feature determination model, the model is used to perform a recognition task of the corresponding model task type. The target image data is input into the target feature determination model for feature recognition, and the feature recognition result is obtained based on the output of the target feature determination model.

[0067] For example, when performing an image retrieval task, the target image data to be queried is input into a target feature determination model to extract feature vectors, thus obtaining the image feature vectors of the target image data. The image feature vectors are then quickly retrieved from a pre-built feature database by calculating cosine similarity, returning the image result most similar to the target image data.

[0068] The technical solution of this invention involves acquiring original sample images for model training, wherein the original sample images are unlabeled sample images; for each original sample image, the original sample image undergoes augmented view processing to construct multiple sample training images with different views; the model is trained using a pre-constructed preset feature determination model and the sample training images; when a preset convergence condition is met, the preset feature determination model training is considered complete. Based on a pre-determined model task type, the model is determined according to the preset features after training, and a target feature determination model corresponding to the model task type is constructed, solving the problem of heavy dependence on large-scale labeled data and high cost in traditional supervised learning methods. Through a self-supervised contrastive learning paradigm, visual feature representations can be automatically learned from massive unlabeled images without manual annotation, and the learned features can be transferred to various downstream visual tasks such as image classification, retrieval, and object detection, significantly improving the model's generalization ability and cross-task adaptability, laying a key technical foundation for building a low-cost, highly adaptive intelligent vision system.

[0069] Figure 2 This is a flowchart illustrating another model training method based on unlabeled samples provided by an embodiment of the present invention. This embodiment, based on the above embodiments, specifies the training process of a model for determining preset features. For example... Figure 2 As shown, the method includes:

[0070] S201. Obtain the original sample images for model training, wherein the original sample images are sample images without data labels.

[0071] S202. For each original sample image, perform enhanced view processing on the original sample image to construct sample training images with multiple different views.

[0072] S203. Input the sample training image into a preset feature determination model for feature recognition decision-making, and obtain the feature determination vector based on the output of the preset feature determination model.

[0073] The preset feature determination model consists of a feature encoder and a projection head network connected sequentially.

[0074] Specifically, the data-augmented sample training images are input into a pre-defined feature determination model. The feature encoder in the pre-defined feature determination model receives the sample training images and performs feature extraction and transformation step by step through a multi-layer neural network structure, gradually transforming the original high-dimensional pixel information into an initial feature vector containing high-level semantic information.

[0075] The initial feature vector is fed into the projection head network. The projection head network is typically a lightweight multilayer perceptron, whose function is to map the high-dimensional initial features from the feature encoder to a relatively low-dimensional projection space optimized specifically for contrastive learning tasks.

[0076] In this projection space, the high-dimensional initial features are normalized and then mapped and normalized to obtain the final output vector, i.e., the feature determination vector. The feature determination vector will be directly used for similarity measurement in subsequent contrastive loss calculations.

[0077] S204. Based on the preset loss function, determine the training error according to the feature determination vector, and backpropagate the training error to the preset feature determination model, and adjust the network parameters of the feature encoder in the preset feature determination model.

[0078] The preset loss function is the InfoNCE function. Specifically, the InfoNCE function is used to analyze the feature determination vector, determine the training error of the preset feature determination model, and determine the adjustment parameters of the preset feature determination model based on the training error. The network parameters of the feature encoder in the preset feature determination model are then adjusted based on the adjustment parameters.

[0079] For example, determining the training error based on the feature-determined vector according to a preset loss function includes:

[0080] For each training image input to the preset feature determination model, determine the corresponding positive and negative sample images for the training image;

[0081] Based on the preset features, the feature determination vector output by the model is determined, the first similarity score between the sample training image and the positive sample image is determined, and the second similarity score between the sample training image and each negative sample image is determined.

[0082] The training error of the preset feature determination model is determined based on the first similarity score and each of the second similarity scores.

[0083] In this context, positive sample images are those obtained from augmented views of the same original sample image, while negative sample images are those obtained from augmented views of different original sample images. In other words, a view image derived from the same original image as the current training image but transformed through different data augmentation processes is considered a positive sample image. Conversely, sample images in the current batch that originate from all other original images are considered negative sample images.

[0084] For example, the preset loss function is the InfoNCE function; based on the preset loss function, the training error is determined according to the feature determination vector, including:

[0085] For each sample training image input to the preset feature determination model, the corresponding positive sample image and negative sample image are determined, wherein the positive sample image is a sample image obtained from the same original sample image augmented view, and the negative sample image is a sample image obtained from different original sample image augmented views;

[0086] Based on the preset features, the feature determination vector output by the model is determined, the first similarity score between the sample training image and the positive sample image is determined, and the second similarity score between the sample training image and each negative sample image is determined.

[0087] The training error of the preset feature determination model is determined based on the first similarity score and each of the second similarity scores.

[0088] The process of obtaining training error is specifically achieved through a contrastive metric learning mechanism. This process begins by constructing discriminative associations between positive and negative sample pairs for each training image processed by the model based on predefined features.

[0089] Based on preset features, the model outputs a feature vector. A similarity metric is then performed, calculating the cosine similarity between the feature vector of the current training image and the feature vector of each positive sample, which is used as the first similarity score. Simultaneously, the cosine similarity between the feature vector of the current training image and the feature vector of each negative sample is calculated sequentially, resulting in a series of second similarity scores. These scores represent the feature differences between samples with different content.

[0090] The training error is determined using the InfoNCE function. Formally, the training error is calculated to encourage the model to correctly identify positive samples, even if the first similarity score is as high as possible, while penalizing the model for confusing negative samples, i.e., forcing all second similarity scores to be as low as possible. This error value is a comprehensive quantification of the degree to which this discriminative objective has not been achieved for all samples. It guides the update of model parameters through backpropagation, thereby driving the feature encoder to learn to extract image feature content.

[0091] S205. Based on a predetermined model task type, determine the model according to the preset features after training, and construct a target feature determination model corresponding to the model task type.

[0092] The technical solution of this invention involves inputting the sample training image into a preset feature determination model for feature recognition decision-making, and obtaining a feature determination vector based on the output of the preset feature determination model. Based on a preset loss function, a training error is determined according to the feature determination vector, and the training error is backpropagated to the preset feature determination model to adjust the network parameters of the feature encoder in the preset feature determination model. This ensures the accuracy of the preset feature determination model in extracting image features, thereby guaranteeing the accuracy of the target feature determination model in feature recognition.

[0093] Figure 3 This is a schematic diagram of a model training device based on unlabeled samples provided in an embodiment of the present invention. Figure 3 As shown, the device includes:

[0094] The sample image acquisition module 301 is used to acquire original sample images for model training, wherein the original sample images are sample images without data labels;

[0095] The training image acquisition module 302 is used to perform enhanced view processing on each original sample image to construct multiple sample training images with different views.

[0096] The model training execution module 303 is used to train the model based on the pre-constructed preset features and the sample training images. When the preset convergence condition is met, the training of the preset feature determination model ends. The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-constructed deep neural network model.

[0097] The feature model construction module 304 is used to determine the model based on the preset features after training, based on the predetermined model task type, and to construct the target feature determination model corresponding to the model task type.

[0098] The technical solution of this invention involves acquiring original sample images for model training, wherein the original sample images are unlabeled sample images; for each original sample image, the original sample image undergoes augmented view processing to construct multiple sample training images with different views; the model is trained using a pre-constructed preset feature determination model and the sample training images; when a preset convergence condition is met, the preset feature determination model training is considered complete. Based on a pre-determined model task type, the model is determined according to the preset features after training, and a target feature determination model corresponding to the model task type is constructed, solving the problem of heavy dependence on large-scale labeled data and high cost in traditional supervised learning methods. Through a self-supervised contrastive learning paradigm, visual feature representations can be automatically learned from massive unlabeled images without manual annotation, and the learned features can be transferred to various downstream visual tasks such as image classification, retrieval, and object detection, significantly improving the model's generalization ability and cross-task adaptability, laying a key technical foundation for building a low-cost, highly adaptive intelligent vision system.

[0099] Optionally, the training image acquisition module 302 is specifically used for:

[0100] The original sample image is processed by a random combination of various image processing techniques to obtain sample view images from different perspectives. The image processing techniques include, but are not limited to, cropping, rotation, color jittering, and Gaussian blur.

[0101] Based on the sample view image, construct the sample training image.

[0102] Optionally, the model training execution module 303 includes:

[0103] The feature vector determination unit is used to input the sample training image into a preset feature determination model for feature recognition decision-making, and obtain the feature determination vector based on the output of the preset feature determination model;

[0104] The training error determination unit is used to determine the training error based on the feature determination vector according to the preset loss function, and backpropagate the training error to the preset feature determination model to adjust the network parameters of the feature encoder in the preset feature determination model.

[0105] Optionally, the training error determination unit is used for:

[0106] For each sample training image input to the preset feature determination model, the corresponding positive sample image and negative sample image are determined, wherein the positive sample image is a sample image obtained from the same original sample image augmented view, and the negative sample image is a sample image obtained from different original sample image augmented views;

[0107] Based on the preset features, the feature determination vector output by the model is determined, the first similarity score between the sample training image and the positive sample image is determined, and the second similarity score between the sample training image and each negative sample image is determined.

[0108] The training error of the preset feature determination model is determined based on the first similarity score and each of the second similarity scores.

[0109] Optionally, the feature model building module 304 includes:

[0110] The feature extractor determination unit is used to retain the feature encoder in the preset feature determination model to obtain an image feature extractor;

[0111] The feature model construction unit is used to construct a target feature determination model corresponding to the model task type based on the model construction rules corresponding to the model task type and according to the image feature extractor.

[0112] Optionally, the model task types include image retrieval tasks, image classification tasks, image semantic segmentation tasks, and object detection tasks;

[0113] Optionally, the feature model building unit is used for:

[0114] When the model task type is an image retrieval task, the image feature extractor is determined as the target feature determination model for feature vector extraction;

[0115] When the model task type is an image classification task, the parameters of the image feature extractor are fixed, and the image feature extractor is connected to a preset classifier to construct a target feature determination model for image classification.

[0116] When the model task type is image semantic segmentation task, the image feature extractor is used as an encoding network, and the encoding network is connected to a pre-determined preset decoding network to construct a target feature determination model for image semantic segmentation.

[0117] When the model task type is object detection, the image feature extractor is determined as the backbone network of the detection model, and the backbone network is connected to the proposal network and the detection head to construct a target feature determination model for object detection.

[0118] Optionally, the device further includes a feature model application module, wherein the feature model application module is specifically used for:

[0119] After obtaining the target feature determination model, acquire the target image data to be identified and determined.

[0120] The target image data is input into the target feature determination model for feature recognition, and the feature recognition result is obtained based on the output of the target feature determination model.

[0121] The model training device based on unlabeled samples provided in the embodiments of the present invention can execute the model training method based on unlabeled samples provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0122] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, 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.

[0123] 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.

[0124] 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.

[0125] 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 model training methods based on unlabeled samples.

[0126] In some embodiments, the model training method based on unlabeled samples 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 installed 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 model training method based on unlabeled samples described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the model training method based on unlabeled samples by any other suitable means (e.g., by means of firmware).

[0127] Various embodiments 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), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments 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.

[0128] 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.

[0129] 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.

[0130] 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).

[0131] 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.

[0132] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. 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.

[0133] 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.

[0134] 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 model training method based on unlabeled samples, characterized in that, include: Obtain raw sample images for model training, wherein the raw sample images are unlabeled sample images; For each original sample image, the original sample image is subjected to enhanced view processing to construct sample training images with multiple different views; The model is trained based on a pre-constructed preset feature determination model and the sample training images. When a preset convergence condition is met, the training of the preset feature determination model is terminated. The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-constructed deep neural network model. Based on a predetermined model task type, a model is determined according to preset features at the end of training, and a target feature determination model corresponding to the model task type is constructed.

2. The method according to claim 1, characterized in that, The step of performing enhanced view processing on the original sample image to construct sample training images with multiple different views includes: The original sample image is processed by a random combination of various image processing techniques to obtain sample view images from different perspectives. The image processing techniques include, but are not limited to, cropping, rotation, color jittering, and Gaussian blur. Based on the sample view image, construct the sample training image.

3. The method according to claim 1, characterized in that, The step of training the model based on the pre-constructed preset features and the sample training images, and determining the end of the preset feature determination model training when the preset convergence condition is met, includes: The sample training images are input into a preset feature determination model for feature recognition decision-making, and a feature determination vector is obtained based on the output of the preset feature determination model; Based on a preset loss function, the training error is determined according to the feature determination vector, and the training error is backpropagated to the preset feature determination model to adjust the network parameters of the feature encoder in the preset feature determination model.

4. The method according to claim 3, characterized in that, The preset loss function is the InfoNCE function; based on the preset loss function, the training error is determined according to the feature determination vector, including: For each sample training image input to the preset feature determination model, the corresponding positive sample image and negative sample image are determined, wherein the positive sample image is a sample image obtained from the same original sample image augmented view, and the negative sample image is a sample image obtained from different original sample image augmented views; Based on the preset features, the feature determination vector output by the model is determined, the first similarity score between the sample training image and the positive sample image is determined, and the second similarity score between the sample training image and each negative sample image is determined. The training error of the preset feature determination model is determined based on the first similarity score and each of the second similarity scores.

5. The method according to claim 1, characterized in that, The step of determining a model based on a pre-determined model task type and pre-defined features after training, and constructing a target feature determination model corresponding to the model task type, includes: The feature encoder in the preset feature determination model is retained to obtain the image feature extractor; Based on the model construction rules corresponding to the model task type, and according to the image feature extractor, a target feature determination model corresponding to the model task type is constructed.

6. The method according to claim 5, characterized in that, The model task types include image retrieval tasks, image classification tasks, image semantic segmentation tasks, and object detection tasks; The step of constructing a target feature determination model corresponding to the model task type based on the model construction rules corresponding to the model task type and according to the image feature extractor includes: When the model task type is an image retrieval task, the image feature extractor is determined as the target feature determination model for feature vector extraction; When the model task type is an image classification task, the parameters of the image feature extractor are fixed, and the image feature extractor is connected to a preset classifier to construct a target feature determination model for image classification. When the model task type is image semantic segmentation task, the image feature extractor is used as an encoding network, and the encoding network is connected to a pre-determined preset decoding network to construct a target feature determination model for image semantic segmentation. When the model task type is object detection, the image feature extractor is determined as the backbone network of the detection model, and the backbone network is connected to the proposal network and the detection head to construct a target feature determination model for object detection.

7. The method according to claim 1, characterized in that, After obtaining the target feature determination model, the process also includes: Acquire the target image data to be used for feature determination and recognition; The target image data is input into the target feature determination model for feature recognition, and the feature recognition result is obtained based on the output of the target feature determination model.

8. A model training device based on unlabeled samples, characterized in that, include: The sample image acquisition module is used to acquire raw sample images for model training, wherein the raw sample images are unlabeled sample images; The training image acquisition module is used to perform enhanced view processing on each original sample image to construct multiple sample training images with different views. The model training execution module is used to train the model based on the pre-built preset features and the sample training images. When the preset convergence condition is met, the training of the preset feature determination model ends. The preset feature determination model includes a feature encoder and a projection head network. The feature encoder is a pre-built deep neural network model. The feature model construction module is used to determine the model based on the preset features after training, based on the pre-determined model task type, and to construct the target feature determination model corresponding to the model task type.

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; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model training method based on unlabeled samples according to 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 model training method based on unlabeled samples as described in any one of claims 1-7.