Datasets:
|
Download README.md from Xieih/tree7: direct link, hf CLI and curl.
- Browser
- Download file 5.47 kB
-
https://huggingface.co/datasets/Xieih/tree7/resolve/main/README.md
- Command line
-
hf download hf://datasets/Xieih/tree7/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Xieih/tree7/resolve/main/README.md
5.47 kB
| license: other | |
| license_name: mixed-cc-by-nc-cc-by-cc0 | |
| tags: | |
| - image-classification | |
| - computer-vision | |
| - plants | |
| - trees | |
| - inaturalist | |
| - wikimedia-commons | |
| size_categories: | |
| - 1K<n<10K | |
| task_categories: | |
| - image-classification | |
| language: | |
| - zh | |
| - en | |
| # tree7 — seven urban tree species | |
| 2,143 labelled photos of seven ornamental / street-tree species, packaged as parquet with the | |
| images embedded, so `load_dataset()` streams them without a 500 MB download. | |
| | label | class_name | 中文 | scientific name | train | valid | test | | |
| |---|---|---|---|---|---|---| | |
| | 0 | `Ficus_microcarpa` | 榕樹 | *Ficus microcarpa* | 246 | 31 | 31 | | |
| | 1 | `Terminalia_catappa` | 大葉欖仁 | *Terminalia catappa* | 246 | 31 | 30 | | |
| | 2 | `Araucaria_columnaris` | 柱狀南洋杉 | *Araucaria columnaris* | 246 | 31 | 31 | | |
| | 3 | `Dypsis_lutescens` | 散尾葵 | *Dypsis lutescens* | 242 | 30 | 31 | | |
| | 4 | `Strelitzia_reginae` | 鶴望蘭 | *Strelitzia reginae* | 242 | 30 | 30 | | |
| | 5 | `Drynaria_roosii` | 槲蕨 | *Drynaria roosii* | 247 | 31 | 31 | | |
| | 6 | `Acalypha_wilkesiana` | 紅桑 | *Acalypha wilkesiana* | 245 | 31 | 30 | | |
| Images are JPEG, long side ≤1024 px, quality 88. Short side p5 = 576 px. | |
| ## Load it | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("Xieih/tree7") # train / valid / test | |
| ds["train"][0]["image"] # PIL.Image, decoded on access | |
| ds["train"][0]["label"], ds["train"][0]["class_name"] | |
| names = ds["train"].features["label"].names # 0..6 -> class_name | |
| ``` | |
| PyTorch example: | |
| ```python | |
| import torch | |
| from transformers import AutoImageProcessor | |
| from torch.utils.data import DataLoader | |
| from datasets import load_dataset | |
| proc = AutoImageProcessor.from_pretrained("microsoft/resnet-50") | |
| ds = load_dataset("Xieih/tree7", split="train") | |
| def collate(batch): | |
| px = proc(images=[b["image"] for b in batch], return_tensors="pt") | |
| px["labels"] = torch.tensor([b["label"] for b in batch]) | |
| return px | |
| ``` | |
| ## Provenance and label quality | |
| - **iNaturalist — 2,016 images (94.1%).** Only observations at `quality_grade=research` are used, | |
| i.e. the identification has been agreed by at least two community taxonomists. `page_url` links | |
| to the observation so every label is auditable. | |
| - **Wikimedia Commons — 127 images (5.9%).** Taken from the species category pages. Titles matching | |
| book scans (BHL/CHS), maps, diagrams, posters, or naming a *different* genus are rejected | |
| automatically; the remainder were reviewed against a contact sheet. | |
| - **De-duplication.** 64-bit dHash, Hamming distance ≤6, applied within and across classes. | |
| Cross-class near-duplicates: 0 — no photo is filed under two species. | |
| - **GBIF was deliberately skipped**: its media are mostly herbarium scans and literature thumbnails. | |
| Pipeline source: `xieyihong04-creator/tree7-dataset` (GitHub) — `collect.py` builds the candidate | |
| index, `build.py` downloads/resizes/dedupes, `repair_manifest.py` audits. | |
| `dataset_info` is intentionally left out of the card front matter: the parquet files carry the | |
| Hugging Face feature signature, so the Hub (and `load_dataset`) reads `image` as `Image()` and | |
| `label` as `ClassLabel` directly from them. | |
| ## Fields | |
| `sample_id`, `image`, `label`, `class_name`, `zh_name`, `sci_name`, `source`, `license`, | |
| `commercial_ok`, `attribution`, `page_url`, `observed_on`, `latitude`, `longitude`, `width`, | |
| `height`, `grade`, `faves`. | |
| Use `license` / `attribution` / `commercial_ok` for compliance, `grade` / `faves` for weighting, | |
| `latitude` / `longitude` / `observed_on` for geographically or seasonally disjoint validation. | |
| 129 rows have no coordinates (obscured iNaturalist observations and Commons files). | |
| ## License | |
| **The images are not released under this repo's license.** Each keeps the license its uploader | |
| chose: CC BY-NC 1,879 · CC BY-SA (all versions) 82 · CC0 81 · CC BY (all versions) 76 · CC BY-NC-SA 10 · CC BY-NC-ND 6 · CC BY-ND 4 · public domain 4 · FAL 1 (total 2,143). | |
| - 1,879 images are **non-commercial** — do not use this dataset as-is in a commercial product. | |
| - CC BY / BY-SA require attribution; the exact string to credit is in `attribution`. | |
| - For a commercial-only subset, filter `commercial_ok == "yes"` (246 images). | |
| The parquet packaging and this dataset card are MIT; the pipeline code is MIT. | |
| ## Known limitations | |
| 1. **Mixed framing.** Whole-tree, canopy, leaf and fruit close-ups are all kept (the stated target | |
| is a general classifier). Roughly 40% of the banyan images are leaf close-ups — filter them if | |
| you want a habit-only model. | |
| 2. **Urban bias.** Parks, street trees and campuses dominate; wild forest habitat, distant small | |
| subjects, night and rain/fog conditions are under-covered. | |
| 3. **Geographic skew.** Tropical and Southern-Hemisphere observations (East Africa, South America, | |
| Pacific islands) are over-represented relative to Taiwan. A `place_id`-restricted second pull | |
| would fix this. | |
| 4. **Resolution ceiling.** iNaturalist `large` files cap at 1024 px on the long side. | |
| 5. **Strelitzia pool is the smallest** (769 research-grade observations), so that class is closest | |
| to saturation if you scale up. | |
| ## Citation | |
| ```bibtex | |
| @misc{tree7, | |
| title = {tree7: an image dataset of seven urban tree species}, | |
| author = {xieyihong04-creator}, | |
| year = {2026}, | |
| note = {Images derived from iNaturalist (CC BY-NC / CC BY / CC0) and Wikimedia Commons}, | |
| url = {https://huggingface.co/datasets/Xieih/tree7} | |
| } | |
| ``` | |