← Latest papers
💻 computer science

Contrastive-SDXL: Annotation-Preserving Night-Time Augmentation for Pedestrian Detection

This paper introduces Contrastive-SDXL, a day-to-night augmentation framework leveraging SDXL-Turbo and LoRA with semantic contrastive losses to generate realistic, annotation-preserving night-time images that significantly improve pedestrian detection performance compared to daytime-only training.

Original authors: Franky George, Muhammad Khalid, Adil Khan

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: Franky George, Muhammad Khalid, Adil Khan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: Teaching Cars to See in the Dark

Imagine you are teaching a robot to walk through a busy city. You have thousands of photos of the city during the day, where the sun is shining, and you've drawn boxes around every person to show the robot who they are. The robot learns perfectly.

But then, you take the robot out at night. Suddenly, the robot gets confused. The streetlights, shadows, and darkness look nothing like the sunny photos it studied. It might miss a person entirely or think a shadow is a person.

The obvious solution is to take thousands of photos at night and draw boxes around people again. But this is expensive, slow, and hard to do everywhere.

The Proposed Solution: A "Magic Translator"

The authors of this paper built a tool called Contrastive-SDXL. Think of it as a magic photo translator.

Instead of taking new photos at night, this tool takes your existing sunny daytime photos and instantly turns them into realistic-looking night photos. The best part? It keeps the "boxes" (the annotations) exactly where they were. If a person was in the middle of the road in the day, they are still in the middle of the road at night. This allows the robot to learn from the night photos without anyone having to manually draw new boxes.

The Challenge: Don't Lose the People!

Here is the tricky part. If you just use a standard "night-mode" filter or a basic AI, it might turn the sky black and the street dark, but it could accidentally erase the people, stretch them into weird shapes, or move them to the sidewalk. If the AI moves the person, the "box" you drew earlier is now wrong, and the robot learns the wrong lesson.

The paper argues that for safety-critical tasks (like avoiding pedestrians), the translation must be perfect. The person must stay exactly where they are, looking like a person, just in the dark.

How They Fixed It: The "Strict Editor" and the "Smart Eye"

To make sure the magic translator doesn't mess up the people, the authors added two special "safety guards" to their system:

  1. The "Smart Eye" (DINOv2):
    Imagine you have a translator that speaks a different language. If you ask it to translate a story, it might change the plot. To stop this, you hire a "Smart Eye" (a pre-trained AI called DINOv2) that doesn't know how to translate, but it does know what objects look like.
    The system checks every patch of the new night photo against the old day photo. The "Smart Eye" says, "Wait, that patch in the day photo was a person's leg. In the night photo, that patch is still a person's leg. Good." If the leg turned into a tree, the system rejects it. This ensures the meaning of the image stays the same, even if the lighting changes.

  2. The "Strict Editor" (Object Consistency Loss):
    This is like a boss who only cares about one thing: Are the people still there?
    The system uses a specialized pedestrian detector (a robot trained to find people) to look at the new night photo. If the detector can't find the person in the new photo, the system knows it failed. It forces the translator to try again until the person is clearly visible and in the right spot.

The Result: A Perfect Practice Ground

The authors tested their tool and found:

  • It looks real: The fake night photos look almost indistinguishable from real night photos (measured by a score called FID, where they got a very low, good score of 22.5).
  • It works better than others: They compared their tool to other popular AI translators. The others either made the images too dark, lost the people, or created weird artifacts. Their tool kept the people safe and clear.
  • It trains better robots: When they used these fake night photos to train a pedestrian detector, the robot got much better at spotting people in the dark. In fact, a robot trained on their fake night photos performed almost as well as a robot trained on thousands of real night photos.

The Bottom Line

This paper presents a way to turn sunny day photos into realistic night photos without losing the people in them. By using a "Smart Eye" to check the details and a "Strict Editor" to ensure people aren't erased, they created a safe, high-quality practice ground for self-driving cars. This means we can teach cars to see in the dark much faster and cheaper than before, without needing to collect millions of dangerous night-time driving videos.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →