Scalable Detection of Offensive and Non-compliant Content / Logo in Product Images

Shreyansh Gandhi, Samrat Kokkula, Abon Chaudhuri, Alessandro Magnani, Theban Stanley, Behzad Ahmadi, Venkatesh Kandaswamy, Omer Ovenc, Shie MannorWACV 2020 · DOI

TL;DR

This paper tackles the challenge of automatically detecting offensive and non-compliant content (like nudity, hate symbols, or misleading logos) in massive e-commerce product image catalogs. They introduce a computer vision system that combines state-of-the-art deep learning with clever data augmentation and a multi-stage inference approach to handle the scale and diversity of real-world retail data.

What Problem Does This Paper Address?

In e-commerce, product images are crucial for customer engagement and purchasing decisions. However, with the rise of third-party sellers, ensuring that these images adhere to "Trust & Safety" guidelines is a monumental task. Listings can contain offensive content (sexually explicit, violent, racist) or non-compliant elements (misleading logos, competitor branding). Manually reviewing millions of images is infeasible, and existing automated solutions struggle with the sheer scale, the constant evolution of guidelines, and the subtle nuances of what constitutes non-compliance. This paper aims to automate this detection process to protect customers, maintain brand integrity, and avoid legal issues.

Methods

The authors propose a multi-pronged approach to tackle the unique challenges of this problem:

  • Data Augmentation and Generation: Recognizing the scarcity of labeled offensive/non-compliant data, they employ several strategies:
  • Visual Similarity Search: Using pre-indexed image embeddings (from Inception-v3 and VGG16) to find images similar to known problematic ones, which can then be manually reviewed and added to training sets.
  • Synthetic Data Generation: For logo detection, they "superimpose" cropped logos (both non-compliant and similar-looking compliant ones) onto regular product images. This allows for generating a large number of labeled examples with precise bounding box annotations at low cost.
  • Iterative Training and Transfer Learning: They leverage pre-trained deep learning models (ResNet50, Inception-V3) and fine-tune them on their specific datasets, as training from scratch is not feasible due to data limitations.
  • Multi-stage Inference: To balance accuracy and computational cost, they use a tiered approach. A broad, fast classifier acts as an initial filter, categorizing images into types. Based on this categorization, specific, slower, but more accurate detectors (shallow classifiers on deep embeddings, fine-tuned deep neural nets, or object detectors like Faster R-CNN and YOLOv3) are then applied. This "two-stage inference" is particularly effective for content that appears only in specific product categories.
  • Crowdsourcing for Refinement: Baseline model predictions are used to identify high-confidence candidates for manual review by crowdsourced workers. This efficiently generates high-quality labeled data for further model training.

Datasets

The paper doesn't explicitly mention specific public datasets used for training or evaluation, but it refers to:

  • Internal E-commerce Catalog Data: The core dataset consists of millions of product images from an e-commerce catalog, representing a vast and diverse range of products and categories.
  • Publicly Available Brand-Logo Datasets: Mentioned in the related work section as examples like BelgaLogos and FlickrLogos-32, though not explicitly used in their experiments.
  • Synthetically Generated Datasets: The authors create large datasets of synthetic non-compliant images (especially for logos) by superimposing known problematic logos onto existing product images.

Key Insights and Ideas

  • Data Scarcity is the Primary Hurdle: The biggest challenge isn't necessarily the complexity of the models, but the sheer difficulty of obtaining enough labeled examples of offensive and non-compliant content.
  • Synthetic Data is a Game-Changer: Generating synthetic data, especially for logo detection, significantly reduces annotation costs and allows for precise bounding box generation, which is crucial for object detection models.
  • Multi-stage Inference is Key for Scale: A single, highly accurate model for every image is computationally prohibitive. A cascaded approach, starting with fast filters and progressing to specialized detectors, is essential for processing massive catalogs.
  • Fine-grained Classification is Tricky: Distinguishing between acceptable and unacceptable content often requires very nuanced understanding (e.g., assault rifle vs. hunting rifle), pushing the need for more sophisticated detection methods.
  • Data Quality Trumps Model Choice: The authors emphasize that the quality and quantity of the training data have a greater impact on performance than the specific deep learning architecture chosen.

Key Results

  • Logo Detection: Faster R-CNN achieved a 100% improvement in F1-score compared to retrained classification networks at a confidence score of 0.85, demonstrating the effectiveness of object detection for logo identification.
  • Nudity Detection: Fine-tuned Inception-v3 achieved an F1-score of 49.5%, significantly outperforming baseline methods. YOLOv3, when trained on a carefully crafted dataset, achieved a 54% lift in F1-score over the baseline.
  • System Deployment: The presented system is already deployed in production and has processed millions of product images, indicating its practical viability.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that even with their methods, achieving perfect detection is challenging, especially with subtle or novel forms of non-compliance.
  • The reliance on manual review for low-confidence predictions still requires human oversight.
  • The performance of third-party APIs for nudity detection was limited by their training data not matching the specific e-commerce catalog's distribution, leading to false positives.
  • Future Work:
    • Combining image and textual signals from product listings for more robust detection.
  • Developing systems that can detect unforeseen types of non-compliant cases with minimal retraining.
  • Extending these strategies to other content-serving platforms beyond e-commerce.

Summary updated

BibTeX
@inproceedings{gandhi2020scalable,
  author = {Shreyansh Gandhi and Samrat Kokkula and Abon Chaudhuri and Alessandro Magnani and Theban Stanley and Behzad Ahmadi and Venkatesh Kandaswamy and Omer Ovenc and Shie Mannor},
  title = {{Scalable Detection of Offensive and Non-compliant Content / Logo in Product Images}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2020},
  doi = {10.1109/wacv45572.2020.9093454},
}
Figure