clip.marsclip_patches¶
marsclip_patches ¶
Patch-level MarsCLIP dataset aligned to the Stage A workflow.
MarsCLIPPatchDataset ¶
MarsCLIPPatchDataset(geo_dataset: MarsHiRISE | Any | None = None, *, root: Path | str | None = None, bbox: tuple[float, float, float, float] | None = None, patch_size: float | tuple[float, float] = 0.005, stride: float | tuple[float, float] | None = None, image_size: int | tuple[int, int] = 224, min_geometry_overlap: float = 0.5, min_valid_fraction: float = DEFAULT_PATCH_VALID_FRACTION, max_patches: int | None = None, generator: Generator | None = None, color_only: bool = False, rationale_cache: DataFrame | Path | str | None = None, observation_metadata: DataFrame | None = None, patch_records: DataFrame | None = None, transforms: Callable[[dict[str, Any]], dict[str, Any]] | None = None)
Bases: Dataset
Patch-level dataset bridging MarsHiRISE sampling to the MarsCLIP workflow.
Source code in src/clip/marsclip_patches.py
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | |
build_patch_observation_metadata ¶
build_patch_observation_metadata(geo_dataset: MarsHiRISE | Any, *, rationale_cache: DataFrame | Path | str | None = None) -> pd.DataFrame
Build one metadata row per observation for patch-level MarsCLIP samples.
Source code in src/clip/marsclip_patches.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
build_patch_records ¶
build_patch_records(geo_dataset: MarsHiRISE | Any, *, size: float | tuple[float, float] = 0.005, stride: float | tuple[float, float] | None = None, min_geometry_overlap: float = 0.5, observation_metadata: DataFrame | None = None, centers: Sequence[tuple[float, float, Interval]] | None = None, max_patches: int | None = None, generator: Generator | None = None) -> pd.DataFrame
Build deterministic patch records from HiRISE sampler centers.
Source code in src/clip/marsclip_patches.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | |
summarize_patch_records ¶
Compute a few lightweight summary stats for a patch manifest.
Source code in src/clip/marsclip_patches.py
save_patch_records ¶
Persist patch records for reuse across training runs.
Source code in src/clip/marsclip_patches.py
load_patch_records ¶
Load cached patch records from disk.
Source code in src/clip/marsclip_patches.py
summarize_patch_samples ¶
Summarize sampled Stage A patches using realized valid-mask statistics.