Datasets:
Update README.md
Browse files23 unmodified lines2425262728293014 unmodified lines454647484950513 unmodified lines5556575859606162636465662 unmodified lines697071727374757677787980818283847 unmodified lines9293949596979827 unmodified lines12612712812913013113223 unmodified lines# Dataset Card: Hidden-Objects## 📌 OverviewThis dataset is part of the **Hidden-Objects** research project, focusing on **Diffusion-Distilled Spatial Priors for Object Placement**. It provides image-object pairs with localized bounding boxes, designed to help models learn realistic object placement and spatial relationships within background scenes.* **Project Page:** [marcoschouten.github.io/hidden_objects/](https://marcoschouten.github.io/hidden_objects/)* **Background Source:** [Places365 Dataset](http://places2.csail.mit.edu/download.html)14 unmodified lines---## 📐 Preprocessing & Bounding BoxesThe bounding boxes are defined relative to a **512x512 center-cropped** version of the background image. To replicate this:1. Resize the shortest side of the original image to **512px**.2. Perform a **center crop** to reach 512x512.3. The upper-left corner of the crop is `(0, 0)`.3 unmodified lines# Convert normalized [x, y, w, h] to 512x512 pixel coordinatespx_x, px_y = bbox[0] * 512, bbox[1] * 512px_w, px_h = bbox[2] * 512, bbox[3] * 512################ Example Setuphuggingface-cli login```python2 unmodified linesroot = "INSERT_YOUR_PATH"dataset = datasets.Places365(root=root, split='train-standard', small=False, download=True)print(f"Downloaded {len(dataset)} images to {root}")from datasets import load_datasetdataset = load_dataset("marco-schouten/hidden-objects", streaming=True)first_row = next(iter(dataset["train"]))print(first_row)``````json{"entry_id": 1,7 unmodified lines}``````Pythonimport os27 unmodified lines# dataset = HiddenObjectsDataset(places_root="./data/places365")``````Pythonimport os23 unmodified lines2425262728293014 unmodified lines454647484950513 unmodified lines55565758596061626364656667682 unmodified lines7172737475767778798081828384858687887 unmodified lines9697989910010110227 unmodified lines13013113213313413513623 unmodified lines# Dataset Card: Hidden-Objects## 📌 OverviewIt provides image-object pairs with localized bounding boxes, designed to help models learn realistic object placement and spatial relationships within background scenes.* **Project Page:** [marcoschouten.github.io/hidden_objects/](https://marcoschouten.github.io/hidden_objects/)* **Background Source:** [Places365 Dataset](http://places2.csail.mit.edu/download.html)14 unmodified lines---## 📐 Preprocessing & Bounding BoxesThe bounding boxes are defined relative to a **512x512 center-cropped** version of the background image.1. Resize the shortest side of the original image to **512px**.2. Perform a **center crop** to reach 512x512.3. The upper-left corner of the crop is `(0, 0)`.3 unmodified lines# Convert normalized [x, y, w, h] to 512x512 pixel coordinatespx_x, px_y = bbox[0] * 512, bbox[1] * 512px_w, px_h = bbox[2] * 512, bbox[3] * 512```## Example Setuphuggingface-cli login### Download Background Images from Places```python2 unmodified linesroot = "INSERT_YOUR_PATH"dataset = datasets.Places365(root=root, split='train-standard', small=False, download=True)print(f"Downloaded {len(dataset)} images to {root}")```### Load as JSONL```Pythonfrom datasets import load_datasetdataset = load_dataset("marco-schouten/hidden-objects", streaming=True)first_row = next(iter(dataset["train"]))print(first_row)```Sample:```json{"entry_id": 1,7 unmodified lines}```### Load for Training / Evalauting```Pythonimport os27 unmodified lines# dataset = HiddenObjectsDataset(places_root="./data/places365")```### Load Streaming Mode```Pythonimport os
README.md+11-7