CoolFace
Modelpublic

Trendyol/trendyol-yolov9-ecommerce-object-detector

sourceHugging Facecc-by-sa-4.0updated 4d agoView on Hugging Face
1likes34downloads
Model Card

Trendyol YOLOv9 E-commerce Object Detector

YOLOv9-m object detector trained for product and object localization in e-commerce images.

Paper: TBD — "Visual Search at Trendyol" (in review) This Hub release contains the epoch-41 ONNX export and a small Python inference helper that follows the preprocessing and postprocessing used by the Trendyol object-detection service.

Sources and acknowledgements

The initial YOLOv9 implementation was based on MultimediaTechLab/YOLO, the official YOLOv9/YOLOv7/YOLO-RD implementation by Kin-Yiu Wong and Hao-Tang Tsui. The upstream repository is released under the MIT License. The upstream copyright and permission notice is included in the repository's LICENSE file alongside the Trendyol model license.

This release contains Trendyol-specific training, export, preprocessing, postprocessing, class mapping, and inference changes. It is not an official release of the upstream project.

Model details

  • —Architecture: YOLOv9-m
  • —Format: ONNX
  • —Input: RGB image, resized with aspect-ratio preservation and centered on a 640×640 canvas
  • —Padding: (114, 114, 114)
  • —Output: 84 product/object classes
  • —Raw output: 18 detection-head tensors; decoding and NMS are outside the ONNX graph
  • —Raw class IDs: one-based in the YOLOv9 output path; the production mapping is public_id = raw_id - 1
  • —Default postprocessing: confidence 0.10, IoU 0.50, maximum 10 detections

Quick start

bash
pip install -r requirements.txt
python
from PIL import Image
from inference import YOLOv9Detector

detector = YOLOv9Detector.from_pretrained(".")
detections = detector(Image.open("image.jpg"))

for detection in detections:
    print(detection)

Each detection has this shape:

python
{
    "box": [x1, y1, x2, y2],  # pixel coordinates in the original image
    "score": 0.91,
    "class_id": 66,
    "class_name": "Üst Giyim",
    "class_name_en": "Upper Garments",
}

To use a different threshold or limit:

python
detections = detector(
    "image.jpg",
    confidence_threshold=0.10,
    iou_threshold=0.50,
    max_detections=10,
)

Input/output contract

The ONNX model input is named input and has shape [batch, 3, 640, 640] with float32 values. The model emits 18 raw tensors. The first nine are the main detection path at strides 8, 16, and 32; the remaining nine are auxiliary outputs and are not needed for inference.

For low-level ONNX Runtime usage, see config.json, classes.json, and inference.py. The helper is recommended because it performs the raw YOLOv9 decoding, coordinate restoration, class-wise NMS, and production class-ID conversion.

Classes

classes.json contains the public zero-based class mapping with corrected Turkish and English names. The public list intentionally contains no temporary, training-only, or legacy spelling fields.

Intended use

  • —object detection for product and visual-search pipelines
  • —product crop generation
  • —e-commerce image understanding
  • —research and benchmarking of ONNX object detectors

Limitations

  • —The model is optimized for Trendyol-style e-commerce product imagery and may perform poorly on unrelated photographs.
  • —Detection scores are model confidence scores, not calibrated probabilities.
  • —The model predicts taxonomy classes used by the training and production pipeline; it is not a general-purpose COCO detector.
  • —The default helper returns the top 10 detections after class-wise NMS. Changing thresholds can materially change results.
  • —The model card does not claim that the model is the newest production checkpoint; this release intentionally targets the older epoch-41 artifact.

License

The model and Trendyol-specific artifacts are licensed under CC BY-SA 4.0. Upstream-derived helper code is licensed under MIT. See LICENSE.

Citation

bibtex
@misc{trendyol-yolov9-ecommerce-object-detector,
  title={Trendyol YOLOv9 E-commerce Object Detector},
  author={Trendyol Data Science Team},
  year={2026},
  url={https://huggingface.co/Trendyol/trendyol-yolov9-ecommerce-object-detector}
}