Source-linked AI summary

Deep Imbalanced Attribute Classification using Visual Attention Aggregation

Nikolaos Sarafianos, Xiang Xu, Ioannis A. Kakadiaris

arXiv:1807.03903v2cs.CV

TL;DR

Human visual attribute classification must handle multi-label outputs, severe class imbalance, and missing spatial annotations. The paper addresses these issues with a simple multi-scale attention architecture and imbalance-aware losses, achieving state-of-the-art results on PETA and WIDER-Attribute. Its error analysis identifies fixed square resizing and annotation uncertainty as remaining constraints.

  • Problem

    Human attribute classification is a multi-label problem with large class imbalance and no ground-truth spatial attention annotations.

  • Method

    The method extracts and aggregates weakly supervised visual attention masks at multiple scales and uses losses for class imbalance, hard samples, and high prediction variance.

  • Results

    The approach achieves state-of-the-art visual attribute classification results on both WIDER-Attribute and PETA.

  • Takeaways & Limitations

    A simple, reproducible attention architecture can address spatial relevance and imbalanced learning without additional context or side information.

  • Takeaways & Limitations

    Fixed square resizing of rectangular human crops can discard important spatial information, while uncertain annotations can dilute learning.

Abstract

from arXiv · show

For many computer vision applications, such as image description and human identification, recognizing the visual attributes of humans is an essential yet challenging problem. Its challenges originate from its multi-label nature, the large underlying class imbalance and the lack of spatial annotations. Existing methods follow either a computer vision approach while failing to account for class imbalance, or explore machine learning solutions, which disregard the spatial and semantic relations that exist in the images. With that in mind, we propose an effective method that extracts and aggregates visual attention masks at different scales. We introduce a loss function to handle class imbalance both at class and at an instance level and further demonstrate that penalizing attention masks with high prediction variance accounts for the weak supervision of the attention mechanism. By identifying and addressing these challenges, we achieve state-of-the-art results with a simple attention mechanism in both PETA and WIDER-Attribute datasets without additional context or side information.

1 Introduction

Human visual attribute classification is challenging because it is multi-label, highly imbalanced, and lacks spatial annotations. The paper proposes a simple multi-scale attention architecture with losses designed for imbalance and uncertain attention predictions.

  • Motivation: Human attributes are multi-label and imbalanced, causing models to favor majority classes and miss subtle features of under-represented classes.In CelebA, bald individuals with a mustache wearing glasses are 14 to 43 times less likely than people without these characteristics.
  • Motivation: Visual attention can improve interpretability and performance, but human attribute datasets lack ground-truth attention annotations.
  • Approach: The proposed approach combines pre-trained feature extraction, weakly supervised multi-scale attention, and a loss handling imbalance, hard examples, and uncertain samples.
  • Contributions: Attribute-level supervision lets a simple attention mechanism guide the network toward spatially relevant image regions without ground-truth attention masks.
  • Contributions: Aggregating attention masks from multiple network stages at the score level helps the model learn more discriminant feature representations.
  • Contributions: A weighted focal loss handles class imbalance while focusing on hard examples, and an attention loss penalizes predictions from high-variance masks.

2 Related Work

Prior visual attribute methods use context, side information, curriculum learning, or attention, while imbalanced-learning methods often overlook spatial and semantic relations. The paper’s framework combines attribute-specific attention with imbalance-aware learning under weak supervision.

  • Visual Attributes and Attention: Visual attribute methods have relied on contextual information, side information, curriculum learning, or visual attention mechanisms.
  • Visual Attributes and Attention: Predefined spatial connections between body parts and attributes can fail under varied poses and viewpoints.For example, hats are not always above the head or in the upper 20% of the image.
  • Visual Attributes and Attention: Existing attention approaches identify attribute-specific regions, but the available methods described do not account for class imbalance.
  • Deep Imbalanced Classification: Imbalanced-learning methods use sampling or specialized losses, but over-sampling can encourage over-fitting and under-sampling can remove discriminative information.
  • Proposed Direction: The proposed design places attention mechanisms at multiple network levels and aggregates their predictions while training with attribute-level supervision.

3 Methodology

The method uses attribute-specific attention masks at multiple feature scales, confidence weighting, and losses designed for class imbalance and weak spatial supervision.

  • Multi-scale Visual Attention and Aggregation: Attribute-specific attention maps are produced from feature representations at multiple spatial resolutions and normalized to focus on relevant image regions.The primary network uses representations after the third and fourth stages, corresponding to 14 × 14 and 7 × 7 resolutions for 224 × 224 images.
  • Multi-scale Visual Attention and Aggregation: Three 1 × 1 convolutional layers map feature channels to one attention map per attribute before spatial normalization.The final convolutional layer outputs C channels, matching the number of attributes.
  • Multi-scale Visual Attention and Aggregation: A confidence branch weights attention maps using attribute predictions and reduces learning from masks when the corresponding label is absent.The authors report that confidence weighting slightly improves performance and produces better saliency heatmaps.
  • Multi-scale Visual Attention and Aggregation: Attention outputs from different scales are aggregated at the prediction level because feature-level aggregation performed consistently worse.The authors attribute this to different scales emphasizing different spatial regions whose sum may lack attribute-discriminative information.
  • Deep Imbalanced Classification: The weighted focal loss addresses class imbalance through attribute weights and emphasizes hard misclassified positive samples through instance-level weighting.Its focusing parameter γ is set to 0.5, while wc = e^-ac uses the prior distribution of attribute c.
  • Deep Imbalanced Classification: Attention-mask predictions with high temporal standard deviation receive higher weights to guide learning on uncertain samples under weak supervision.The prediction history stores only the last five epochs for memory reasons, and separate attention losses are applied at the 14 × 14 and 7 × 7 levels.

4 Experiments

Experiments on WIDER-Attribute and PETA evaluate the proposed approach against established baselines, ablate its components, and examine attention behavior and limitations. The method achieves strong benchmark performance, while lightweight backbones retain most of the performance and qualitative failures expose weak-supervision and input-data constraints.

  • WIDER Ablations: Class-level and instance-level weighting increase the ResNet-101 baseline from 83.7% to 84.4% mAP on WIDER.Adding class weights raises mAP to 84.0%, and instance-level weighting raises it further to 84.4%.
  • Qualitative Results: Attention masks often localize attribute-specific regions, but weak supervision can place them incorrectly or make completely wrong guesses.Examples include locating sunglasses or hats near the top and formal clothes or long pants near the bottom, alongside failures for face masks and T-shirts.
  • PETA Results: On PETA, the approach achieves state-of-the-art results on all example-based metrics and ranks second to WPAL in balanced mean accuracy.Its F1 score is approximately 2% above fine-tuned ResNet-101, while replacing binary cross-entropy with weighted focal loss raises SRN’s F1 score by 1.7%.
  • Lightweight Backbone Ablation: DenseNet-121 uses 7.5× fewer parameters than ResNet-101, yet the full method loses less than 2% in F1 score.The study also compares alternative feature-mask aggregation strategies and reports that mapping larger masks to smaller ones with a stride-two convolution performed better than the alternatives.
  • Sources of Error and Further Improvements: Fixed square resizing can discard spatial information from rectangular human crops, while noisy, occluded, blurry, or uncertainly annotated images further constrain performance.The authors suggest whole-image processing with ROI pooling, spatial alignment, super-resolution, or richer multi-scale attention as possible improvements, but retain simplicity as a design goal.

5 Conclusion

The paper frames human visual-attribute learning as a multi-label problem with severe class imbalance and missing semantic or spatial annotations. Its simple multi-scale attention architecture and tailored losses achieve state-of-the-art results on WIDER-Attribute and PETA.

  • The task combines multi-label prediction with large class imbalance and a lack of semantic and spatial attribute annotations.
  • The architecture outputs visual attention masks at multiple scales to address the absence of attribute annotations.
  • A weighted focal loss handles prior class imbalance per attribute while focusing on hard misclassified positive samples.
  • An attention loss penalizes predictions associated with high variance in weakly supervised attention masks.
  • The method achieves state-of-the-art results on both WIDER-Attribute and PETA datasets.

Supplementary Material

The supplementary architecture uses a ResNet-101 backbone with attention modules at two network stages. These modules generate class-specific spatial attention, confidence weighting, and multi-attribute predictions.

  • Training: Training first freezes the pre-trained primary network while learning attention masks, then jointly trains the full network end-to-end.
  • Architecture Details: The ResNet-101 backbone extracts 7 × 7 × 2048 feature representations before a fully connected layer.
  • Architecture Details: Attention modules are placed on “stage3 activation22” and “stage4 activation2” to process features at multiple stages.
  • Architecture Details: Each attention module produces Cl spatial attention maps, normalizes them spatially, and multiplies them by sigmoid confidence weights.
  • Architecture Details: The attended outputs feed a C256-C512-C512-DCl subnetwork whose final convolution uses the spatial dimensions as its kernel size.
Loading 1807.03903v2…