Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions implementations/multimodal_representation_learning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ The framework combines a Transformer-based tabular encoder with a ResNet-based i

The repository includes two primary Jupyter notebooks demonstrating the capabilities and training processes of the TIP model:

1. **`notebook_1_TIP.ipynb`**: **Training and Fine-Tuning**
1. **`data_preprocessing.ipynb`**: **DVM-CAR Dataset Preparation**

* Guides users through downloading, cleaning, and preprocessing the DVM-CAR dataset.
* **Key Steps**:

* Downloading raw tabular data and images.
* Cleaning and processing tabular data using provided scripts.
* Converting images to numpy arrays for efficient training.
* Creating missing masks for incomplete-data fine-tuning experiments.

2. **`notebook_1_TIP.ipynb`**: **Training and Fine-Tuning**

* Provides an introduction to TIP and walks through the training process.
* **Key Sections**:
Expand All @@ -28,7 +38,7 @@ The repository includes two primary Jupyter notebooks demonstrating the capabili
* **Dataset**: Overview of the multimodal datasets used for training (images + tabular data).
* **Fine-Tuning**: Fine-tuning the model in image-only, tabular-only, and multimodal modes.

2. **`notebook_2_TIP.ipynb`**: **Evaluation, Comparison, and Metrics**
3. **`notebook_2_TIP.ipynb`**: **Evaluation, Comparison, and Metrics**

* Focuses on evaluating and comparing the performance of the model after fine-tuning.
* **Key Sections**:
Expand Down Expand Up @@ -120,37 +130,37 @@ mkdir -p data/DVM/features

#### 2. Clean and Process Tabular Data

Use the provided notebook from the TIP repo:
Run the **`data_preprocessing.ipynb`** notebook included in this repository:

📄 [create\_dvm\_dataset.ipynb](https://github.com/siyi-wind/TIP/blob/main/data/create_dvm_dataset.ipynb)

* Open the notebook.
* Open `data_preprocessing.ipynb`.
* Update paths to match your local `data/DVM/` setup.
* Run all cells to generate cleaned and processed tabular files.
* Run the tabular data cleaning section to generate cleaned and processed tabular files.

---

#### 3. Convert Images to Numpy Arrays

Use the helper script from the TIP repo:

📄 [image2numpy.py](https://github.com/siyi-wind/TIP/blob/main/data/image2numpy.py)
Continue with the **`data_preprocessing.ipynb`** notebook:

* Update paths inside the script.
* Run to convert JPG images into numpy format for faster training.
* Run the image conversion section to convert JPG images into numpy format for faster training.
* Update paths as needed within the notebook cells.

---

#### 4. Create Missing Masks

For incomplete-data fine-tuning experiments, generate missing masks:
Complete the missing mask generation in **`data_preprocessing.ipynb`**:

📄 [create\_missing\_mask.ipynb](https://github.com/siyi-wind/TIP/blob/main/data/create_missing_mask.ipynb)

* Update paths to match `data/DVM/`.
* Run all cells to create missing masks (RVM, RFM, MIFM, LIFM).
* Run the missing mask creation section for incomplete-data fine-tuning experiments.
* This generates missing masks (RVM, RFM, MIFM, LIFM).
* Outputs will be stored in `data/DVM/missing_mask/`.

Add the data_base path to **`configs/config_dvm_TIP.yaml`** based on your local setup:

```yaml
data_base: # TODO: set data base path
```

---

### Notes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ lr_finder_lrs:
multitarget:

wandb_entity: # Removed this line
data_base: /projects/aieng/multimodal_bootcamp/representation_learning/TIP/data/DVM/features
data_base: # TODO: set data base path
num_workers: 10
pin_memory: True # speeds up host→GPU transfer
persistent_workers: True # keeps workers alive between epochs
Expand Down
Loading
Loading