技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
datasets-and-samplers【数据与研究】Use for TorchGeo GeoDataset/NonGeoDataset usage, dataset composition, raster/vector dataset implementation, sample dictionaries, collate functions, and patch samplers.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for dataset selection, custom dataset implementation, geospatial composition, patch sampling, data loader collation, and dataset tests.
GeoDataset when samples are queried by geospatial extent/time and the dataset has CRS/resolution/geometry metadata. These datasets support spatial/temporal indexing and composition.NonGeoDataset for torchvision-style benchmark datasets indexed by integer sample id and usually stored under a root directory.dataset_a & dataset_b creates an IntersectionDataset: every query must be available in both datasets. Use this for image + mask/label/elevation/data-fusion workflows.dataset_a | dataset_b creates a UnionDataset: a query may be satisfied by either dataset. Use this for alternate sensors or adjacent regions.Common keys:
image: tensor shaped like (C, H, W) for a single sample or batched by a collate function.mask: semantic/change/instance segmentation target.label: classification/regression target.bbox_xyxy: object detection boxes in xyxy format.crs, bounds, dates, filenames, or dataset-specific attributes.Always read the dataset test fixture before assuming keys. Use stack_samples for ordinary tensor dictionaries; use detection-specific collate helpers when boxes/masks are variable length.
RandomPatchSampler(dataset, size=..., length=...) for stochastic training chips from a GeoDataset.roi for a spatial region of interest and toi for a time interval of interest. Verify that ROI and TOI intersect dataset.index.units argument where available: pixel units are converted using dataset resolution, while CRS units are already in projected units.torchgeo/datasets/<name>.py with the TorchGeo license header.GeoDataset, NonGeoDataset, raster, or vector base class based on indexing semantics.root='data' default when adding a new dataset unless an existing nearby class uses a different convention._verify()/download/checksum behavior consistently with adjacent datasets.torchgeo/datasets/__init__.py.tests/data/<dataset>/ and a focused tests/datasets/test_<dataset>.py with plot/download/checksum/error coverage as applicable.