Using heat images to sharpen street-scene segmentation at night
After dark, a normal camera sees very little, but a thermal camera still picks out warm things such as people. We built a small network that reads both a colour image and a thermal image of a street and labels every pixel with an object type. We then cleaned up the result using the thermal image to decide where object edges lie. On the night images, this gave higher scores than the competing models we compared (Tables I and II).
The problem
Night surveillance is a major use of thermal imaging, because ordinary cameras perform poorly in the dark. Our task was semantic segmentation, which means giving each pixel of a street scene a label such as person, car or bike. The simplest way to use two kinds of image is to stack them into one four-channel input. But the three colour channels depend on each other, while a thermal channel records properties such as surface quality and temperature, and may not correspond to the colour image pixel by pixel. So we gave each its own encoder.
How it works
The network has two encoders, one for the colour image and one for the thermal image. Both are based on the compact SegFast design, which uses cheap depth-wise separable convolutions inside Spark modules. A single decoder then enlarges the features, and at each size it joins the features from both encoders. The last layer gives a label for each pixel.

The outlines from a network like this can still be ragged. A conditional random field, or CRF, is a post-processing step that tidies them. It links neighbouring pixels: nearby pixels with similar intensity are encouraged to share a label. Normally the intensity is taken from the input picture, here the colour image. Our change was to compute that similarity from the thermal image instead, because the thermal spectrum depends on the heat properties of an object rather than on colour and lighting. The network's own pixel predictions stay as they are and serve as the starting guess.
What we found
We used a street-scene data set of 1,563 images, 820 taken by day and 743 at night, split roughly 2:1:1 into training, validation and test sets. We compared against SegNet, MFNet and RTFNet, applying both kinds of CRF to all four networks. We report average pixel-level accuracy and mean intersection over union (IoU), which scores how well each predicted region overlaps the true one.
On the night images our network with the thermal CRF reached an average accuracy of 0.8185 and a mean IoU of 0.6438. With the colour CRF it got 0.7340 and 0.5784, and with no CRF 0.6119 and 0.5681. RTFNet with the thermal CRF scored 0.7687 and 0.6293. On the full day-and-night set, our network scored 0.7398 and 0.6333 with the thermal CRF (Tables I and II).

The network is also small. It has 2.05 million parameters and 23.71 GFlops, against 29.45 million and 189.85 for SegNet, and 254.51 million and 337.46 for RTFNet. MFNet is smaller still, at 0.74 million parameters and 8.45 GFlops.

Results in more detail
The comparison networks were SegNet, MFNet and RTFNet. SegNet was given a four-channel input, the three colour channels plus the thermal one. MFNet and RTFNet were two earlier works that had already been run on this data set, and we re-ran them with their official code. We then applied the conditional random field to all four networks, once with the colour image (called CRF RGB in the tables) and once with the thermal image (CRF TH). The first table gives the average accuracy for each combination, by day and by night. A higher value is better, and the Mean row averages the four networks.
| Model | Day: no CRF | Day: CRF RGB | Day: CRF TH | Night: no CRF | Night: CRF RGB | Night: CRF TH |
|---|---|---|---|---|---|---|
| MFNet | 0.4887 | 0.6886 | 0.6422 | 0.6388 | 0.7303 | 0.7536 |
| RTFNet | 0.4933 | 0.5363 | 0.5452 | 0.7149 | 0.7775 | 0.7687 |
| SegNet | 0.3952 | 0.4959 | 0.4977 | 0.5055 | 0.5351 | 0.5130 |
| Proposed | 0.4320 | 0.5361 | 0.5449 | 0.6119 | 0.7340 | 0.8185 |
| Mean | 0.4523 | 0.5642 | 0.5575 | 0.6178 | 0.6942 | 0.7135 |
In accuracy, every network scores higher with either CRF than with none, by day and by night. For our network at night, accuracy goes from 0.6119 with no CRF to 0.7340 with the colour CRF and 0.8185 with the thermal CRF. The network-by-network picture at night is mixed. MFNet does best with the thermal CRF (0.7536), while RTFNet (0.7775 against 0.7687) and SegNet (0.5351 against 0.5130) do slightly better with the colour one (Table I).
The second table gives mean intersection over union (IoU), which scores how well each predicted region overlaps the true region. Here 1 would be a perfect overlap.
| Model | Day: no CRF | Day: CRF RGB | Day: CRF TH | Night: no CRF | Night: CRF RGB | Night: CRF TH |
|---|---|---|---|---|---|---|
| MFNet | 0.5682 | 0.6259 | 0.5012 | 0.5690 | 0.5888 | 0.5637 |
| RTFNet | 0.5563 | 0.5771 | 0.5892 | 0.6409 | 0.6420 | 0.6293 |
| SegNet | 0.3026 | 0.3220 | 0.3222 | 0.3924 | 0.4206 | 0.4225 |
| Proposed | 0.5259 | 0.4601 | 0.4510 | 0.5681 | 0.5784 | 0.6438 |
| Mean | 0.4883 | 0.4963 | 0.4659 | 0.5426 | 0.5575 | 0.5648 |
At night our network has the highest value in the table, 0.6438 with the thermal CRF, and the Mean row rises from 0.5426 without a CRF to 0.5575 and then 0.5648 (Table II). On the whole data set our network gets 0.5168 accuracy without a CRF, 0.6408 with the colour CRF and 0.7398 with the thermal CRF. Its mean IoU there is 0.5553, 0.5930 and 0.6333 (Table I and Table II).
In the day images the picture is different. MFNet has the highest accuracy with the colour CRF (0.6886), and for our network the day-time IoU is highest with no CRF at all (0.5259 against 0.4601 and 0.4510). SegNet has the lowest IoU in every column (Table II).
Discussion
We conclude that the proposed network performs better than many other state-of-the-art models, especially at night. Using the thermal image to define the pairwise potentials gave the best results on the night set and on the whole data set. On average, the thermal-based CRF is better than the colour-based one on both of those sets, while the colour-based CRF has the edge on the day set. The same trend appears with mean IoU.
We explain the pattern like this. In the daytime, sunlight and shadows make the thermal intensity maps very noisy compared with what the visible spectrum encodes. At night the tables turn: the visible spectrum fails to separate boundaries, but the thermodynamic properties of objects help to tell the types of object apart.
The results also show the limits of the method. The benefit depends on the time of day. It varies by network too: for RTFNet and SegNet individually the colour CRF scored slightly higher at night. Our network is much smaller than SegNet and RTFNet, but slightly larger than MFNet. The data set has 1,563 street images, of which 820 were taken by day and 743 at night, and we kept the split used by the original data set.
For future work we suggest more efficient ways of extracting features from several spectra, because that should produce better predictions for the CRF to start from.
Sources
The figures and tables listed here are taken from the paper cited at the top of this page; the numbers quoted in the text come from it too.
- Figures: Fig. 3, Fig. 6, Fig. 5
- Tables: Table I: average pixel-level accuracy of each network, with no CRF, a colour CRF and a thermal CRF, by day, night and overall; Table II: mean intersection over union for the same networks and settings
Cite the paper
A Dutta, B Mandal, Swarnendu Ghosh, N Das (2020). Using thermal intensities to build conditional random fields for object segmentation at night. 4th International Conference on Computational Intelligence and Networks (CINE 2020).
@inproceedings{dutta2020thermal,
author = {Dutta, A and Mandal, B and Ghosh, Swarnendu and Das, N},
title = {Using thermal intensities to build conditional random fields for object segmentation at night},
booktitle = {4th International Conference on Computational Intelligence and Networks (CINE 2020)},
year = {2020},
doi = {10.1109/cine48825.2020.234402}
}