Datasets:
File size: 5,298 Bytes
5055182 c30c2a6 ad6fd75 c30c2a6 dbdf69a 5055182 6c59a75 5055182 50a0753 5055182 dbdf69a 6c59a75 c30c2a6 5055182 dbdf69a 6c59a75 dbdf69a 6c59a75 c30c2a6 5055182 c30c2a6 dbdf69a 6c59a75 c30c2a6 5055182 c30c2a6 5055182 3df07f9 3f538b3 5055182 50a0753 3f538b3 5055182 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ---
license: cc-by-nc-4.0
task_categories:
- image-segmentation
tags:
- lunar
- chang-e-4
- terrain-classification
- segmentation
- planetary-science
pretty_name: Chang'E-4 Terrain Classification Dataset
configs:
- config_name: annotations
data_files:
- split: train
path: data/masks/train.jsonl
---
# Chang'E-4 TCM Dataset
LabelMe terrain annotations for Chang'E-4 Yutu-2 rover imagery.
> **Dataset:** Segmentation masks are available on [Hugging Face](https://huggingface.co/datasets/lothanspace/change4-tcm-dataset).
> **Note:** Original Chang'E-4 images are not included due to copyright restrictions. You must download the source images directly from CLPDS (see instructions below).
## Quick Start
```bash
# Install dependencies
pip install -r requirements.txt
# Build the Hugging Face JSONL manifest from raw annotations
python scripts/prepare_dataset.py --hf-jsonl
# Generate local mask PNGs and metadata from annotations
python scripts/prepare_dataset.py
# Convert PDS files to images (requires raw data from CLPDS)
python scripts/convert_pds.py data/raw data/images
```
For the Hugging Face dataset, publish only files under `data/masks/`. Generate
`data/masks/train.jsonl` from the stripped LabelMe annotations so the dataset
viewer can stream rows reliably.
## Annotation Format
Each dataset row comes from `data/masks/train.jsonl`, with one stripped
LabelMe annotation per line. The `shapes` field contains polygon or rectangle
regions with the labels below.
### Class Labels
| Index | Label |
|-------|------------|
| 0 | background |
| 1 | crater |
| 2 | shadow |
| 3 | surface |
| 4 | rock |
| 5 | soil |
| 6 | rover |
| 7 | space |
| 8 | rocker |
## Downloading Chang'E-4 Data
Data is available from China's Lunar and Planetary Data System (CLPDS).
### 1. Register an Account
1. Go to https://clpds.bao.ac.cn
2. Create an account (check spam folder for confirmation email from NAOC)
### 2. Download Data
1. Navigate to Chang'E-4 data search: https://clpds.bao.ac.cn/ce5web/searchOrder-ce4En.do
2. Select an instrument:
- **PCAM** - Panoramic Camera (rover, stereo pairs)
- **TCAM** - Terrain Camera (lander)
- **LPR** - Lunar Penetrating Radar
- **VNIS** - Visible/Near-IR Spectrometer
3. Choose data level (L2A or higher for calibrated data)
4. Add files to cart and process order
5. Download and extract to `data/raw/`
### Data Format
Chang'E-4 uses PDS4 format:
- XML label file (`.xml`) - metadata
- Data file (`.img`, `*L`) - image data
## Converting to Images
The conversion script applies debayering and contrast stretching:
```bash
# Convert all PDS files in data/raw to PNG
python scripts/convert_pds.py data/raw data/images
# Preview files without converting
python scripts/convert_pds.py data/raw data/images --dry-run
# Flatten output to single directory
python scripts/convert_pds.py data/raw data/images --flat
```
### Processing Steps
1. Read PDS4 file using `pds4_tools`
2. Debayer raw Bayer images (PCAM full-resolution)
3. Apply 2% linear contrast stretch
4. Save as PNG
## Project Structure
```
├── data/
│ ├── masks/ # LabelMe annotation JSONs
│ │ └── train.jsonl # HF streaming manifest generated from masks/
│ ├── masks_png/ # Indexed mask PNGs (generated locally)
│ ├── metadata.jsonl # Local metadata for derived assets
│ ├── class_labels.json
│ ├── raw/ # Downloaded PDS4 files (you provide)
│ └── images/ # Converted PNG images (generated)
├── docs/
│ └── chinese-moon-data-access.md
├── scripts/
│ ├── convert_pds.py
│ └── prepare_dataset.py
└── requirements.txt
```
## References
- [CLPDS Data Portal](https://clpds.bao.ac.cn)
- [Chang'E-4 Data Releases](https://moon.bao.ac.cn/pubMsg/detail-CE4EN.jsp)
- [CLPDS Overview Paper](https://link.springer.com/article/10.1007/s11214-021-00862-3)
## Citation
If you use this dataset in your research, please cite:
```bibtex
@misc{chang4tcm2026,
author = {Yu, Sam and Huang, Christoper and Nasika, Tanvi and Shao, Yi and Singhania, Amay},
title = {Chang'E-4 Terrain Classification Dataset},
year = {2026},
organization = {Lothan Space, IHS Maker Club},
publisher = {HuggingFace},
url = {https://huggingface.co/datasets/lothanspace/change4-tcm-dataset}
}
```
Please also cite the original data source:
```bibtex
@misc{clpds2025,
author = {{Ground Research and Application System of China's Lunar and Planetary Exploration Program}},
title = {Chang'E-4 Scientific Data},
publisher = {China National Space Administration},
url = {https://moon.bao.ac.cn}
}
```
## License
The code and segmentation masks in this repository are licensed under [CC BY-NC 4.0](LICENSE) (Creative Commons Attribution-NonCommercial 4.0). You are free to use, share, and adapt for non-commercial purposes with attribution.
Original Chang'E-4 imagery is owned by CLPDS/NAOC and must be downloaded directly from their portal. See [docs/chinese-moon-data-access.md](docs/chinese-moon-data-access.md) for their citation requirements.
|