Add files using large-upload tool
Browse files
README.md
CHANGED
@@ -8,7 +8,7 @@ tags:
|
|
8 |
datasets:
|
9 |
- apple/TiC-DataComp
|
10 |
---
|
11 |
-
# Model Card for
|
12 |
|
13 |
<!-- Provide a quick summary of what the model is/does. -->
|
14 |
|
@@ -53,6 +53,35 @@ The models are compatible with DataComp evaluation suite and our patched version
|
|
53 |
The models can also be used to resume a training or as initialization for new training using OpenCLIP code.
|
54 |
Please follow instructions in our [GitHub repo](https://github.com/apple/ml-tic-clip) to create the evaluation sets or follow [DataComp](https://github.com/mlfoundations/datacomp) for the standard evaluations on 38 datasets.
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
## Training Details
|
57 |
|
58 |
### Training Data
|
|
|
8 |
datasets:
|
9 |
- apple/TiC-DataComp
|
10 |
---
|
11 |
+
# Model Card for TiC-CLIP-basic-cumulative
|
12 |
|
13 |
<!-- Provide a quick summary of what the model is/does. -->
|
14 |
|
|
|
53 |
The models can also be used to resume a training or as initialization for new training using OpenCLIP code.
|
54 |
Please follow instructions in our [GitHub repo](https://github.com/apple/ml-tic-clip) to create the evaluation sets or follow [DataComp](https://github.com/mlfoundations/datacomp) for the standard evaluations on 38 datasets.
|
55 |
|
56 |
+
The following snippet assumes the TiC-DataComp data has been prepared and following the instructions in the GitHub repo.
|
57 |
+
```bash
|
58 |
+
YEAR=2016 # There are no models before 2016 since data from 2014-2016 were compined into one year
|
59 |
+
REPO="apple/TiC-CLIP-basic-cumulative"
|
60 |
+
huggingface-cli download $REPO checkpoints/$YEAR.pt
|
61 |
+
|
62 |
+
## Train Cummulative
|
63 |
+
pushd datacomp
|
64 |
+
final_data_dir=$TIC_DATACOMP_Y_PATH/train/$YEAR/
|
65 |
+
torchrun --nproc_per_node 8 --nnodes 1 \
|
66 |
+
train.py \
|
67 |
+
--scale "tic_medium" \
|
68 |
+
--dataset_resampled \
|
69 |
+
--data_dir $final_data_dir \
|
70 |
+
--output_dir "./results/" \
|
71 |
+
--exp_name "datacomp_medium-basic_cumulative" \
|
72 |
+
--imagenet_val $IMAGENET_VAL_PATH \
|
73 |
+
--save_frequency 1 \
|
74 |
+
--resume
|
75 |
+
popd
|
76 |
+
|
77 |
+
## Evaluate Model
|
78 |
+
# Evaluate a ViT-B/16 model on TiC/Retrieval/Yearly/$YEAR and
|
79 |
+
# TiC/DataCompNet/Yearly/$YEAR
|
80 |
+
pushd datacomp
|
81 |
+
python ../dataset_creation/tic-datacomp/generate_tasklist.py --yaml-path tasklist.yml --sample-eval --eval-tasks retrieval/yearly,datacompnet/yearly
|
82 |
+
python evaluate.py --data_dir data/ --train_output_dir ./results --use_model "ViT-B-16 $YEAR.pt" --skip_hf --skip_db --skip_notification
|
83 |
+
```
|
84 |
+
|
85 |
## Training Details
|
86 |
|
87 |
### Training Data
|