Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dfki-ric/uxo-dataset2024/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Therelease_1_export.py script is the main export utility for preparing the UXO Dataset 2024 release. It processes matched recordings, exports synchronized ARIS sonar and GoPro imagery, calculates coordinate transformations, and packages everything into the final dataset structure.
Command-Line Usage
This script reads all configuration from
config.yaml. No command-line arguments are accepted.Configuration
The script uses the following configuration options fromconfig.yaml:
Export Settings
Path to the CSV file containing matched recordings with timing offsets.Default:
"../data_processed/matches.csv"Output directory for the exported dataset.Default:
"../data_export"Image format for polar-transformed ARIS frames. Options:
png, pgmDefault: "png"GoPro resolution to include in export. Only one resolution can be selected.Options:
"uhd" (5312x2988), "fhd" (1920x1080), "sd" (640x360)Default: "fhd"File format for exported GoPro frames.Default:
"jpg"If true, only export frame ranges where both sonar and GoPro footage overlap.Default:
trueExample Configuration
config.yaml
export_recording Function
The core function that exports a single recording.Signature
Parameters
A row from the matches CSV containing:
aris_file: Path to ARIS recording directorygantry_file: Path to gantry CSV filegopro_file: Path to GoPro video filearis_onset: Start frame index for ARISgopro_offset: Time offset for GoPro synchronizationgantry_offset: Time offset for gantry datanotes: Recording notes (used to determine target type)
Root directory containing the source data files
Root directory for exported recordings
Image format for polar ARIS frames
GoPro resolution to export
Image format for exported GoPro frames
Whether to trim recording to frames with valid GoPro footage
Behavior
The function performs the following operations:- Load Recording Data: Creates a
MatchingContextwith timing offsets - Create Output Structure: Organizes by target type (extracted from notes)
- Export Frames:
- Copies raw ARIS frames (PGM format)
- Copies polar ARIS frames (PNG or PGM)
- Extracts and saves GoPro frames as individual images
- Export Metadata:
gantry.csv: Gantry position (x, y, z) per framear3.csv: AR3 robot position and orientation in world coordinatesaris_frame_meta.csv: Per-frame ARIS metadataaris_file_meta.yaml: File-level ARIS metadatanotes.txt: Recording notes
If a frame already exists in the export directory, the script skips the rest of that recording to avoid overwriting.
Output Structure
The script creates the following directory structure:Target Type Detection
Target types are automatically extracted from the recording notes using theget_target_type() function:
Example Notes Format
steel_barrel in the output structure.
Coordinate Transformations
The script calculates AR3 robot arm pose in world coordinates using the transform chain:_create_ar3_df() function:
- Loads the transform manager from calibration data
- Applies gantry position (x, y, z) to update portal crane transform
- Calculates AR3 position in world coordinates
- Combines with ARIS orientation (roll, tilt, pan) for final pose
- Outputs quaternion rotation (x, y, z, w)
AR3 Output Format
Thear3.csv file contains:
| Column | Type | Description |
|---|---|---|
aris_frame_idx | int | Frame index |
pos.x, pos.y, pos.z | float | Position in meters (6 decimal precision) |
rot.x, rot.y, rot.z, rot.w | float | Quaternion rotation (6 decimal precision) |
Additional Export Operations
After exporting all recordings, the script copies:- 3D Models: Target mesh files (excludes Metashape projects)
- Scripts: All Python scripts (excludes
__pycache__) - Calibration: Camera and sensor calibration data
- Documentation: README and preview image
Usage Example
Progress Tracking
The script usestqdm progress bars to show:
- Overall progress across all recordings
- Per-recording frame export progress with recording name
Error Handling
If
export_only_with_gopro is enabled and footage is trimmed, the script prints a message showing the actual exported frame range.Dependencies
Required Python packages:pandas- Data handling and CSV operationsnumpy- Numerical operationsscipy- Rotation transformationsopencv-python(cv2) - Image I/OPyYAML- Configuration parsingtqdm- Progress bars
common.config- Configuration loadingcommon.aris_definitions- ARIS metadata definitionscommon.matching_context- Recording data accessdataset.calibration.tf_demo.transforms- Coordinate transforms