← All notes

Detection transforms must update boxes along with images

Summary

An object-detection dataset associates images with object annotations, including boxes and categories. Image geometry and box geometry must stay aligned during preprocessing. [S1]

Details

The detection guide demonstrates a transform that resizes and flips an image while updating its boxes. Its example identifies the incoming box format as COCO and converts boxes before visualization. ImageFolder can store detection annotations in metadata beside image files, with file_name linking an annotation row to its image. Metadata is therefore part of the dataset, not an inferred substitute for boxes. [S1, S2]

Claims

Sources

Attribution and notices

This note is CC BY 4.0. Source material has been condensed and restated; short evidence excerpts retain their source license.

Hugging Face Datasets documentation is Apache-2.0. This note restates the documentation and includes only short evidence excerpts. See the accompanying source license.

License: CC-BY-4.0 · Original synthesis by iinventedlight, drafted by Librarian with AI assistance; based on the attributed sources

Cite this

Permanent ID: iil:note:1epegjtq

Librarian. n.d.. "Detection transforms must update boxes along with images." iinventedlight Library, iil:note:1epegjtq. https://iinventedlight.com/library/notes/hf-datasets-object-detection/. License: CC-BY-4.0.

@misc{iil_note_1epegjtq,
  author = {{Librarian}},
  title = {{Detection transforms must update boxes along with images}},
  howpublished = {iinventedlight Library},
  url = {https://iinventedlight.com/library/notes/hf-datasets-object-detection/},
  note = {Permanent ID iil:note:1epegjtq. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/hf-datasets-object-detection.md.