Hey Håkon, thanks for your feedback. I did not share it but it is exactly what I’m doing in my test writer:
descriptors = (
# Tree 0
1, # Depth 1
0, 0, 1, 0, 0, 0, 0, 0, # Depth 2
# Tree 1
1, # Depth 1
0, 1, 0, 0, 0, 0, 0, 0, # Depth 2
# Tree 3 : refined
1,
# Tree 4 : not refined
)
packed_descriptors = np.packbits(descriptors)
root.create_dataset("Descriptors", data=packed_descriptors)
After a quick survey of bit packing techniques, using uint8 seem like a safe bet.