2026 iFLYTEK AI Developer Challenge - Traditional Chinese Medicine (TCM) Recognition Challenge Solution
This repository contains the complete solution and source code for the 2026 iFLYTEK AI Developer Challenge - Traditional Chinese Medicine (TCM) Recognition Challenge.
Driven by national policies supporting the inheritance and innovation of Traditional Chinese Medicine (TCM), improving the quality control of herbs is of paramount importance. TCM species are numerous and complex, with many looking visually identical, making manual inspection error-prone and inefficient. This competition aims to leverage Artificial Intelligence (AI) to achieve rapid and precise image recognition of TCM herbs, significantly advancing quality control and modernization in the TCM industry.
Based on the provided TCM image dataset, design and train an AI model capable of efficiently and accurately identifying and classifying different types of Traditional Chinese Medicine (54-class classification task).
The dataset contains approximately 54 categories of TCM herbs and their corresponding images, divided into training and testing subsets. Example category label mapping:
Honeysuckles: 0Gardenia: 1Dandelions: 32Ginsengs: 20- ... total of 54 classes (0 to 53)
Submissions are evaluated using the Macro F1-score.
- Leaderboard A Score:
0.953(Rank:2) - Leaderboard B Score:
0.946(Rank:3) - Final Award:
3rd Prize
Note: Feel free to adapt and expand this section to match your actual implementation.
- Basic Augmentation: Random Crop, Random Horizontal/Vertical Flips, Color Jittering.
- Advanced Strategies: Implemented
MixUpandCutMixto enhance the model's generalization capabilities on fine-grained features. - Class Imbalance: Utilized class-aware resampling (Oversampling) and
Focal Lossto alleviate data scarcity for certain rare herb species.
- Backbone:
eva02, convnext02, caformerthree models ensemble, initialized with pre-trained weights. - Modification: Replaced the original fully connected classification layer with a custom linear head adapted for 54 classes, integrated with Dropout to prevent overfitting.
- Optimizer: AdamW (Weight Decay = 1e-4)
- LR Scheduler: CosineAnnealingWarmRestarts (Cosine annealing with linear warmup)
- Loss Function: CrossEntropyLoss with Label Smoothing (smoothing factor = 0.1)
- Inference Tricks: Applied Test-Time Augmentation (TTA) to ensure prediction stability; employed a multi-model ensemble strategy to maximize the final Macro F1 score.
Trained Model could be found here