Dataset Viewer
Auto-converted to Parquet Duplicate
image
imagewidth (px)
512
512
scene
stringclasses
3 values
container_bit_depth
int64
8
16
unique_levels
int64
193
50.6k
kind
stringclasses
3 values
min_value
int64
0
0
max_value
int64
255
65.5k
dome
16
12,240
true_16bit
0
65,535
dome
16
253
stretched_8bit_in_16bit
0
65,535
dome
8
253
plain_8bit
0
255
ramp
16
50,604
true_16bit
0
65,535
ramp
16
256
stretched_8bit_in_16bit
0
65,535
ramp
8
256
plain_8bit
0
255
medallion
16
10,686
true_16bit
0
65,535
medallion
16
193
stretched_8bit_in_16bit
0
65,535
medallion
8
193
plain_8bit
0
255

Fake vs True 16-bit Depth PNGs

Nine small synthetic grayscale PNGs for testing whether a tool, script or pipeline can tell a genuine 16-bit depth map from an 8-bit image stretched into a 16-bit container.

A PNG header can say "16-bit" while the pixels hold only 256 distinct values. In laser engraving (for example LightBurn's 3D Sliced mode) and CNC relief work, those 256 values become 256 height steps, which can appear as stepping lines on the finished surface. These files are a ready-made positive and negative set for checking your own detection code.

This is a file-format test set. It is not a training set, not a benchmark of any depth-estimation model, and the scenes are procedural, not photographs.

The three scenes

All scenes are 512 × 512 and defined as a float height field between 0 and 1, built in generate.py:

  • dome: a smooth hemisphere. A continuous surface with no flat areas.
  • ramp: a diagonal gradient with a gentle ripple added.
  • medallion: a coin-like disc with a raised rim, a recessed field, a domed centre and a ring of bumps. The area outside the disc is flat at 0.

The three kinds of file

Each scene is saved three ways from the same height field f:

Kind How it is made What to expect
true_16bit round(f * 65535) written as a 16-bit grayscale PNG Header 16-bit, thousands of unique levels
stretched_8bit_in_16bit round(f * 255) first, then multiplied by 257 and written as a 16-bit PNG Header 16-bit, at most 256 unique levels, all multiples of 257
plain_8bit round(f * 255) written as an 8-bit grayscale PNG Header 8-bit, at most 256 unique levels

Measured values

metadata.csv is written by generate.py after the PNGs are saved. The bit depth is read from the PNG IHDR chunk and the unique levels are counted with numpy on the decoded pixels, so nothing in the table is assumed.

File Scene Kind PNG header bit depth Unique levels Min Max
images/dome-true-16bit.png dome true_16bit 16 12,240 0 65,535
images/dome-stretched-8bit-in-16bit.png dome stretched_8bit_in_16bit 16 253 0 65,535
images/dome-plain-8bit.png dome plain_8bit 8 253 0 255
images/ramp-true-16bit.png ramp true_16bit 16 50,604 0 65,535
images/ramp-stretched-8bit-in-16bit.png ramp stretched_8bit_in_16bit 16 256 0 65,535
images/ramp-plain-8bit.png ramp plain_8bit 8 256 0 255
images/medallion-true-16bit.png medallion true_16bit 16 10,686 0 65,535
images/medallion-stretched-8bit-in-16bit.png medallion stretched_8bit_in_16bit 16 193 0 65,535
images/medallion-plain-8bit.png medallion plain_8bit 8 193 0 255

The 8-bit kinds show fewer than 256 levels for dome (253) and medallion (193) because those scenes do not visit every possible level. The ramp uses all 256. None of the true 16-bit files uses all 65,536 values either; they use 10,686 to 50,604. A low count on its own is not proof of an 8-bit origin, so read it together with the header and the multiples-of-257 pattern.

I also ran ImageMagick 7.1.2 (Q16 build) as identify -format "%z-bit | %k unique levels\n" file.png on all nine files. Its bit depth and unique-level numbers matched the table for every file.

Files

  • images/: the nine PNGs
  • metadata.csv: file_name, scene, container_bit_depth, unique_levels, kind, plus min_value and max_value
  • generate.py: regenerates everything (requires numpy and Pillow): python generate.py

How to check a file yourself

Read the header bit depth, then count the unique values:

import numpy as np
from PIL import Image

path = "images/dome-stretched-8bit-in-16bit.png"
with open(path, "rb") as fh:
    bit_depth = fh.read(26)[24]          # IHDR bit depth
levels = np.unique(np.array(Image.open(path)))
print(bit_depth, levels.size, bool(np.all(levels % 257 == 0)))   # 16 253 True

To check any PNG in your browser instead, use the 16-bit depth map checker, which compares the header bit depth against the measured unique level count.

Limitations

  • Synthetic scenes only, one resolution (512 × 512), grayscale only, no noise and no photographic content.
  • Real exporters stretch differently (bit shifts, gamma, partial ranges). v * 257 is the common case, not the only one.
  • Only the common kind of fake is covered. A file that has been blurred, dithered or noise-added after stretching will have more unique values than 256 without being a true 16-bit capture.
  • The Hugging Face dataset viewer may render 16-bit PNGs as 8-bit previews. Download the files and measure them rather than trusting the preview.

License

CC BY 4.0. Attribution: Depth-Map.com. The images are generated by generate.py and contain no third-party content.

Downloads last month
-