RunyiY commited on
Commit
d431f60
·
verified ·
1 Parent(s): a2c6a37

Upload structured3d/merge.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. structured3d/merge.sh +45 -0
structured3d/merge.sh ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Merge script for structured3d dataset
4
+ # This script reassembles chunks back into the original structured3d.tar.gz file
5
+
6
+ DATASET_NAME="structured3d"
7
+ OUTPUT_FILE="structured3d.tar.gz"
8
+
9
+ echo "Merging $DATASET_NAME chunks"
10
+ echo "============================="
11
+
12
+ if [ ! -d "chunks" ]; then
13
+ echo "Error: chunks directory not found"
14
+ echo "Run ./split.sh first or ./download.py to get chunks"
15
+ exit 1
16
+ fi
17
+
18
+ # Check if chunks exist
19
+ if [ ! -f "chunks/${DATASET_NAME}_part_000" ]; then
20
+ echo "Error: No chunks found in chunks directory"
21
+ echo "Expected files like ${DATASET_NAME}_part_000, ${DATASET_NAME}_part_001, etc."
22
+ exit 1
23
+ fi
24
+
25
+ echo "Found chunks:"
26
+ ls -lh chunks/${DATASET_NAME}_part_* | awk '{print " " $9 ": " $5}'
27
+
28
+ echo
29
+ echo "Reassembling $OUTPUT_FILE..."
30
+
31
+ # Merge chunks in correct order
32
+ cat chunks/${DATASET_NAME}_part_* > "$OUTPUT_FILE"
33
+
34
+ if [ $? -eq 0 ]; then
35
+ echo "✓ Successfully reassembled $OUTPUT_FILE"
36
+ echo "File size: $(ls -lh "$OUTPUT_FILE" | awk '{print $5}')"
37
+
38
+ echo
39
+ echo "Next steps:"
40
+ echo "1. Run ./extract.sh to extract the contents"
41
+ echo "2. Verify the file integrity if needed"
42
+ else
43
+ echo "✗ Failed to reassemble $OUTPUT_FILE"
44
+ exit 1
45
+ fi