Feature Extraction
music
sander-wood commited on
Commit
f9ca50e
·
verified ·
1 Parent(s): 7ae264c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -226,14 +226,14 @@ After training (or using pre-trained weights), extract features using [`extract_
226
  ```bash
227
  accelerate launch extract_clamp3.py --epoch <epoch> <input_dir> <output_dir> [--get_global]
228
  ```
229
- - **`--epoch <epoch>`:** (Optional) Specify the checkpoint epoch.
230
- - **`<input_dir>`:** Directory containing the input files.
231
- - **`<output_dir>`:** Destination folder for the output `.npy` features.
232
- - **`--get_global`**: (Optional) Flag to extract a global semantic vector for each input.
233
 
234
  All extracted features are stored as `.npy` files.
235
 
236
- > **Note**: In this project, we use the global semantic vectors (via average pooling and a linear layer) for both classification and retrieval tasks.
237
 
238
  ### **Retrieval and Classification**
239
  #### **1. Semantic Search**
 
226
  ```bash
227
  accelerate launch extract_clamp3.py --epoch <epoch> <input_dir> <output_dir> [--get_global]
228
  ```
229
+ - **`--epoch <epoch>`:** (Optional) Specify the checkpoint epoch.
230
+ - **`<input_dir>`:** Directory containing the input files.
231
+ - **`<output_dir>`:** Destination folder for the output `.npy` features.
232
+ - **`--get_global`**: **(Required for retrieval!)** Extracts a **global semantic vector** for each input.
233
 
234
  All extracted features are stored as `.npy` files.
235
 
236
+ > **Note**: For retrieval, `--get_global` must be used. Without it, CLaMP 3 will not work correctly for retrieval tasks. You only omit `--get_global` if you are performing downstream fine-tuning or need raw feature extraction for custom tasks.
237
 
238
  ### **Retrieval and Classification**
239
  #### **1. Semantic Search**