--- license: other license_name: pexels-license task_categories: - text-to-image - image-to-text language: - en - zh tags: - photograph - people - caption - portrait size_categories: - 10K` | | `photo_id` | the Pexels photo id | | `page_url` | the photo's page on pexels.com | | `image_url` | the original image file as the API reports it | | `caption` | the description written for this dataset, 33-3150 tokens long | | `caption_language` | `zh` or `en` | | `length_band` | the length the caption was written to: `64-255`, `256-511`, `512-895` or `896-1280`; a caption that came out outside its band is still shipped | | `caption_model` | the model that wrote the caption | | `width`, `height` | dimensions of the original image | | `photographer` | photographer credited by Pexels | | `photographer_url` | the photographer's page on pexels.com | | `search_query` | the query the photo was drawn with | ## How it was built 1. **Search** - 332 queries describing people (portraits, occupations, clothing, region) were run against the Pexels search API and their results collected. Duplicates were removed by photo id, and photographs smaller than 896 px on the short side were discarded. 2. **Selection** - a stratified draw chose which photographs to describe, spread across queries and image shapes. 3. **Captioning** - each selected photograph was described once by `deepseek:deepseek-flash` with reasoning disabled, at one of four length bands, in Chinese or English, as flowing prose or as grouped facts. The model was shown the photograph at a bounded edge and asked for what is in it, with a ban on hedging language and on catalogue-style openings. 4. **Acceptance** - 14 captions that repeated a sentence were discarded. A caption that came out shorter or longer than its band was kept, since it still describes the photograph. ## Using it ```python import pandas as pd, requests row = pd.read_parquet("https://huggingface.co/datasets/kaupane/pexels-people-captions/resolve/main/data/train-00000-of-00001.parquet").iloc[0] image = requests.get(row["image_url"]).content ``` ## Licence and attribution The photographs remain under the [Pexels licence](https://www.pexels.com/license/): free to use and modify, no attribution required by the licence but appreciated, and not to be redistributed from another image or wallpaper service - which is why this dataset links to them rather than shipping them. Follow the `page_url` and `photographer_url` columns to credit the photographer. The captions were written for this dataset and are released under CC-BY-4.0. ## Caveats - Captions are machine-written. They are grounded in the photograph, but a caption is not a verified description: expect occasional counting or colour errors. - Photographs may be removed from Pexels, in which case a link stops resolving. - The set is a sample of what the queries returned, not a balanced survey of the world's people; the queries deliberately over-sample some regions and clothing.