Training Thermal AI Models for Real-World Conditions: Data Diversity and Domain Shift
Quick answer: a thermal AI model that performs well in the lab can fail outdoors because the data it sees in deployment is different from the data it was trained on. Background temperature, season, weather, sensor noise, lens and mounting all change the image. This is domain shift, and it is often a bigger risk than the model architecture.
This guide explains where domain shift comes from, how to test for it, and how to collect data that reflects the actual product.
1. What domain shift means
In machine learning, the training distribution and the deployment distribution are not the same. A thermal detector model trained on summer scenes may see a different background contrast in winter. A model trained on one camera may see a different noise pattern, focus or field of view on another.
The model has learned features that correlate with the training data, not necessarily the physics of the target. When the correlation changes, accuracy drops.

2. Sources of shift in thermal imaging
- Season and weather: background temperature, humidity, rain, snow and sun angle.
- Time of day: solar loading and thermal inertia change contrast.
- Sensor: detector response, NUC state, noise and bad pixels.
- Optics: lens, focus, field of view and window transmission.
- Installation: mounting angle, vibration, heat from nearby equipment.
- Target: clothing, material, posture, motion and occlusion.
- Processing: AGC, DDE, palette, compression and frame rate.
Each factor can shift the distribution. Together they can make a model that looked excellent in a demo unreliable in the field.
3. Why a thermal model is not automatically robust
Thermal images have less texture than visible images. A model may rely on a silhouette, a temperature gradient or a background edge. Those cues can disappear when the scene changes. A person against a cold sky is very different from a person against a warm wall.
Thermal cameras also have fixed-pattern noise and NUC artifacts that can look like features. If the training data came from one camera and the deployment uses another, the model may learn the camera rather than the target.
4. A validation matrix
| Dimension | Test | What it reveals |
|---|---|---|
| Season | Summer vs winter scenes | Background contrast shift |
| Weather | Clear, rain, fog, snow | Contrast and noise changes |
| Time | Dawn, noon, night | Solar loading and thermal inertia |
| Sensor | Two camera samples | Noise, NUC and unit variation |
| Installation | Different angles and heights | Background and occlusion |
| Target | Clothing, posture, distance | Feature and scale variation |
5. Data collection that helps
Collect data with the actual camera, lens and processing chain. Record the conditions: ambient temperature, weather, distance, background, target and camera settings. A large dataset from one day is less useful than a smaller dataset that spans conditions.
Keep a held-out test set from a different day, site or camera. If the model only works on the training site, it has not generalized. Test the model after NUC, AGC and compression, because those steps change the image the model sees.

6. Mitigation
- Train with data from multiple sites and cameras.
- Normalize the input consistently with the deployed pipeline.
- Use augmentation that reflects real thermal variation, not only geometric transforms.
- Monitor confidence and false alarms in the field.
- Keep a fallback rule or a human review step for uncertain cases.
- Recalibrate or fine-tune when the sensor or optics change.
No model is immune to domain shift. The practical goal is to detect it, bound it and decide what the product should do when the model is uncertain.

7. A field monitoring plan
Log the model confidence, the false-alarm rate and a sample of the input frames after deployment. Segment the log by site, weather and time of day. If one site or one camera shows a drop, compare its NUC state, lens and mounting with the others.
Keep a small human-reviewed set of field frames for retraining. Do not retrain on every false alarm; first check whether the alarm was caused by a scene condition the product was never designed to handle. A model that is 95% accurate on the training site can still be 60% accurate at a new site.
Define the fallback behavior before launch: a confidence threshold, a human review step or a conservative “unknown” output. The system should fail visibly, not silently produce a confident wrong answer.
Frequently asked questions
Can a bigger model solve domain shift?
It can help, but it does not replace representative data. A larger model trained on the wrong distribution can still fail.
Do I need a thermal camera for training data?
Yes, if the product uses thermal images. Visible-to-thermal synthesis can help, but it does not capture the real noise, NUC and contrast of the deployed sensor.
How often should I retrain?
It depends on the product and the environment. Monitor false positives, missed detections and confidence. Retrain when the data shows a real shift, not on a fixed schedule alone.
Which ERDI interface helps data collection?
Raw or temperature data is more useful than a compressed display stream. Review the raw 14-bit data guide and the SDK integration guide. The ERUTM64-9 is a starting point.
Next step: define the deployment conditions and collect a validation set that spans them. Contact ERDI with the sensor, host and target profile for a data-path review.
