DTP: Advancing Gender Classification through Directional Edge Quantization

Facial feature representation with directional ternary pattern (DTP): Application to gender classification

2012-08-01
Faisal Ahmed, Md. Hasanul Kabir
Summary
Problem
Method
Results
Takeaways
Abstract

This paper introduces the Directional Ternary Pattern (DTP), a novel facial feature descriptor for gender classification. DTP encodes local texture by quantizing directional edge responses into three levels, achieving a SOTA classification accuracy of 93.11% on the FERET database.

TL;DR

Determining gender from facial images remains a cornerstone of biometrics and HCI. This paper proposes the Directional Ternary Pattern (DTP), a robust descriptor that moves beyond simple pixel comparisons. By encoding the "significance" of edges in eight directions and using a ternary logic to handle smooth surfaces, DTP achieves a superior 93.11% accuracy on the FERET database, proving more resilient than traditional LBP or LDP methods.

Problem & Motivation: The Fragility of Local Patches

Most facial recognition pipelines rely on local descriptors to build a feature vector. However, the industry-standard Local Binary Pattern (LBP) has a fatal flaw: it is binary. A tiny shift in lighting or a speck of sensor noise can flip a bit, leading to inconsistent features.

While newer methods like Local Directional Pattern (LDP) utilize edge responses (which are more stable than raw light intensity), they force a binary choice on every direction. This creates "unstable codes" in smooth areas of the face—like the forehead or cheeks—where there isn't actually a dominant edge. The authors' intuition was simple: if we can't find a strong edge, we should label it as 'neutral' (0) rather than forcing it into a binary 0 or 1.

Methodology: The Power of Eight Directions

DTP transforms the image into a more stable representation through a three-step process:

  1. Directional Filtering: Instead of comparing center pixels to neighbors, DTP applies Robinson masks in eight orientations (North, East, South, West, and diagonals) to calculate the "edge response" for every pixel.
  2. Ternary Quantization: Unlike binary patterns, DTP compares each response to the average () of all eight responses. It uses a threshold ():
    • +1: If the response is significantly higher than average (strong edge).
    • 0: If the response is near the average (smooth texture).
    • -1: If the response is significantly lower than average.
  3. Code Splitting: To keep the feature vector manageable, the ternary code is split into a Positive DTP (PDTP) and a Negative DTP (NDTP), which are converted into histograms.

Model Architecture: DTP Encoding Workflow Above: The DTP operator converts image gradients into stable ternary codes, capturing the local "pulse" of the texture.

Spatial Intelligence

To capture the global structure of a face (e.g., the position of eyes vs. mouth), the authors don't just aggregate one histogram. They partition the face into a grid (e.g., ) and concatenate the histograms from each sub-region. This injects spatial context into the machine learning model (SVM), allowing it to recognize that a specific edge pattern near the jawline is more indicative of gender than one on the forehead.

Spatial Partitioning

Experimental Validation

Testing on 1,800 images from the FERET database, the authors conducted a rigorous 10-fold cross-validation.

Key Findings:

  • The Threshold Matters: A threshold of was found to be the "sweet spot" for filtering noise without losing vital facial details.
  • Resolution of Grid: Increasing the grid from to significantly boosted accuracy (from 85.78% to 93.11%), highlighting the importance of local spatial relationships.
  • Superiority Over SOTA: DTP consistently outperformed LBP and the more recent LDP, particularly because LDP's binary nature struggled with the "smooth" regions of the face.

Performance Comparison Table

Critical Analysis & Conclusion

Takeaway

The Directional Ternary Pattern successfully marries two powerful concepts: directional edge stability and ternary noise-insensitivity. It effectively solves the instability of LDP in smooth regions while retaining the computational efficiency required for real-time biometrics.

Limitations

While DTP is robust, the current implementation results in a fairly large feature vector (25,088 dimensions for a grid), which may increase latency in low-power mobile applications. Furthermore, the threshold is "user-specified," suggesting that an adaptive threshold based on local image contrast might be a valuable future improvement.

Future Outlook

DTP provides a template for how we can "clean" input data before feeding it into classifiers. In the era of Deep Learning, DTP-like layers could serve as non-trainable, robust front-ends to CNNs, potentially reducing the massive data requirements for training gender-specific models.

Find Similar Papers

Try Our Examples

  • Search for recent papers that extend ternary patterns to multi-scale or volumetric (3D) directional features for facial analysis.
  • Which paper first introduced the Robinson mask for texture description, and how does DTP modify that original philosophy?
  • Explore if Directional Ternary Pattern (DTP) has been adapted for deep learning as a handcrafted local layer in Convolutional Neural Networks (CNNs).
Contents
DTP: Advancing Gender Classification through Directional Edge Quantization
1. TL;DR
2. Problem & Motivation: The Fragility of Local Patches
3. Methodology: The Power of Eight Directions
4. Spatial Intelligence
5. Experimental Validation
6. Critical Analysis & Conclusion
6.1. Takeaway
6.2. Limitations
6.3. Future Outlook