WeiDai-David commited on
Commit
d4044b4
·
verified ·
1 Parent(s): 04b5e6f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +126 -1
README.md CHANGED
@@ -5,4 +5,129 @@ task_categories:
5
  - feature-extraction
6
  language:
7
  - en
8
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - feature-extraction
6
  language:
7
  - en
8
+ ---
9
+
10
+ # **Office-Home-LDS Dataset**
11
+
12
+ The Office-Home-LDS dataset is constructed by introducing label skew on top of the domain skew present in the original Office-Home dataset. <br>
13
+ The goal is to create a more challenging and realistic dataset that simultaneously exhibits both label skew and domain skew.
14
+
15
+ ## 📂 **Huggingface Dataset Structure**
16
+ The dataset is organized as follows:
17
+
18
+ ```text
19
+ Office-Home-LDS/
20
+ ├── data/
21
+ │ └── Office-Home.zip # Original raw dataset (compressed)
22
+ ├── new_dataset/ # Processed datasets based on different settings
23
+ │ ├── Office-Home-0.1.zip # Split with Dirichlet α = 0.1 (compressed)
24
+ │ ├── Office-Home-0.5.zip # Split with Dirichlet α = 0.5 (compressed)
25
+ │ └── Office-Home-0.05.zip # Split with Dirichlet α = 0.05 (compressed)
26
+ ├── Dataset-Office-Home-LDS.py # Python script for processing and splitting Original raw dataset
27
+ └── README.md # Project documentation
28
+ ```
29
+
30
+ ## 📥 **Extract Files**
31
+ After downloading the dataset, you can extract it using the following commands:
32
+
33
+ ### 🔹 Linux/macOS:
34
+ ```bash
35
+ unzip data/Office-Home.zip -d ./data/Office-Home
36
+ unzip new_dataset/Office-Home-0.1.zip -d ./new_dataset/Office-Home-0.1
37
+ unzip new_dataset/Office-Home-0.5.zip -d ./new_dataset/Office-Home-0.5
38
+ unzip new_dataset/Office-Home-0.05.zip -d ./new_dataset/Office-Home-0.05
39
+ ```
40
+
41
+ ### 🔹 Windows:
42
+ #### 🟦 PowerShell Method:
43
+ ```bash
44
+ # Extract the original dataset
45
+ Expand-Archive -Path data/Office-Home.zip -DestinationPath ./data/Office-Home
46
+
47
+ # Extract processed datasets
48
+ Expand-Archive -Path new_dataset/Office-Home-0.1.zip -DestinationPath ./new_dataset/Office-Home-0.1
49
+ Expand-Archive -Path new_dataset/Office-Home-0.5.zip -DestinationPath ./new_dataset/Office-Home-0.5
50
+ Expand-Archive -Path new_dataset/Office-Home-0.05.zip -DestinationPath ./new_dataset/Office-Home-0.05
51
+ ```
52
+ #### 🟦 Python Method:
53
+ ```bash
54
+ import zipfile
55
+ import os
56
+
57
+ # Create target directories if they don't exist
58
+ os.makedirs('./data/Office-Home', exist_ok=True)
59
+ os.makedirs('./new_dataset/Office-Home-0.1', exist_ok=True)
60
+ os.makedirs('./new_dataset/Office-Home-0.5', exist_ok=True)
61
+ os.makedirs('./new_dataset/Office-Home-0.05', exist_ok=True)
62
+
63
+ # Extract zip files
64
+ with zipfile.ZipFile('data/Office-Home.zip', 'r') as zip_ref:
65
+ zip_ref.extractall('./data/Office-Home')
66
+
67
+ with zipfile.ZipFile('new_dataset/Office-Home-0.1.zip', 'r') as zip_ref:
68
+ zip_ref.extractall('./new_dataset/Office-Home-0.1')
69
+
70
+ with zipfile.ZipFile('new_dataset/Office-Home-0.5.zip', 'r') as zip_ref:
71
+ zip_ref.extractall('./new_dataset/Office-Home-0.5')
72
+
73
+ with zipfile.ZipFile('new_dataset/Office-Home-0.05.zip', 'r') as zip_ref:
74
+ zip_ref.extractall('./new_dataset/Office-Home-0.05')
75
+ ```
76
+ ## 📂 **Extracted File Structure**
77
+ The dataset is organized as follows:
78
+
79
+ ```text
80
+ ```text
81
+ Office-Home-LDS/
82
+ ├── data/
83
+ │ └── Office-Home/ # Original dataset
84
+ │ ├── Art/
85
+ │ ├── Clipart/
86
+ │ ├── Product/
87
+ │ └── Real World/
88
+ ├── new_dataset/
89
+ │ ├── Office-Home-0.1/ # Split with α = 0.1
90
+ │ │ ├── Art/ # Domain: Art
91
+ │ │ │ ├── client/ # Client-level split images
92
+ │ │ │ ├── train/ # Train set images
93
+ │ │ │ └── test/ # Test set images
94
+ │ │ ├── Clipart/ # Domain: Clipart
95
+ │ │ │ ├── client/ # Client-level split
96
+ │ │ │ ├── train/ # Train set images
97
+ │ │ │ └── test/ # Test set images
98
+ │ │ ├── Product/ # Domain: Product
99
+ │ │ │ ├── client/ # Client-level split
100
+ │ │ │ ├── train/ # Train set images
101
+ │ │ │ └── test/ # Test set images
102
+ │ │ ├── Real World/ # Domain: Real_World
103
+ │ │ │ ├── client/ # Client-level split
104
+ │ │ │ ├── train/ # Train set images
105
+ │ │ │ └── test/ # Test set images
106
+ │ │ ├── output_indices/ # Split information and indices
107
+ │ │ │ ├── Art/ # Indices for Art domain
108
+ │ │ │ │ ├── class_indices.npy # Class-level indices
109
+ │ │ │ │ ├── client_client_indices.npy # Client split indices
110
+ │ │ │ │ ├── test_test_indices.npy # Test set indices
111
+ │ │ │ │ └── train_train_indices.npy # Train set indices
112
+ │ │ │ ├── Clipart/ # Indices for Clipart domain
113
+ │ │ │ │ ├── class_indices.npy
114
+ │ │ │ │ ├── client_client_indices.npy
115
+ │ │ │ │ ├── test_test_indices.npy
116
+ │ │ │ │ └── train_train_indices.npy
117
+ │ │ │ ├── Product/ # Indices for Product domain
118
+ │ │ │ │ ├── class_indices.npy
119
+ │ │ │ │ ├── client_client_indices.npy
120
+ │ │ │ │ ├── test_test_indices.npy
121
+ │ │ │ │ └── train_train_indices.npy
122
+ │ │ │ ├── Real World/ # Indices for Real_World domain
123
+ │ │ │ │ ├── class_indices.npy
124
+ │ │ │ │ ├── client_client_indices.npy
125
+ │ │ │ │ ├── test_test_indices.npy
126
+ │ │ │ │ └── train_train_indices.npy
127
+ │ │ │ └── combined_class_allocation.txt # Global class allocation info
128
+ │ ├── Office-Home-0.5/ # Split with α = 0.5 (similar structure)
129
+ │ └── Office-Home-0.05/ # Split with α = 0.05 (similar structure)
130
+ ├── Dataset-Office-Home-LDS.py # Python script for processing and splitting Original raw dataset
131
+ └── README.md # Project documentation
132
+
133
+ ```