depthmap commited on
Commit
d4c3536
·
verified ·
1 Parent(s): 0a49c3f

Upload 13 files

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ lion-relief.stl filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Creative Commons Attribution 4.0 International
2
+
3
+ This dataset is licensed under CC BY 4.0.
4
+ https://creativecommons.org/licenses/by/4.0/
5
+
6
+ Attribution: Depth-Map.com, https://depth-map.com/
README.md CHANGED
@@ -1,3 +1,97 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ task_categories:
4
+ - depth-estimation
5
+ language:
6
+ - en
7
+ tags:
8
+ - depth-map
9
+ - 16-bit
10
+ - 8-bit
11
+ - height-map
12
+ - 3d-printing
13
+ - cnc
14
+ - laser-engraving
15
+ - stl
16
+ pretty_name: 16-bit vs 8-bit Depth Map Comparison
17
+ size_categories:
18
+ - n<1K
19
  ---
20
+
21
+ # 16-bit vs 8-bit Depth Map Comparison
22
+
23
+ A small, measurable example of why bit depth in a depth map shows up in a laser engrave, a lithophane, or a CNC relief.
24
+
25
+ The package is built from the public lion-medallion sample published by [Depth-Map.com](https://depth-map.com/). The genuine 16-bit manufacturing PNG and the closed STL were downloaded from the site on 15 November 2026. The 8-bit file and the "fake 16-bit" file were derived from that PNG in this repository, so the three depth maps are the same height field.
26
+
27
+ This is a file-format comparison, not a trained model and not a benchmark of Depth Anything V3.
28
+
29
+ ## What is in the repo
30
+
31
+ | File | What it is | Measured on 2026-11-15 |
32
+ | --- | --- | --- |
33
+ | `lion-source.jpg` | Public sample photograph (`/demo/medallion-source.jpg`) | 1024×1024 RGB JPEG |
34
+ | `lion-depth-16bit.png` | Genuine 16-bit grayscale depth map (`/demo/lion-depth-16.png`) | PNG bit depth 16; 19,662 unique values; min 0, max 19,661 |
35
+ | `lion-depth-8bit.png` | Same field quantized to 8-bit on the same 0–65,535 scale (`value // 257`) | PNG bit depth 8; **77** unique values; min 0, max 76 |
36
+ | `lion-depth-8bit-upscaled-to-16bit.png` | That 8-bit file written back into a 16-bit PNG (`value * 257`) | PNG bit depth 16, but only **77** unique codes, all multiples of 257 |
37
+ | `lion-relief.stl` | Closed relief mesh published with the sample (`/demo/lion-relief.stl`) | Binary STL; header starts with `depth-map.com relief` |
38
+ | `previews/` | 8-bit RGB / JPEG shaded illustrations from the site, useful for seeing terraces. These are **not** manufacturing depth maps. | See folder |
39
+ | `verification.json` | Hashes, header fields, and unique-value counts | — |
40
+ | `verify.py` | Re-runs the Pillow counts | — |
41
+
42
+ ## Why the 16-bit file does not peak at 65,535
43
+
44
+ [Depth-Map.com](https://depth-map.com/) writes depth on a 10 mm scale: 65,535 maps to 10 mm. The site's [16-bit vs 8-bit guide](https://depth-map.com/guides/16-bit-vs-8-bit-depth-maps) describes this lion export as a **3 mm** relief on a **1.5 mm** base (Invert on). A 3 mm relief therefore uses about a third of the gray range, and the brightest pixel is 19,661 — which is what we measured.
45
+
46
+ An 8-bit PNG on that same 10 mm scale only has 77 height steps for a 3 mm relief. Stretching those 77 codes into a 16-bit container does not invent the missing steps. The upscaled file in this repo is an example of that failure mode: the header says 16-bit, the unique-value count does not.
47
+
48
+ The guide's expected ImageMagick reading for this manufacturing PNG is:
49
+
50
+ ```text
51
+ Depth: 16-bit
52
+ Channel statistics:
53
+ Gray:
54
+ min: 0 (0)
55
+ max: 19661
56
+ ```
57
+
58
+ A stretched 8-bit file is the one whose values are multiples of 257 and whose distinct count is 256 or fewer (here, 77).
59
+
60
+ ## How to verify
61
+
62
+ ```bash
63
+ python verify.py
64
+ ```
65
+
66
+ Or with Pillow:
67
+
68
+ ```python
69
+ from PIL import Image
70
+
71
+ im = Image.open("lion-depth-16bit.png")
72
+ print(im.mode) # I;16
73
+ print(len(set(im.getdata()))) # 19662
74
+ print(min(im.getdata()), max(im.getdata())) # 0 19661
75
+ ```
76
+
77
+ ImageMagick (`identify -verbose`) is the method described on the site guide. These counts were measured with Pillow, not ImageMagick, because this package was prepared in an environment without `identify`.
78
+
79
+ ## Source files
80
+
81
+ - 16-bit PNG: https://depth-map.com/demo/lion-depth-16.png
82
+ - Source photo: https://depth-map.com/demo/medallion-source.jpg
83
+ - STL: https://depth-map.com/demo/lion-relief.stl
84
+ - Guide: https://depth-map.com/guides/16-bit-vs-8-bit-depth-maps
85
+ - Generator: https://depth-map.com/
86
+
87
+ The 8-bit and upscaled-16-bit PNGs were produced here from `lion-depth-16bit.png`. They are not extra downloads from the site.
88
+
89
+ ## License
90
+
91
+ [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Attribution: Depth-Map.com, https://depth-map.com/. The sample is the site's public lion-medallion demo. The depth field was estimated with a Depth Anything V3 model; this repository does not redistribute model weights.
92
+
93
+ ## Limitations
94
+
95
+ - One subject, one export (3 mm relief, 1.5 mm base, invert on, as described on the guide). This is not a dataset for training.
96
+ - Preview images in `previews/` are 8-bit illustrations. Do not treat them as 16-bit depth maps.
97
+ - Unique-value counts come from Pillow on 2026-11-15. Re-run `verify.py` if you need to confirm a local copy.
lion-depth-16bit.png ADDED

Git LFS Details

  • SHA256: 9ce2ddbaec65c482149a3ddcdb935c8ca5e86d19dbe4330ecdfdfe9fdcde4058
  • Pointer size: 131 Bytes
  • Size of remote file: 939 kB
lion-depth-8bit-upscaled-to-16bit.png ADDED

Git LFS Details

  • SHA256: ba68a4c04d8bad31c03ca5f02573f13041b7fcfd17a8e81a768a5edd1a9e052c
  • Pointer size: 130 Bytes
  • Size of remote file: 90.9 kB
lion-depth-8bit.png ADDED

Git LFS Details

  • SHA256: 05f97a29ce7da515faba52b1e2d16b805e4eb9af556ee32a15ea72d56a405a62
  • Pointer size: 130 Bytes
  • Size of remote file: 78 kB
lion-relief.stl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99797d07607b0e63b3df70477a96852ec39f99297a46b4bf892730c66e75d91c
3
+ size 2879884
lion-source.jpg ADDED

Git LFS Details

  • SHA256: 7d762f1dcc781748f3e61f2bacde4300d353bc3a70912ba27cd3fb492e82c69c
  • Pointer size: 131 Bytes
  • Size of remote file: 461 kB
previews/lion-depth-preview-stretched.jpg ADDED

Git LFS Details

  • SHA256: 15657273e891b59749637f24d7c0cfc424cda212c051eb3b3c5a97febfc43179
  • Pointer size: 130 Bytes
  • Size of remote file: 25 kB
previews/shaded-16bit-illustration.png ADDED

Git LFS Details

  • SHA256: a1c0c7a5a4a5a7216aa955a2ddef0b2aec8b41408fc20cf1ed7006f9919f2625
  • Pointer size: 131 Bytes
  • Size of remote file: 152 kB
previews/shaded-8bit-illustration.png ADDED

Git LFS Details

  • SHA256: af9e8c0bd5e6ff98329dc8754cfba4df196883f1afea8c8748ccbcbd29bce4b8
  • Pointer size: 130 Bytes
  • Size of remote file: 27.5 kB
previews/shaded-side-by-side.jpg ADDED

Git LFS Details

  • SHA256: a2034ecd31f37a2f2ac81215c0946e2201bffbd9a592401b0d6f95ec18d661b1
  • Pointer size: 131 Bytes
  • Size of remote file: 163 kB
verification.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "title": "16-bit vs 8-bit depth map comparison (lion medallion sample)",
3
+ "prepared": "2026-11-15",
4
+ "sources": {
5
+ "16bit_png": "https://depth-map.com/demo/lion-depth-16.png",
6
+ "source_photo": "https://depth-map.com/demo/medallion-source.jpg",
7
+ "stl": "https://depth-map.com/demo/lion-relief.stl",
8
+ "guide": "https://depth-map.com/guides/16-bit-vs-8-bit-depth-maps",
9
+ "home": "https://depth-map.com/"
10
+ },
11
+ "scale": "In the Depth-Map.com 16-bit PNG, 65535 maps to 10 mm. A 3 mm relief therefore peaks near 19661.",
12
+ "files": {
13
+ "lion-depth-16bit.png": {
14
+ "bytes": 938954,
15
+ "w": 1024,
16
+ "h": 1024,
17
+ "bit_depth": 16,
18
+ "color_type": 0,
19
+ "sha256": "9ce2ddbaec65c482149a3ddcdb935c8ca5e86d19dbe4330ecdfdfe9fdcde4058",
20
+ "role": "genuine 16-bit manufacturing depth map from depth-map.com/demo/lion-depth-16.png",
21
+ "pil_mode": "I;16",
22
+ "unique_values": 19662,
23
+ "min": 0,
24
+ "max": 19661,
25
+ "notes": "Max 19661 matches the site guide: 3 mm relief on a 10 mm (65535) full scale."
26
+ },
27
+ "lion-depth-8bit.png": {
28
+ "bytes": 78027,
29
+ "w": 1024,
30
+ "h": 1024,
31
+ "bit_depth": 8,
32
+ "color_type": 0,
33
+ "sha256": "05f97a29ce7da515faba52b1e2d16b805e4eb9af556ee32a15ea72d56a405a62",
34
+ "role": "same height field quantized to 8-bit on the same 0-65535 scale (value // 257)",
35
+ "pil_mode": "L",
36
+ "unique_values": 77,
37
+ "min": 0,
38
+ "max": 76,
39
+ "notes": "77 steps (0-76) matches the site guide for a 3 mm relief in an 8-bit file on a 10 mm scale."
40
+ },
41
+ "lion-depth-8bit-upscaled-to-16bit.png": {
42
+ "bytes": 90878,
43
+ "w": 1024,
44
+ "h": 1024,
45
+ "bit_depth": 16,
46
+ "color_type": 0,
47
+ "sha256": "ba68a4c04d8bad31c03ca5f02573f13041b7fcfd17a8e81a768a5edd1a9e052c",
48
+ "role": "8-bit file written into a 16-bit PNG container (value * 257). Looks 16-bit in the header, but only 77 distinct codes, all multiples of 257.",
49
+ "pil_mode": "I;16",
50
+ "unique_values": 77,
51
+ "min": 0,
52
+ "max": 19532,
53
+ "all_values_multiples_of_257": true
54
+ },
55
+ "lion-relief.stl": {
56
+ "bytes": 2879884,
57
+ "sha256": "99797d07607b0e63b3df70477a96852ec39f99297a46b4bf892730c66e75d91c",
58
+ "role": "closed relief STL published alongside the 16-bit PNG on the site guide",
59
+ "header_ascii_prefix": "depth-map.com relief",
60
+ "source_page_notes": "Guide says exported at 3 mm depth and a 1.5 mm base, Invert on."
61
+ },
62
+ "lion-source.jpg": {
63
+ "bytes": 461114,
64
+ "sha256": "7d762f1dcc781748f3e61f2bacde4300d353bc3a70912ba27cd3fb492e82c69c",
65
+ "role": "public sample photograph from https://depth-map.com/demo/medallion-source.jpg (lion medallion)",
66
+ "size": [
67
+ 1024,
68
+ 1024
69
+ ],
70
+ "mode": "RGB"
71
+ }
72
+ },
73
+ "method": "Downloaded the public demo files with curl on 2026-11-15. Counted unique gray values with Pillow. The 8-bit and upscaled-16-bit files were derived here from the genuine 16-bit PNG by integer division and multiplication by 257; they are not additional site downloads.",
74
+ "limitations": "bitdepth-8.png and bitdepth-16.png on the homepage are 8-bit RGB shaded illustrations (not 16-bit manufacturing files) and are filed under previews/. Unique-value counts were measured with Pillow, not ImageMagick identify."
75
+ }
verify.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Re-count unique gray values in the three depth-map PNGs."""
3
+ from pathlib import Path
4
+ from PIL import Image
5
+ import struct
6
+
7
+ ROOT = Path(__file__).resolve().parent
8
+
9
+ def png_bit_depth(path: Path) -> int:
10
+ data = path.read_bytes()
11
+ if data[:8] != b"\x89PNG\r\n\x1a\n":
12
+ raise ValueError(f"{path} is not a PNG")
13
+ return data[24]
14
+
15
+ def summarize(path: Path) -> None:
16
+ im = Image.open(path)
17
+ values = list(im.getdata())
18
+ if values and isinstance(values[0], tuple):
19
+ raise SystemExit(f"{path.name}: expected a grayscale depth map, got mode {im.mode}")
20
+ unique = set(values)
21
+ multiples = all(v % 257 == 0 for v in unique)
22
+ print(f"{path.name}")
23
+ print(f" PNG header bit depth: {png_bit_depth(path)}")
24
+ print(f" Pillow mode: {im.mode}")
25
+ print(f" size: {im.size[0]}x{im.size[1]}")
26
+ print(f" unique values: {len(unique)}")
27
+ print(f" min / max: {min(unique)} / {max(unique)}")
28
+ print(f" all multiples of 257: {multiples}")
29
+ print()
30
+
31
+ if __name__ == "__main__":
32
+ for name in (
33
+ "lion-depth-16bit.png",
34
+ "lion-depth-8bit.png",
35
+ "lion-depth-8bit-upscaled-to-16bit.png",
36
+ ):
37
+ summarize(ROOT / name)