fasdfsa commited on
Commit
f1f31f0
·
1 Parent(s): 02ebfc0

add list.sh

Browse files
Files changed (1) hide show
  1. datasets/icdar2015/list.sh +27 -0
datasets/icdar2015/list.sh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # 清空或创建输出文件
4
+ > test_list.txt
5
+
6
+ # 遍历 test_images 目录下的所有文件(不包括子目录)
7
+ for file in test_images/*; do
8
+ # 检查是否为文件
9
+ if [ -f "$file" ]; then
10
+ # 提取文件名并写入 test_list.txt
11
+ basename "$file" >> test_list.txt
12
+ fi
13
+ done
14
+
15
+ echo "文件列表已生成到 test_list.txt"
16
+
17
+
18
+
19
+ > train_list.txt
20
+
21
+ for file in train_images/*; do
22
+ if [ -f "$file" ]; then
23
+ basename "$file" >> train_list.txt
24
+ fi
25
+ done
26
+
27
+ echo "文件列表已生成到 train_list.txt"