VNPT AI
AI City Challenge 2024 · Track 41st placeGiải nhấtCVPR 2024 Workshops

Robust Data Augmentation and Ensemble Method for Object Detection in Fisheye Camera ImagesTăng cường dữ liệu và phương pháp ensemble bền vững cho phát hiện đối tượng trên ảnh camera mắt cá (fisheye)

VNPT AI's winning solution to Track 4 — Road Object Detection in Fish-Eye CamerasGiải pháp đạt giải nhất của VNPT AI cho Track 4 — Phát hiện đối tượng giao thông trên camera fisheye

Viet Hung Duong1Duc Quyen Nguyen1Thien Van Luong2,*Huan Vu3Tien Cuong Nguyen1
1VNPT AI, VNPT GroupVNPT AI, Tập đoàn VNPT2Phenikaa UniversityTrường Đại học Phenikaa3University of Transport and CommunicationsTrường Đại học Giao thông Vận tải*Corresponding authorTác giả liên hệ
PaperBài báoCodeMã nguồnResultsKết quảBibTeX
1stHạng 1in Track 4, 2024Track 4 năm 2024
0.64060,6406F1 on the test setF1 trên tập kiểm thử
+7.04+7,04F1 points over the Co-DETR baselineđiểm F1 so với Co-DETR cơ sở
7models in the final ensemblemô hình trong ensemble cuối

AbstractTóm tắt

In recent years, traffic surveillance systems have begun leveraging fisheye lenses to minimize the requisite number of cameras for comprehensive coverage of streets and intersections. However, as fisheye images have large radial distortion, they pose new challenges to standard object detection algorithms. In this study, we propose a robust object detection method in traffic scenarios using fisheye cameras. Specifically, we develop a novel data augmentation method, which is applied to VisDrone dataset. Note that we select this dataset for augmentation, since it bears resemblances to the Fisheye8K dataset. Furthermore, we leverage pseudo labels generated by a pre-trained object detection model based on the Fisheye8K and original VisDrone dataset to further enrich the training data. Finally, we utilize various state-of-the-art object detection models trained with different combinations of the proposed augmented data, which are then combined with robust ensemble techniques to further enhance the overall object detection performance. As a result, our proposed method achieves a final F1 score of 64.06% on the 2024 AI City Challenge - Track 4 and ranks first among the competing teams.Những năm gần đây, các hệ thống giám sát giao thông bắt đầu sử dụng ống kính mắt cá (fisheye) để giảm số lượng camera cần thiết mà vẫn bao quát được đường phố và giao lộ. Tuy nhiên, ảnh fisheye có độ méo xuyên tâm lớn, đặt ra thách thức mới cho các thuật toán phát hiện đối tượng tiêu chuẩn. Trong nghiên cứu này, chúng tôi đề xuất một phương pháp phát hiện đối tượng bền vững cho bối cảnh giao thông sử dụng camera fisheye. Cụ thể, chúng tôi xây dựng một phương pháp tăng cường dữ liệu mới áp dụng cho bộ dữ liệu VisDrone — được chọn vì có nhiều điểm tương đồng với bộ dữ liệu Fisheye8K. Ngoài ra, chúng tôi tận dụng nhãn giả sinh ra bởi một mô hình phát hiện đối tượng đã huấn luyện trên Fisheye8K và VisDrone gốc để làm giàu thêm dữ liệu huấn luyện. Cuối cùng, chúng tôi sử dụng nhiều mô hình phát hiện đối tượng hiện đại, huấn luyện với các tổ hợp dữ liệu tăng cường khác nhau, rồi kết hợp chúng bằng kỹ thuật ensemble bền vững để nâng cao hiệu năng tổng thể. Kết quả, phương pháp đạt F1 cuối cùng 64,06% tại AI City Challenge 2024 – Track 4 và xếp hạng nhất trong các đội tham gia.

Source: CVPR 2024 Workshops paper.Nguồn: bài báo tại CVPR 2024 Workshops (bản tiếng Việt được dịch).

The TaskBài toán

GoalMục tiêu

Detect road users in images from fisheye traffic cameras, whose strong radial distortion stretches and bends objects near the edge of the frame.Phát hiện các đối tượng giao thông trong ảnh từ camera fisheye — loại ảnh có độ méo xuyên tâm lớn khiến đối tượng ở rìa khung hình bị kéo giãn và uốn cong.

DataDữ liệu

FishEye8K: 5,288 training and 2,712 validation images (1080×1080 and 1280×1280, 157K boxes). Test set: FishEye1K-eval, 1,000 images from 11 unseen cameras.FishEye8K: 5.288 ảnh huấn luyện và 2.712 ảnh validation (1080×1080 và 1280×1280, 157 nghìn box). Tập kiểm thử: FishEye1K-eval gồm 1.000 ảnh từ 11 camera chưa xuất hiện khi huấn luyện.

5 classes5 lớp

Bus, Bike, Car, Pedestrian, Truck

MetricThước đo

F1-score — the harmonic mean of total precision and recall over the test set.F1-score — trung bình điều hòa giữa precision và recall tổng trên tập kiểm thử.

FrameworkKiến trúc tổng quan

Fisheye augmentationTăng cường dữ liệu fisheye
External dataDữ liệu ngoài
  • VisDrone mapped to the 5 FishEye8K classesVisDrone ánh xạ về 5 lớp của FishEye8K
  • Each image split into two squaresMỗi ảnh được cắt thành hai ảnh vuông
  • Fisheye warp of images and boxes → Synthetic VisDroneBiến đổi fisheye cho ảnh và box → Synthetic VisDrone
Multi-model trainingHuấn luyện nhiều mô hình
Different data combinationsNhiều tổ hợp dữ liệu
  • Co-DETR (Swin-L)
  • YOLOR-W6
  • YOLOv9-e
  • InternImage-L
Pseudo-labellingGán nhãn giả
Test-set enrichmentLàm giàu từ tập kiểm thử
  • Fuse the 3 fold models with WBFHợp nhất 3 mô hình theo fold bằng WBF
  • Keep confident boxes as labelsGiữ các box có độ tin cậy cao làm nhãn
  • Retrain Co-DETR on train + val + pseudoHuấn luyện lại Co-DETR trên train + val + nhãn giả
Ensemble
Final predictionDự đoán cuối cùng
  • Weighted Boxes Fusion of 7 modelsWeighted Boxes Fusion của 7 mô hình
  • Class-specific thresholds for day and night imagesNgưỡng riêng theo lớp cho ảnh ngày và đêm

Diagram summarising Sections 3–4 of the paper.Sơ đồ tóm tắt Mục 3–4 của bài báo.

MethodPhương pháp

  1. Choosing external dataLựa chọn dữ liệu ngoàiVisDrone, MIO-TCD and UAV were each added to FishEye8K; only VisDrone improved Co-DETR (49.05 vs 47.00 mAP), as it bears the closest resemblance to FishEye8K.Thử bổ sung lần lượt VisDrone, MIO-TCD và UAV vào FishEye8K; chỉ VisDrone giúp Co-DETR tốt hơn (49,05 so với 47,00 mAP) do có nhiều điểm tương đồng nhất với FishEye8K.
  2. Synthetic fisheye VisDroneVisDrone giả lập fisheyeEach VisDrone image is cut into two square halves and warped with a fisheye distortion (inspired by iFish); every box corner is transformed and the new box is their min/max envelope.Mỗi ảnh VisDrone được cắt thành hai nửa vuông và biến đổi méo fisheye (dựa trên iFish); từng góc của box được biến đổi và box mới là hình bao min/max của các góc.
    iFishVisDrone
  3. Diverse detectorsĐa dạng bộ phát hiệnCo-DETR (Swin-L), YOLOR-W6, YOLOv9-e and InternImage-L are trained on FishEye8K with VisDrone or Synthetic VisDrone; Co-DETR also on three camera-based folds, on train + val, and with pseudo-labels.Co-DETR (Swin-L), YOLOR-W6, YOLOv9-e và InternImage-L được huấn luyện trên FishEye8K kết hợp VisDrone hoặc Synthetic VisDrone; Co-DETR còn được huấn luyện trên ba fold chia theo camera, trên train + val và với nhãn giả.
    Co-DETRYOLOR-W6YOLOv9-eInternImage
  4. Pseudo-labelsNhãn giảPredictions of the three fold models on the test images are fused with WBF; confident boxes become extra training labels for a Co-DETR trained on train + val + pseudo-labels.Dự đoán của ba mô hình theo fold trên ảnh kiểm thử được hợp nhất bằng WBF; các box tin cậy trở thành nhãn bổ sung để huấn luyện Co-DETR trên train + val + nhãn giả.
  5. Weighted ensembleEnsemble có trọng sốSeven models are combined with Weighted Boxes Fusion, then filtered with class-specific score thresholds that differ between day and night images.Bảy mô hình được kết hợp bằng Weighted Boxes Fusion, sau đó lọc bằng ngưỡng điểm riêng cho từng lớp, khác nhau giữa ảnh ban ngày và ban đêm.
    WBF

ResultsKết quả

AI City Challenge 2024 · Track 4 leaderboardBảng xếp hạng AI City Challenge 2024 · Track 4

RankHạngTeam IDTeamĐộiF1
19VNPT AI0.6406
240Nota0.6196
35SKKU-AutoLab0.6194
463UIT_AICLUB0.6077
515SKKU-NDSU0.5965
633MCPRL0.5883

From the official 2024 challenge results — Track 4 winner: Team 9, VNPT AI.Theo kết quả chính thức năm 2024 — đội thắng Track 4: Team 9, VNPT AI.

Ablation on the test setĐóng góp của từng thành phần (tập kiểm thử)

ConfigurationCấu hìnhF1 (%)
Baseline — Co-DETR, fold 0Cơ sở — Co-DETR, fold 057.02
+ pseudo-labels+ nhãn giả62.46
+ synthetic VisDrone + ensemble (final)+ Synthetic VisDrone + ensemble (cuối cùng)64.06

Detectors on the FishEye8K validation setCác bộ phát hiện trên tập validation FishEye8K

ModelMô hìnhExtra training dataDữ liệu bổ sungmAP0.5:0.95
Co-DETR (Swin-L)nonekhông47.00
Co-DETR (Swin-L)VisDrone49.05
Co-DETR (Swin-L)Synthetic VisDrone45.78
YOLOv9-eVisDrone43.89
YOLOR-W6VisDrone43.47
InternImage-LVisDrone41.11

Ablation and validation numbers are from the paper (Tables 1, 2 and 9).Số liệu ablation và validation lấy từ bài báo (Bảng 1, 2 và 9).

ReproduceChạy lại kết quả

Requirements: git-lfs, condaYêu cầu: git-lfs, conda
Hardware: 1 DGX node, 8× A100 80 GBPhần cứng: 1 node DGX, 8× A100 80 GB
Datasets: FishEye8K, VisDrone2019-DET, FishEye1K-evalDữ liệu: FishEye8K, VisDrone2019-DET, FishEye1K-eval
Final step: infer/fuse_results.pyBước cuối: infer/fuse_results.py
# Setup
git lfs install
git clone https://github.com/VNPT-AI-Official/AICITY2024_Track4.git
cd AICITY2024_Track4
pip install -r requirements.txt

# VisDrone -> YOLO labels (mapped to FishEye8K classes), then fisheye conversion
python ./dataprocessing/format_conversion/visdrone2yolo.py --data_path ./dataset/visdrone/VisDrone2019-DET-train
python ./dataprocessing/ifish_augmentation/convert_visdrone.py --src_path ./dataset/visdrone --trg_path ./dataset/synthetic_visdrone --distortion 0.5 --data_type VisDrone2019-DET-train --crop True
# Train (example: Co-DETR on VisDrone + FishEye8K fold 0, 4 GPUs)
cd ./train/CO-DETR
tools/dist_train.sh projects/CO-DETR/configs/codino/train_fold0.py 4

# Inference (example: Co-DETR fold 0)
cd ./infer/CO-DETR
tools/dist_test.sh projects/CO-DETR/configs/codino/infer_fold0.py ../../checkpoints/best_vis_fish_fold0.pth 4

# Ensemble all model outputs with WBF
cd ./infer/
python fuse_results.py

Condensed from the repository README — see the README for the environment of each detector, every training/inference command and the checkpoints.Rút gọn từ README của repo — xem README để biết môi trường cho từng bộ phát hiện, đầy đủ lệnh huấn luyện/inference và checkpoint.

BibTeX

@InProceedings{Duong_2024_CVPR,
    author    = {Duong, Viet Hung and Nguyen, Duc Quyen and Van Luong, Thien and Vu, Huan and Nguyen, Tien Cuong},
    title     = {Robust Data Augmentation and Ensemble Method for Object Detection in Fisheye Camera Images},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2024},
    pages     = {7017-7026}
}