Fine-grained image classification model training method and system based on heterogeneous resolution

By constructing a fine-grained image classification model training method with heterogeneous resolutions, multi-scale image samples are generated using bilinear downsampling and mosaic processing. By combining normalized flow networks and adaptive flow networks, the problem of feature loss in mixed-resolution image training is solved, achieving efficient feature repair and alignment, and improving the robustness and generalization ability of the model.

CN121884005BActive Publication Date: 2026-05-15SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-03-18
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing fine-grained image classification models struggle to learn effective features when faced with images of mixed resolutions, resulting in insufficient robustness and generalization ability in complex scenarios, thus failing to meet the requirements for high-precision classification.

Method used

By constructing a fine-grained image classification model training method with heterogeneous resolution, multi-scale image samples are generated using bilinear downsampling and mosaic processing. By combining normalized flow networks and adaptive flow networks, feature repair and alignment are achieved through information density maps and semantic manifold space constraints, thereby optimizing model parameters.

Benefits of technology

Without increasing computational costs, the model's robustness and generalization ability to multi-resolution inputs are improved, ensuring high-precision classification performance in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884005B_ABST
    Figure CN121884005B_ABST
Patent Text Reader

Abstract

The application provides a fine-grained image classification model training method and system based on heterogeneous resolution, and relates to the technical field of model training. Based on high-resolution fine-grained image samples to multi-scale images; mosaic processing is performed on the multi-scale images to obtain simulated degradation heterogeneous image samples; the images are input into a fine-grained image classification model, wherein the high-resolution fine-grained image samples are input into a canonical stream network to obtain canonical features, and the heterogeneous image samples are input into an adaptive stream network to obtain adaptive features; an information density map is generated based on the energy difference of the canonical features and the adaptive features, the information density map is used as a weight to construct a feature repair loss, and the adaptive features are guided to align with the canonical features; the adaptive features and the canonical features are respectively mapped to a semantic manifold space, and the consistency of the adaptive features and the canonical features in the semantic direction is constrained; model parameters are optimized by a joint loss function, and a trained fine-grained image classification model is obtained, so that the robustness of the model and the accuracy of the model applied to image classification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for training a fine-grained image classification model based on heterogeneous resolution. Background Technology

[0002] Fine-grained image classification model training aims to learn highly discriminative feature representations for objects belonging to the same basic category (such as different subspecies of birds or different models of cars), achieving refined differentiation of similar targets. The training process heavily relies on subtle, high-frequency information such as target texture and edges, and uses a large amount of labeled data to drive the model to fit the sample distribution. This is a key technological support for fields such as ecological monitoring and intelligent security. Traditional training methods are mostly based on standard datasets with uniform resolution and controllable scenes, uniformly scaling images to a fixed size before inputting them into the network to simplify the training process and improve model convergence efficiency.

[0003] In real-world applications, image resolution exhibits significant dynamic differences due to factors such as acquisition distance, equipment performance, and motion status. In uncontrolled environments such as long-distance monitoring and drone inspections, low-resolution and high-resolution images coexist. Existing model training methods still follow a fixed-size input paradigm. Interpolation of low-resolution images only expands the number of pixels and cannot recover lost discriminative information, making it difficult for the model to learn effective fine-grained features.

[0004] Existing training methods struggle to adapt to mixed-resolution data distributions. Introducing super-resolution reconstruction preprocessing increases computational overhead, and generated false details can easily interfere with model training. Directly training with mixed-resolution data can lead to gradient conflicts due to differences in sample feature distributions, causing difficulties in model convergence and decreased robustness. Furthermore, semantic fragmentation exists in image features at different resolutions, and the consistency of features for similar targets is poor, resulting in insufficient model generalization ability and failing to meet the high-precision and high-stability requirements of fine-grained image classification in complex scenarios. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes a training method and system for a fine-grained image classification model based on heterogeneous resolution. Based on a specially designed feature enhancement module, the model learns to map feature vectors of arbitrary resolution back to standard high-resolution feature states through nonlinear transformation. Resolution normalization and quality enhancement are achieved at the feature level, thus enabling robust perception of multi-resolution inputs without increasing expensive preprocessing costs.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for training a fine-grained image classification model based on heterogeneous resolution, comprising:

[0008] Bilinear downsampling and then upsampling are performed on high-resolution fine-grained image samples to obtain multi-scale images; mosaic processing is performed on the multi-scale images to obtain heterogeneous image samples with simulated degradation.

[0009] The image is input into a fine-grained image classification model, wherein the high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features; an information density map is generated based on the energy difference between the normalized features and the adaptive features, and a feature inpainting loss is constructed using the information density map as weights to guide the adaptive features to align with the normalized features;

[0010] Adaptive features and canonical features are mapped to the semantic manifold space respectively, and their consistency in the semantic direction is constrained;

[0011] By combining classification loss, feature repair loss, and semantic direction consistency loss, the model parameters are jointly optimized to obtain a well-trained fine-grained image classification model.

[0012] Secondly, the present invention provides a fine-grained image classification model training system based on heterogeneous resolution, comprising:

[0013] The heterogeneous sample acquisition unit is used to perform bilinear downsampling and then upsampling on high-resolution fine-grained image samples to obtain multi-scale images; and to perform mosaic processing on the multi-scale images to obtain heterogeneous image samples with simulated degradation.

[0014] The inpainting unit is used to input images into a fine-grained image classification model. The high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features. An information density map is generated based on the energy difference between the normalized features and the adaptive features. The feature inpainting loss is constructed using the information density map as weights to guide the adaptive features to align with the normalized features.

[0015] Semantic constraint units are used to map adaptive features and canonical features to the semantic manifold space respectively, and constrain their consistency in the semantic direction;

[0016] The joint optimization unit is used to combine classification loss, feature repair loss, and semantic direction consistency loss to jointly optimize model parameters and obtain a well-trained fine-grained image classification model.

[0017] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the training method for a fine-grained image classification model based on heterogeneous resolution described in the first aspect.

[0018] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the training method for a fine-grained image classification model based on heterogeneous resolution described in the first aspect.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] (1) This invention constructs a training method for a fine-grained image classification model based on heterogeneous resolution. First, high-resolution samples are subjected to multi-scale degradation and mosaic processing to simulate the complex input distribution of dynamic resolution changes and uneven quality in real scenes, thereby improving the model's adaptability to low-quality and heterogeneous images. At the same time, a dual-branch structure of normalized flow network and adaptive flow network is adopted to form standard normalized features with high-resolution samples, and to accurately repair the adaptive features of heterogeneous resolution samples, effectively compensating for the lack of details and information loss in low-resolution images. In addition, by mapping the repaired features and normalized features to a unified semantic manifold space, the consistency of semantic distribution is constrained, the feature semantic discontinuity caused by different resolutions is eliminated, and the compactness and discriminability of similar features are enhanced. Finally, by combining multiple losses, the model converges more stably and has stronger generalization ability. It still maintains high-precision fine-grained classification in complex uncontrolled environments, and has both robustness and practicality.

[0021] (2) Generalization capability across the entire resolution domain: Unlike methods that only optimize for low resolution, this invention enables the model to be exposed to various possible resolution combinations by constructing a "heterogeneous resolution space", thus making it capable of handling inputs of any resolution.

[0022] (3) “Intelligent Focus” for Feature Repair: The proposed “Information Density Map” mechanism gives the model an attention mechanism similar to human vision, which performs high-cost feature reconstruction only in key fine-grained areas, while keeping the background area relaxed, which greatly improves the signal-to-noise ratio of feature expression.

[0023] (4) Performance improvement with zero inference cost: All complex computations, such as two-stream coupling and density map computation, only occur during the training phase. The inference phase only retains the adaptive flow network, without any additional super-resolution modules or auxiliary branches, achieving a balance between high accuracy and high efficiency.

[0024] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0025] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.

[0026] Figure 1 The main flowchart of a fine-grained image classification model training method based on heterogeneous resolution provided in an embodiment of the present invention;

[0027] Figure 2 This is a flowchart of heterogeneous sample generation provided in an embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of a dual-stream coupled network architecture provided in an embodiment of the present invention. Detailed Implementation

[0029] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0030] In the task of fine-grained visual classification (FGVC), existing methods still face many key technical bottlenecks. Fine-grained classification relies heavily on high-frequency discriminative information such as texture and edges, but low-resolution images cause irreversible loss of these features. Existing models typically use fixed-size inputs, and unifying the resolution through interpolation can only expand the number of pixels, but cannot recover the lost information entropy. This results in the model only learning fuzzy and generalized feature representations, making it difficult to distinguish similar subclasses.

[0031] To address the issue of resolution differences, existing solutions struggle to balance efficiency and performance. Using super-resolution reconstruction as preprocessing introduces significant computational overhead, and the reconstructed images are prone to artifacts and false textures, which can interfere with classification decisions. Directly training with mixed resolutions, on the other hand, suffers from significant differences in data distribution between clear and blurry samples, leading to model optimization oscillations, convergence difficulties, and ultimately, only results with poor robustness.

[0032] More importantly, mixed resolution inputs create significant semantic fragmentation in the feature space, causing the feature distribution of similar targets to be fragmented under clear and degraded conditions, disrupting the intra-class compactness and inter-class separability of features, and affecting the stable division of classification boundaries.

[0033] To address this, the present invention proposes a solution based on feature manifold reconstruction, which no longer relies on traditional pixel-level image restoration. Instead, it achieves resolution normalization at the feature level and uses nonlinear mapping to uniformly map degraded features to a standardized high-resolution feature space. This improves the robustness of the model to multi-resolution inputs without significantly increasing computational costs.

[0034] Example 1

[0035] like Figure 1 As shown, this embodiment discloses a method for training a fine-grained image classification model based on heterogeneous resolution, including the following steps:

[0036] S1: Perform bilinear downsampling and then upsampling on high-resolution fine-grained image samples to obtain multi-scale images; perform mosaic processing on multi-scale images to obtain heterogeneous image samples with simulated degradation.

[0037] S2: Input the image into a fine-grained image classification model, wherein the high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features; an information density map is generated based on the energy difference between the normalized features and the adaptive features, and a feature repair loss is constructed using the information density map as weights to guide the adaptive features to align with the normalized features;

[0038] S3: Map adaptive features and canonical features to the semantic manifold space respectively, and constrain their consistency in the semantic direction;

[0039] S4: Combine classification loss, feature repair loss, and semantic direction consistency loss to jointly optimize model parameters and obtain a well-trained fine-grained image classification model.

[0040] Next, combined Figure 1 This embodiment provides a detailed description of a fine-grained image classification model training method based on heterogeneous resolution.

[0041] (a) Constructing a heterogeneous resolution manifold space

[0042] This embodiment is used to construct a training data environment that supports continuous, dynamic resolution changes, enabling the model to adapt to spatially uneven image quality.

[0043] Specifically, in practical applications, due to factors such as shooting equipment, distance, and lighting, different regions of the same image often have different resolutions. Traditional classification models are usually trained using images with uniform resolution, which makes the model lack robustness to spatially non-uniform image quality.

[0044] To address this issue, this embodiment considers constructing a heterogeneous resolution manifold space to purposefully generate heterogeneous samples containing mosaic-like patches of varying resolution, simulating the complex situation of local image quality degradation in real-world scenes. This forces the model to learn how to extract effective features from blurred or low-resolution regions during training and adapt to spatially varying image quality, thereby improving the model's ability to handle non-ideal inputs.

[0045] 1. Multi-scale benchmark generation

[0046] Let the original high-resolution fine-grained images in the training set be... (For example Define a set of downsampling scaling factors. ,in .

[0047] In this embodiment, for example, a selection is made. These correspond to high, medium, and low resolutions, respectively. For example... Figure 2 As shown, for Perform bilinear downsampling and then upsampling operations to generate a multi-scale image set. All images retain their original size. However, it contains varying degrees of loss and blurring of details.

[0048] 2. Construction of Multi-Granularity Tile Pool

[0049] Each image Spatially divided into A grid of non-overlapping tiles. Let the tile size be... (For example ,but ).use Representing an image Located in the middle line, number A list of tiles. Construct a multi-granularity tile pool. It contains all location tiles of the same image instance at all scales:

[0050] ;

[0051] 3. Resolution mosaic injection

[0052] To generate heterogeneous samples This embodiment defines a probability-based sampling function. For the target image Each grid position According to the set probability distribution, from the tile pool Select a tile at the corresponding location to fill.

[0053] Set selection criteria The probability is To enable the model to smoothly adapt to image degradation and achieve stable convergence, and to gradually master the ability to repair from overall blur to local fragmentation, thereby improving the model's training stability and final performance, this embodiment adopts a progressive learning strategy. The input image resolution is progressively adjusted according to the cognitive principle of "from easy to difficult." In the early stages of training, the probability of selecting high-resolution patches is increased; as training progresses, the probability of selecting medium- and low-resolution patches is gradually increased, smoothly transitioning to medium resolution. Finally, deep semantic alignment is performed on low-resolution images to increase the difficulty of the samples.

[0054] Specifically, firstly, a difficulty factor is defined that increases as the training progresses. ,in This represents the current epoch number during training. Total number of Epochs:

[0055] ;

[0056] During resolution mosaic injection, the probability of selecting non-high-resolution tiles (medium and low resolution) is... by control:

[0057] ;

[0058] For example, setting the base probability maximum probability As training progresses, the input image... As the number of blurred patches increases, the difficulty of reconstruction gradually increases.

[0059] The final generated heterogeneous samples Spatially, it presents a resolution "mosaic" distribution, meaning that adjacent tiles may come from completely different resolution scales.

[0060] This embodiment significantly increases the diversity and complexity of training data by generating heterogeneous resolution samples, enabling the model to encounter more diverse image degradation patterns. This enhances its robustness to interference such as local blurring and noise, allowing it to handle inputs of any resolution with ease. Simultaneously, the mosaic-like resolution distribution prompts the model to learn feature associations between high- and low-resolution regions within the same image, providing rich contextual information for subsequent feature inpainting and semantic alignment. Ultimately, this effectively improves the accuracy and generalization ability of fine-grained image classification.

[0061] Furthermore, high-resolution, clear images rich in texture are considered easy-to-learn basic samples, while low-resolution images with severely lost details are considered challenging difficult samples, thus constructing a cognitive ladder from easy to difficult. Employing a progressive feature alignment strategy effectively bridges the significant semantic gap caused by the lack of physical information. In the early stages of training, high-resolution samples are used to quickly establish an accurate global semantic benchmark, subsequently guiding low-resolution difficult samples to steadily converge, thereby effectively mitigating gradient conflicts during multi-scale joint training and helping the network learn scale-independent robust discriminative features.

[0062] (II) Two-stream coupled network architecture

[0063] To improve the robustness of fine-grained image classification to multi-resolution inputs and eliminate feature semantic gaps between samples of different resolutions, this embodiment designs a Siamese network structure, such as... Figure 3 As shown, it contains two parallel feature flows: the Canonical Flow network (Canonical Flow, The input is always a high-resolution image. It is used to extract feature prototypes under ideal conditions as a stable reference frame; Adaptive Flow Network (Adaptive Flow Network) The input is a heterogeneous sample. Or low-resolution samples, responsible for learning how to map degenerate inputs to the feature space defined by the normalized flow.

[0064] The canonical flow network is based on ResNet-50, with intermediate convolutional layers (such as Layer 3 and Layer 4) responsible for extracting high-dimensional canonical features. This is used for subsequent assessment of channel energy and to guide repair.

[0065] The Adaptive Flow Network is also based on ResNet-50. During training, it generates adaptive features. It will be extracted and compared with the standard features. The energy difference ratios are compared, and feature repair calculations are performed under the weighting of the information density map.

[0066] The complex interactions between these two stream networks, such as spatially aware feature inpainting and semantic manifold projection alignment, exist only during the training phase. Once training is complete, the canonical stream network branches... This will be completely stripped away. In the actual model deployment and inference phases, only the adaptive streaming network will be retained to handle multi-resolution input environments, thereby achieving high performance with zero additional inference cost.

[0067] (III) Spatial perception feature restoration

[0068] To address feature loss caused by degraded input, this embodiment does not employ globally consistent constraints, but instead designs a "local repair mechanism based on information density," aiming to utilize normalized flow features. Guided Adaptive Flow Characteristics Repair is then performed. To improve efficiency and focus on key areas, a weighted mechanism based on information density was designed. The following operations are performed independently for each extracted feature level.

[0069] 1. Characteristic Energy Calculation

[0070] Define the standard features The dimension is Calculate its spatial location. Local channel energy at the location This is used to characterize the information response intensity of the region. This embodiment uses channel average pooling for representation:

[0071] ;

[0072] in, Indicates the number of channels.

[0073] Adaptive characteristics In spatial location Local channel energy at the location Adopting and conforming to standard features Consistent calculation method.

[0074] 2. Generation of Feature Information Density Map

[0075] Calculate the energy difference ratio between canonical and adaptive features, and generate a normalized density map using an activation function. :

[0076] ;

[0077] in, To prevent smooth terms that divide by zero (such as 1e-6); This is a scaling factor (e.g., 10) used to enhance contrast; The threshold offset (e.g., 5) is used to suppress background noise.

[0078] The higher the value, the more important it is that the region contains key information in the canonical space, but it is severely lost in the adaptive flow and needs to be repaired.

[0079] 3. Characteristic manifold repair loss

[0080] Based on density map Define the feature manifold repair loss:

[0081] .

[0082] Drawing inspiration from the perceptual characteristics of the human visual system, this embodiment endows the model with non-uniform feature repair capabilities through dynamic guidance of information density maps. High-intensity feature compensation is applied only to regions with high information density and significant loss of key discriminative information, while relaxed constraints are applied to information-rich or background-redundant regions to avoid noise interference from ineffective repair. This differentiated repair strategy effectively avoids feature confusion caused by globally uniform repair, accurately focusing on texture and edge details that contribute most to the classification task, thus improving the signal-to-noise ratio of feature representation and the robustness of fine-grained recognition.

[0083] (iv) Semantic manifold projection alignment

[0084] Considering that feature repair cannot deviate from the original semantic representation, this embodiment proposes to align the distribution of features in the semantic manifold space.

[0085] Specifically, for the feature maps output from the last convolutional layer of each of the two branches (which retain rich spatial and geometric semantic information), global average pooling is first performed on each to compress them into global feature vectors. Then, a linear projection layer combined with the Softmax activation function maps these feature vectors to a high-dimensional semantic statistical manifold space, resulting in semantic vectors represented in the form of probability distributions. and Finally, KL divergence is used. To measure and minimize the distribution difference between these two semantic vectors in the manifold space, as a semantic orientation consistency loss function, thereby guiding the accurate repair of features:

[0086] ;

[0087] ;

[0088] in, This represents the Softmax activation function, used to map features to a semantic probability manifold space. This loss forces the semantic vectors generated by the adaptive streaming network to... In the direction, it should be as close as possible to the normal flow vector. Alignment. Adapting the semantic vector of the flow. Finally, the data is input into the classifier, where the standard cross-entropy classification loss is calculated. .

[0089] The canonical-degenerate dual-stream coupling framework constructed in this embodiment first builds a heterogeneous space containing various resolution degradation states through a multi-scale resolution mosaic strategy. Then, a spatially aware feature inpainting module guides degenerate features to regress to canonical features in high-information-density regions. Finally, semantic manifold projection alignment ensures semantic consistency during the feature inpainting process. This achieves robust feature extraction for multi-resolution heterogeneous inputs, significantly improving the accuracy and generalization ability of fine-grained image classification without increasing inference overhead.

[0090] Ultimately used to update the parameters of the adaptive flow network The total loss function is:

[0091] ;

[0092] in, The weight is a constant (e.g., 0.5). This indicates the training phase.

[0093] To verify the effectiveness of this embodiment, the following experimental data are provided.

[0094] This embodiment can be applied to fine-grained image classification scenarios such as bird species identification, car model identification, and aircraft model identification. It can achieve stable extraction and accurate classification of highly discriminative features in multi-resolution heterogeneous input environments. The experiments involve three benchmark fine-grained image datasets: CUB-200-2011 (bird species image dataset), StanfordCars (car model image dataset), and FGVC-Aircraft (aircraft model image dataset). In the experiments, high-resolution images were conventionally set to 224×224 resolution, while medium-resolution and low-resolution images were processed according to the downsampling factor described above. Downsampling was performed to obtain images with resolutions of 56×56 and 28×28. In terms of network architecture, a pre-trained ResNet-50 was uniformly used as the multi-resolution framework and the backbone feature extraction network for all baseline models. The optimizer employed stochastic gradient descent (SGD), with a momentum parameter set to 0.9 and a weight decay coefficient set to 5×10⁻⁶. 4. The entire training process consisted of 200 epochs, with an initial learning rate set to 0.001. Furthermore, to enhance the model's generalization ability in fitting multi-scale feature spaces, standard data augmentation techniques such as random horizontal flipping and random pruning were applied during training.

[0095] 1. Comparative Experiments: Table 1 shows the recognition accuracy results of different methods on three datasets. It should be noted that there is currently a lack of in-depth research on multi-resolution scenes in the field of fine-grained image classification. Therefore, this embodiment selects a general fine-grained image classification method and a low-resolution fine-grained image classification method for comparison. Wherein, L (Low) represents low-resolution input, M (Medium) represents medium-resolution input, H (High) represents high-resolution input, and Avg (Average) represents the average performance index at the three resolutions of L, M, and H.

[0096] Because this is a multi-resolution scenario, the average accuracy across different resolutions is given greater emphasis. The baseline section compares the model to the selected ResNet-50. It can be seen that models trained at only one resolution show a significant decrease in performance on other resolutions, a similar result observed in general fine-grained classification methods. While training simultaneously with images of different resolutions improves the average accuracy, it is still not entirely satisfactory. Low-resolution fine-grained image classification, relying on a super-resolution process, is limited to testing at a specific resolution. Nevertheless, the method proposed in this embodiment remains competitive when compared to its single-resolution counterpart.

[0097] Table 1 shows the recognition accuracy results of different methods on three datasets;

[0098]

[0099] 2. Ablation Experiment: To verify the effectiveness of each module, this embodiment conducted ablation experiments on all parts on the FGVC-Aircraft dataset to illustrate the effectiveness of the proposed modules, as shown in Table 2. Since feature manifold repair is the foundation of the entire training process and cannot be removed for testing alone, the mosaic strategy was first removed to verify the effectiveness of feature manifold repair, and then the mosaic strategy was added to form the method of the entire invention.

[0100] Table 2 Ablation experiments on the FGVC-Aircraft dataset;

[0101]

[0102] 3. Generalization Experiment: To verify that this embodiment can truly handle multi-resolution scenes, its performance at 112×112 resolution was investigated on three datasets. It can be seen that although this resolution data was not used during training, the model still yielded highly competitive results, strongly demonstrating the generalization ability of the proposed method.

[0103] Table 3 shows the performance at 112×112 resolution on the three datasets;

[0104]

[0105] This embodiment constructs a heterogeneous resolution manifold space to generate degraded samples with a spatially mosaic-like resolution distribution, simulating complex situations such as local blurring and loss of detail in real-world images, thus enhancing the diversity and realism of the training data. Based on this, a dual-stream coupled network architecture is designed, utilizing high-resolution images to construct a standardized feature space as a stable reference. This guides the adaptive flow network to perform spatially adaptive local feature repair on degraded inputs, and semantic manifold projection alignment ensures that the repair direction does not deviate from the correct semantics, effectively solving the problems of feature loss and semantic drift in degraded images. Simultaneously, a dynamic resolution course learning strategy is introduced, gradually increasing the degree of sample degradation and repair difficulty from easy to difficult, improving model training stability and convergence efficiency. This invention can significantly enhance the robustness and generalization ability of fine-grained image classification models to spatially non-uniform image quality, making it suitable for high-precision recognition tasks of fine-grained images.

[0106] Example 2

[0107] This embodiment provides a fine-grained image classification model training system based on heterogeneous resolution, including:

[0108] The heterogeneous sample acquisition unit is used to perform bilinear downsampling and then upsampling on high-resolution fine-grained image samples to obtain multi-scale images; and to perform mosaic processing on the multi-scale images to obtain heterogeneous image samples with simulated degradation.

[0109] The inpainting unit is used to input images into a fine-grained image classification model. The high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features. An information density map is generated based on the energy difference between the normalized features and the adaptive features. The feature inpainting loss is constructed using the information density map as weights to guide the adaptive features to align with the normalized features.

[0110] Semantic constraint units are used to map adaptive features and canonical features to the semantic manifold space respectively, and constrain their consistency in the semantic direction;

[0111] The joint optimization unit is used to combine classification loss, feature repair loss, and semantic direction consistency loss to jointly optimize model parameters and obtain a well-trained fine-grained image classification model.

[0112] Example 3

[0113] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the fine-grained image classification model training method based on heterogeneous resolution as described in Embodiment 1 above.

[0114] Example 4

[0115] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the fine-grained image classification model training method based on heterogeneous resolution as described in Embodiment 1 above.

[0116] The steps or modules involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0117] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for training a fine-grained image classification model based on heterogeneous resolution, characterized in that, include: High-resolution, fine-grained image samples are bilinearly downsampled and then upsampled to obtain multi-scale images; Multi-scale images are mosaicked to obtain simulated degraded heterogeneous image samples; The image is input into a fine-grained image classification model, wherein the high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features; An information density map is generated based on the energy difference between canonical and adaptive features. A feature repair loss is constructed using the information density map as weights to guide the adaptive features to align with the canonical features. Specifically, the local information response intensity of canonical and adaptive features at each spatial location is calculated to generate an energy distribution map; an information density map is generated based on the energy difference between canonical and adaptive features; and the adaptive features are weighted and constrained based on the information density map. The adaptive features are then guided to align with the canonical features through model optimization. The adaptive features and canonical features are mapped to the semantic manifold space respectively, and their consistency in semantic direction is constrained. Specifically, global average pooling is performed on the output feature maps of the last layer of the canonical flow network and the adaptive flow network respectively to obtain feature vectors; the two feature vectors are mapped to the high-dimensional semantic manifold space through a linear projection layer to obtain the corresponding semantic vectors; the consistency of the direction of the two semantic vectors is constrained so that the semantic direction of the adaptive flow is aligned with that of the canonical flow. By combining classification loss, feature repair loss, and semantic direction consistency loss, the model parameters are jointly optimized to obtain a well-trained fine-grained image classification model.

2. The method for training a fine-grained image classification model based on heterogeneous resolution as described in claim 1, characterized in that, The process of performing bilinear downsampling and then upsampling on high-resolution fine-grained image samples to obtain multi-scale images specifically includes: A set of downsampling scaling factors is preset, each corresponding to a different resolution level; The original high-resolution image is subjected to bilinear downsampling and upsampling operations according to each scaling factor to generate a multi-scale image set containing multiple resolution levels.

3. The method for training a fine-grained image classification model based on heterogeneous resolution as described in claim 1, characterized in that, The process of performing mosaic processing on multi-scale images to obtain simulated degraded heterogeneous image samples specifically includes: Each multi-scale image is spatially divided into multiple non-overlapping grid tiles to construct a multi-granularity tile pool containing all images and all location tiles. For each grid location of the heterogeneous sample to be generated, tiles from images of different scales are selected from the tile pool according to the set probability distribution to fill the grid. The resulting heterogeneous samples exhibit a spatially distributed mosaic pattern.

4. The method for training a fine-grained image classification model based on heterogeneous resolution as described in claim 3, characterized in that, During the heterogeneous sample generation stage, the probability of selecting non-high resolution patches is dynamically adjusted according to the difficulty factor. This is to ensure that high resolution patches are selected primarily in the early stages of training, and the proportion of medium and low resolution patches is gradually increased as the number of iterations increases.

5. The method for training a fine-grained image classification model based on heterogeneous resolution as described in claim 1, characterized in that, The semantic direction consistency loss uses cosine similarity distance to constrain the directional consistency between the adaptive flow semantic vector and the normal flow semantic vector.

6. A training system for a fine-grained image classification model based on heterogeneous resolution, based on the training method for a fine-grained image classification model based on heterogeneous resolution as described in claim 1, characterized in that, include: The heterogeneous sample acquisition unit is used to perform bilinear downsampling and then upsampling on high-resolution fine-grained image samples to obtain multi-scale images; Multi-scale images are mosaicked to obtain simulated degraded heterogeneous image samples; The inpainting unit is used to input images into a fine-grained image classification model. The high-resolution fine-grained image samples are input into a normalized flow network to obtain normalized features, and the heterogeneous image samples are input into an adaptive flow network to obtain adaptive features. An information density map is generated based on the energy difference between the normalized features and the adaptive features. The feature inpainting loss is constructed using the information density map as weights to guide the adaptive features to align with the normalized features. Semantic constraint units are used to map adaptive features and canonical features to the semantic manifold space respectively, and constrain their consistency in the semantic direction; The joint optimization unit is used to combine classification loss, feature repair loss, and semantic direction consistency loss to jointly optimize model parameters and obtain a well-trained fine-grained image classification model.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the training method for a fine-grained image classification model based on heterogeneous resolution as described in any one of claims 1-5.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the training method for a fine-grained image classification model based on heterogeneous resolution as described in any one of claims 1-5.