测试数据集文件

This commit is contained in:
myh 2025-04-20 15:20:40 +08:00
parent 3b80f237fa
commit ef3d521e4a
25 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# 创建测试目录结构
mkdir -p ./test_data/{client1,client2}/{train,val}/images
mkdir -p ./test_data/{client1,client2}/{train,val}/labels
# 生成虚拟数据各客户端仅需2张图片
for client in client1 client2; do
for split in train val; do
# 创建空图片128x128 RGB
magick -size 128x128 xc:white test_data/${client}/${split}/images/img1.jpg
magick -size 128x128 xc:black test_data/${client}/${split}/images/img2.jpg
# 创建示例标签文件
echo "0 0.5 0.5 0.2 0.2" > test_data/${client}/${split}/labels/img1.txt
echo "1 0.3 0.3 0.4 0.4" > test_data/${client}/${split}/labels/img2.txt
done
done

View File

@ -0,0 +1,4 @@
train: ../test_data/client1/train/images
val: ../test_data/client1/val/images
nc: 2
names: [ 'class0', 'class1' ]

View File

@ -0,0 +1,4 @@
train: ../test_data/client2/train/images
val: ../test_data/client2/val/images
nc: 2
names: [ 'class0', 'class1' ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View File

@ -0,0 +1 @@
0 0.5 0.5 0.2 0.2

View File

@ -0,0 +1 @@
1 0.3 0.3 0.4 0.4

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

View File

@ -0,0 +1 @@
0 0.5 0.5 0.2 0.2

View File

@ -0,0 +1 @@
1 0.3 0.3 0.4 0.4

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View File

@ -0,0 +1 @@
0 0.5 0.5 0.2 0.2

View File

@ -0,0 +1 @@
1 0.3 0.3 0.4 0.4

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

View File

@ -0,0 +1 @@
0 0.5 0.5 0.2 0.2

View File

@ -0,0 +1 @@
1 0.3 0.3 0.4 0.4

Binary file not shown.

Binary file not shown.