Papers
Topics
Authors
Recent
Search
2000 character limit reached

FE-TResNet: Fine-Grained Food Recognition

Updated 6 July 2026
  • The paper introduces FE-TResNet, which augments a TResNet backbone with StyleRM and DCA modules to effectively address subtle differences in fine-grained food imagery.
  • It uses a Style-based Recalibration Module to emphasize texture and style cues and Deep Channel-wise Attention for efficient long-range contextual aggregation.
  • FE-TResNet achieves state-of-the-art Top-1 accuracies of 81.37% and 80.29% on ChineseFoodNet and CNFOOD-241, respectively, despite an increase in parameters and FLOPs.

Searching arXiv for the FE-TResNet paper and closely related backbone/attention modules. First, locating the primary paper by arXiv id. Searching for FE-TResNet (Liu et al., 17 Jul 2025). Feature-Enhanced TResNet (FE-TResNet) is a fine-grained food image classification model that augments a TResNet backbone with two feature-enhancement modules: a Style-based Recalibration Module (StyleRM) and a Deep Channel-wise Attention (DCA) module. It was introduced to address the difficulty of distinguishing food categories that are similar in shape, color, and layout but differ in subtle texture, ingredient composition, surface patterns, or local structure. The method preserves the efficiency-oriented TResNet backbone while explicitly strengthening style-aware recalibration at intermediate layers and long-range contextual aggregation at deeper stages, and it was evaluated on the ChineseFoodNet and CNFOOD-241 benchmarks for fine-grained food recognition (Liu et al., 17 Jul 2025).

1. Problem setting and motivation

FE-TResNet is motivated by the specific failure modes of conventional CNN-based food recognition. Fine-grained food classification is difficult because discriminative evidence is often subtle, while nuisance variation is substantial. The reported challenges include small differences in texture, ingredient composition, surface patterns, and local shape; strong intra-class variation induced by cooking style, containers, viewpoints, lighting, and background; and strong inter-class similarity among dishes that may appear nearly identical except for minor details. The examples cited include tofu dishes and potato dishes that are visually close but semantically different (Liu et al., 17 Jul 2025).

Within this problem setting, traditional handcrafted features are described as insufficiently expressive, and even modern CNNs are characterized as limited in modeling global-local relations because convolution mainly emphasizes local neighborhoods. The architectural objective is therefore threefold: to preserve the efficiency of TResNet, to better model style and texture cues, and to better capture long-range dependencies together with multi-scale channel interactions. This positioning is important because it frames FE-TResNet not as a generic image classifier, but as a targeted response to fine-grained visual ambiguity in food imagery.

A common misconception is to treat the model as an entirely new backbone. The reported design does not support that interpretation. FE-TResNet is instead a feature-enhanced version of TResNet in which additional modules are inserted at selected stages of the existing backbone (Liu et al., 17 Jul 2025).

2. Backbone adaptation and architectural placement

The baseline is TResNet, described as a high-performance GPU-oriented CNN derived from ResNet50 and designed to reduce FLOPs and improve throughput while maintaining good accuracy. TResNet uses residual-style blocks and already includes SE attention in its standard form. FE-TResNet retains that backbone and modifies it in a targeted manner rather than replacing it wholesale (Liu et al., 17 Jul 2025).

The modifications are stage-specific. In the basic-block stage of the backbone, StyleRM is inserted before the remaining SE and activation operations. In the bottleneck stage, DCA is inserted after the SE block. The architecture also includes an optimization to the Novel Block-Type Selection layer, where a single convolutional layer is used after the Anti-Alias Downsampling layer to preserve features and reduce parameters. In the model diagrams, some BasicBlock units contain StyleRM + SE, while some Bottleneck units contain SE + DCA.

The resulting processing pipeline is reported as follows. An input image is resized or cropped and fed into the network. Backbone TResNet feature extraction begins. In the basic blocks, features are passed through StyleRM, which recalibrates channels based on style statistics, and then continue through the remaining SE and activation layers. In the bottleneck blocks, features are refined by SE and then passed to DCA. DCA performs sparse long-range aggregation over row and column contexts, and a second DCA pass further densifies contextual modeling. The final fused features are then sent to the classification head for prediction (Liu et al., 17 Jul 2025).

This arrangement suggests a deliberate separation of roles across depth. Early and intermediate layers are tasked with emphasizing low-level texture and style cues, whereas later layers are tasked with modeling higher-level contextual dependencies across the image.

3. Style-based Recalibration Module

StyleRM is intended to extract and recalibrate style features, which are presented as especially useful for food recognition because food categories are often distinguished by texture and appearance patterns rather than coarse shape. The reported motivation is that an original SRM-style mechanism has three limitations: stylization feature extraction is too simplistic, it uses a single global content feature coefficient, and it may compress too aggressively and lose spatial information. To address this, the FE-TResNet design adds convolutional processing so that StyleRM can better capture spatial structure while still modeling style (Liu et al., 17 Jul 2025).

Given input feature maps

x∈XB×C×H×W,x \in \mathbb{X}^{B \times C \times H \times W},

StyleRM computes per-channel style statistics using the mean and standard deviation:

βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}

and

αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.

These are combined into a channel-wise style descriptor

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],

so that

t∈XB×C×2.t \in \mathbb{X}^{B \times C \times 2}.

This means that each channel is summarized by first-order and second-order statistics.

The style descriptor is then encoded by learnable parameters

w∈XC×2,w \in \mathbb{X}^{C \times 2},

with channel-wise encoding

zbc=wc×tbc,z_{bc} = w_c \times t_{bc},

yielding

z∈XB×C×1.z \in \mathbb{X}^{B \times C \times 1}.

The paper then applies batch normalization and activation to generate channel-wise style weights. It gives

βc(z)=1N∑n=1Nzbc\beta_c^{(z)}=\frac{1}{N}\sum_{n=1}^{N} z_{bc}

and

αc(z)=1N∑n=1N(zbc−βc(z))2,\alpha_c^{(z)}=\sqrt{\frac{1}{N}\sum_{n=1}^{N}(z_{bc}-\beta_c^{(z)})^2},

followed by an affine normalization or activation step intended to produce style weights βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}0. The printed formula is described as somewhat garbled in the manuscript, but the intended operation is standard BN-like normalization followed by affine transformation:

βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}1

Finally, the original feature map is recalibrated by the learned channel-wise style weights:

βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}2

The effect is to emphasize informative style channels while suppressing less useful ones. In the reported interpretation, this helps FE-TResNet focus on texture and structure cues, better model fine-grained food appearance, and preserve more meaningful spatial detail than a purely global style pooling scheme (Liu et al., 17 Jul 2025).

4. Deep Channel-wise Attention

DCA is introduced to capture dependencies that ordinary convolution may miss. It is described as inspired by non-local and criss-cross style attention, but adapted to be more efficient and more suitable for high-resolution image processing. The stated motivation is threefold: local convolutions cannot fully connect distant but related pixels, non-local attention is expensive, and criss-cross attention may still be insufficient for some high-resolution, detail-heavy food images. DCA therefore combines depthwise separable convolution, criss-cross-like sparse attention, and two-pass aggregation to approximate dense contextual interaction (Liu et al., 17 Jul 2025).

The input to DCA is the SE-refined feature map

βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}3

Two feature maps, βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}4 and βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}5, are obtained using depthwise separable βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}6 convolutions with reduced channel dimension βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}7. For each spatial location βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}8, βbc=1HW∑h=1H∑w=1Wxbchw\beta_{bc} = \frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W} x_{bchw}9, while αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.0 contains the αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.1 points on the same row and column as αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.2. The affinity is computed as

αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.3

and the attention map is obtained by softmax:

αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.4

The paper writes the tensor shapes as

αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.5

A third αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.6 convolution produces the value feature map

αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.7

For each pixel αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.8, the corresponding row and column value features are weighted by αbc=1HW∑h=1H∑w=1W(xbchw−βbc)2.\alpha_{bc} = \sqrt{\frac{1}{HW}\sum_{h=1}^{H}\sum_{w=1}^{W}(x_{bchw}-\beta_{bc})^2}.9 and aggregated back into the original feature stream. The output is expressed as

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],0

In words, the original features are enriched with row and column contextual information.

The module is then applied a second time using tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],1 as the new input:

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],2

The two DCA passes share parameters, so the richer context does not introduce extra parameters. The reported contribution of DCA is to connect distant pixels, capture object parts and small details that convolution may miss, improve recognition of high-resolution food images, and fuse local and global information while remaining more efficient than full non-local attention (Liu et al., 17 Jul 2025).

A plausible implication is that DCA serves as the principal mechanism by which FE-TResNet compensates for the locality bias of convolution in later semantic stages, whereas StyleRM primarily reshapes channel responses around style statistics earlier in the hierarchy.

5. Training protocol, datasets, and evaluation criteria

The model was evaluated on two Chinese food datasets used as fine-grained food recognition benchmarks: ChineseFoodNet and CNFOOD-241 (Liu et al., 17 Jul 2025).

Dataset Images Categories
ChineseFoodNet 185,628 208
CNFOOD-241 191,811 241

For CNFOOD-241, all images are standardized to tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],3 pixels. Training preprocessing includes random cropping, scaling to fixed input size, and AutoAugment for automated augmentation such as rotations, cropping, and scaling. Validation preprocessing uses resize to fixed size and CenterCrop.

The reported training setup distinguishes pretraining from finetuning. During pretraining, the model is TResNet, the dataset is ImageNet-21K, the input is 224, the number of epochs is 300, the batch size is 24, the optimizer is SGD, the learning rate is tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],4, learning-rate decay is cosine, weight decay is 0.01, and warmup epochs are 5. During finetuning of FE-TResNet, the dataset is ChineseFoodNet or CNFOOD-241, the input is 224, the number of epochs is 100, the batch size is 48, the optimizer is Adam, the learning rate is tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],5, learning-rate decay is cosine, weight decay is tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],6, and warmup epochs are 0. The implementation environment is reported as PyTorch on an NVIDIA GeForce RTX 2080 Ti GPU (Liu et al., 17 Jul 2025).

The evaluation metrics are Top-1 Accuracy, Top-5 Accuracy, Precision, Recall, and F1 score, together with parameter count, FLOPs, and memory usage. The paper gives the standard formulas:

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],7

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],8

tbc=[βbc,αbc],t_{bc} = [\beta_{bc}, \alpha_{bc}],9

and

t∈XB×C×2.t \in \mathbb{X}^{B \times C \times 2}.0

6. Empirical performance and ablation findings

The reported benchmark results show that FE-TResNet improves over the listed baselines on both datasets (Liu et al., 17 Jul 2025).

Dataset FE-TResNet Reported comparison
ChineseFoodNet 81.37% Top-1, 97.86% Top-5 ResNet50: 78.24%; TResNet-XL: 80.85%; EfficientNetV2-S: 81.11%
CNFOOD-241 80.29% Top-1, 97.97% Top-5 ResNet50: 76.49%; TResNet-XL: 79.85%; EfficientNetV2-S: 79.61%

These two headline Top-1 accuracies, 81.37% on ChineseFoodNet and 80.29% on CNFOOD-241, are the best results reported in the table. On ChineseFoodNet, FE-TResNet also reaches F1 of 80.37%, Precision of 80.88%, and Recall of 80.18%. On CNFOOD-241, it reaches F1 of 79.61%, Precision of 79.51%, and Recall of 80.27%. This indicates that the model is not only more accurate in Top-1 terms, but also more balanced across precision and recall.

The ablation study isolates the contribution of the two inserted modules. Baseline TResNet-XL attains 80.85% on ChineseFoodNet and 79.85% on CNFOOD-241. Adding StyleRM only raises performance to 81.22% and 80.15%, respectively. Adding DCA only yields 80.91% and 79.92%. Combining StyleRM and DCA produces 81.37% and 80.29%. The reported interpretation is that both modules help, StyleRM provides the larger single-module gain, DCA adds complementary contextual information, and the combination yields the best result (Liu et al., 17 Jul 2025).

The computational tradeoff is also explicit. Relative to plain TResNet-XL, model complexity increases from 76.33M parameters and 15.17G FLOPs to 82.95M parameters and 15.82G FLOPs. The paper further notes higher memory usage. The accuracy gain is therefore accompanied by a nontrivial increase in parameters, FLOPs, and training cost.

7. Scope, significance, and limitations

The reported conclusions are that FE-TResNet is effective for fine-grained food classification, improves TResNet by adding style-aware and context-aware feature enhancement, better handles intra-class variation and inter-class similarity, and achieves state-of-the-art results on the two Chinese food datasets tested (Liu et al., 17 Jul 2025). In condensed form, the model improves food recognition because it learns both texture- or style-level appearance cues and larger spatial relations among food parts.

Its significance lies in the specific combination of an efficiency-oriented CNN backbone with two targeted enhancement mechanisms. StyleRM addresses subtle appearance statistics, while DCA addresses long-range contextual dependency. This pairing suggests a design principle for fine-grained recognition in domains where visual classes differ more by surface structure and localized composition than by coarse silhouette.

The limitations stated in the source are equally clear. Validation has been performed only on food datasets, the model has not yet been tested on other image domains, and the increase in parameters and FLOPs is nontrivial. The future directions proposed by the authors are extending FE-TResNet to more general computer vision tasks, improving scalability and extensibility, and applying it to more complex classification problems beyond food recognition (Liu et al., 17 Jul 2025).

These limitations also bound the interpretation of the reported results. The current evidence establishes effectiveness on Chinese food image benchmarks, but not domain generality. Any broader claim about transfer to non-food fine-grained classification would therefore be an inference rather than a demonstrated result.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Feature-Enhanced TResNet (FE-TResNet).