--- title: 4DGS Frame Extractor emoji: 🌍 colorFrom: purple colorTo: purple sdk: gradio sdk_version: 5.15.0 app_file: app.py pinned: false license: mit short_description: Extract and arrange frames for large datasets. --- Important Things to Note Input Format: ZIP Files: Each camera folder should be compressed into a ZIP file. The ZIP file’s name (without the extension) is used as the camera identifier. Regex Pattern: The pattern must include one capturing group that extracts the numeric frame value from file names. Example: For files named like cam1_00180000, use _(\d+). Frame Range: Provide the actual numeric values appearing in your file names for the start and end frames. For example, for frames cam1_00180000 to cam1_00183015, set: Start Frame: 180000 End Frame: 183015 Frame Index Calculation: The frame index is computed as: frame_index = extracted_number - start_frame + 1 This means the file with the frame number equal to the start frame becomes “Frame_1.” Output Structure: The application creates a folder for each frame index (e.g., Frame_1, Frame_2, …). Files are copied into their respective frame folders and renamed with the camera name as a prefix to avoid collisions. The final sorted structure is compressed into a ZIP file for download. Hosting on Hugging Face Spaces: The application is built using Gradio, making it easy to deploy and share as a web app. Ensure that your requirements.txt includes gradio (other standard libraries are already included with Python). Once deployed, users can visit the shared Hugging Face Spaces link, upload their ZIP files, and retrieve the sorted frames as a ZIP. Temporary Files and Cleanup: The app uses temporary directories to extract and process files. Depending on the size of the inputs, consider monitoring disk usage or implementing cleanup routines if necessary. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference