Datasets:
Tasks:
Visual Question Answering
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
< 1K
License:
Upload AutoV attention-map training data
Browse files- .gitattributes +2 -0
- README.md +51 -0
- SHA256SUMS +30 -0
- archives/attnmap100K/attnmap100K-layer15-coco.tar +3 -0
- archives/attnmap100K/attnmap100K-layer15-gqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer15-ocr_vqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer15-textvqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer15-vg.tar +3 -0
- archives/attnmap100K/attnmap100K-layer20-coco.tar +3 -0
- archives/attnmap100K/attnmap100K-layer20-gqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer20-ocr_vqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer20-textvqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer20-vg.tar +3 -0
- archives/attnmap100K/attnmap100K-layer22-coco.tar +3 -0
- archives/attnmap100K/attnmap100K-layer22-gqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer22-ocr_vqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer22-textvqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer22-vg.tar +3 -0
- archives/attnmap100K/attnmap100K-layer23-coco.tar +3 -0
- archives/attnmap100K/attnmap100K-layer23-gqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer23-ocr_vqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer23-textvqa.tar +3 -0
- archives/attnmap100K/attnmap100K-layer23-vg.tar +3 -0
- archives/attnmap1K/attnmap1K-layer15-coco.tar +3 -0
- archives/attnmap1K/attnmap1K-layer20-coco.tar +3 -0
- archives/attnmap1K/attnmap1K-layer22-coco.tar +3 -0
- archives/attnmap1K/attnmap1K-layer23-coco.tar +3 -0
- metadata/data.py +35 -0
- metadata/data_json.py +37 -0
- metadata/llava_v1_5_mix100k_filter.json +3 -0
- metadata/llava_v1_5_mix100k_reward.json +3 -0
- metadata/llava_v1_5_mix1k_filter.json +0 -0
- metadata/llava_v1_5_mix1k_reward.json +0 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
metadata/llava_v1_5_mix100k_filter.json filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
metadata/llava_v1_5_mix100k_reward.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- visual-question-answering
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
pretty_name: AutoV Attention-Map Training Data
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# AutoV Attention-Map Training Data
|
| 11 |
+
|
| 12 |
+
This private dataset repository contains the training metadata and derived
|
| 13 |
+
attention-map images used by AutoV. It does not contain the original source
|
| 14 |
+
images.
|
| 15 |
+
|
| 16 |
+
## Contents
|
| 17 |
+
|
| 18 |
+
- `metadata/llava_v1_5_mix100k_reward.json`: 100,000 reward-training records.
|
| 19 |
+
- `metadata/llava_v1_5_mix100k_filter.json`: the corresponding filtered records.
|
| 20 |
+
- `metadata/llava_v1_5_mix1k_*.json`: the 1,000-record development subset.
|
| 21 |
+
- `archives/attnmap100K/`: 20 tar archives containing 400,000 attention maps.
|
| 22 |
+
- `archives/attnmap1K/`: 4 tar archives containing 4,000 attention maps.
|
| 23 |
+
- `SHA256SUMS`: integrity checks for metadata and archives.
|
| 24 |
+
|
| 25 |
+
The 100K metadata references 25,000 COCO, 20,000 Visual Genome, 20,000 GQA,
|
| 26 |
+
20,000 OCR-VQA, and 15,000 TextVQA source-image paths. Each record has four
|
| 27 |
+
derived attention maps from CLIP ViT-L/14@336 layers 15, 20, 22, and 23.
|
| 28 |
+
|
| 29 |
+
## Restore the original AutoV data layout
|
| 30 |
+
|
| 31 |
+
Run from the downloaded repository root:
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
mkdir -p data/attnmap100K data/attnmap1K
|
| 35 |
+
for archive in archives/attnmap100K/*.tar; do
|
| 36 |
+
tar -xf "$archive" -C data/attnmap100K
|
| 37 |
+
done
|
| 38 |
+
for archive in archives/attnmap1K/*.tar; do
|
| 39 |
+
tar -xf "$archive" -C data/attnmap1K
|
| 40 |
+
done
|
| 41 |
+
cp metadata/* data/
|
| 42 |
+
sha256sum -c SHA256SUMS
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Licensing note
|
| 46 |
+
|
| 47 |
+
The metadata refers to COCO, Visual Genome, GQA, OCR-VQA, TextVQA, and LLaVA
|
| 48 |
+
data. Their original licenses and terms continue to apply. The redistribution
|
| 49 |
+
status of the derived attention-map images must be reviewed per source before
|
| 50 |
+
making this repository public. Keep the repository private until that review is
|
| 51 |
+
complete.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
705a88db7aeaf7bea36854cef3c374ff9037f465469bba9d3309cc86ebf737ea metadata/data.py
|
| 2 |
+
546c165868b052abf7959aea447726d4e939228f55c3c9eaee0fd826bf955ccd metadata/data_json.py
|
| 3 |
+
a97d80bd1bb592229769164788b17fb3ac487cae8935cfa3146ed52a98175f42 metadata/llava_v1_5_mix100k_filter.json
|
| 4 |
+
dc7548d85238473d6f5ef1d6c39138856ed25fdcf06f2b802a3abec3d97310c1 metadata/llava_v1_5_mix100k_reward.json
|
| 5 |
+
7fba4c0d0e2762848734519ec98ce41abe32bedf8fd4a732e8bd0e25d4261217 metadata/llava_v1_5_mix1k_filter.json
|
| 6 |
+
0ad60c5e7d1be4e13db54447db249804bcfdce6375999899dca6cd4fa57efa7e metadata/llava_v1_5_mix1k_reward.json
|
| 7 |
+
59e700d543fbb55e96ec0ad3ce22076708918aaa9a9e368cd443f0da98241e80 archives/attnmap100K/attnmap100K-layer15-coco.tar
|
| 8 |
+
eb2e17542d74a434ee39fff2ba7b9e9ed98d8c8e72cdc9edfa835b2611512b94 archives/attnmap100K/attnmap100K-layer15-gqa.tar
|
| 9 |
+
77df9f8819cd2d6e7d88939ec84089be5acc6de6ad1f1a575f8b7e4c901303c0 archives/attnmap100K/attnmap100K-layer15-ocr_vqa.tar
|
| 10 |
+
515836af98e4d9eed9ce0c504c4110b3b56fe31607e09ec3a7a1248db9670e57 archives/attnmap100K/attnmap100K-layer15-textvqa.tar
|
| 11 |
+
99f93b9634eb40244621e6baa68a1a723b392dfc66c6f71f6699ecd48660e5fe archives/attnmap100K/attnmap100K-layer15-vg.tar
|
| 12 |
+
8a1dfacf2a16640986b1031e51a23ba1fbcd22f8dec01b789a05b87651853754 archives/attnmap100K/attnmap100K-layer20-coco.tar
|
| 13 |
+
40b2d18e7a29d775c4bb090294cb40b69254a299b7be783ada090adf6c6e89ae archives/attnmap100K/attnmap100K-layer20-gqa.tar
|
| 14 |
+
4df148c24e2bf004028dd850b83e1ed6f6a5350ab714f7e12ec40c15a61a23d0 archives/attnmap100K/attnmap100K-layer20-ocr_vqa.tar
|
| 15 |
+
452cbcac80c3e75a1fc86b21bf8bc34d3c90577e66e9285c1078947bd9bd3ff4 archives/attnmap100K/attnmap100K-layer20-textvqa.tar
|
| 16 |
+
68bd5b32885e8cf47c1a6ee11840664467cb7cb598046a90d92ea9d6914cbed2 archives/attnmap100K/attnmap100K-layer20-vg.tar
|
| 17 |
+
a73cec927868814144c66d478b9fc50eaa416458d4d281708688026c6db996e9 archives/attnmap100K/attnmap100K-layer22-coco.tar
|
| 18 |
+
a157ee4a8b0d3fc995e79d02ad99c7c91dbb95bb47415d511229f2263e4354e0 archives/attnmap100K/attnmap100K-layer22-gqa.tar
|
| 19 |
+
b611921a95551c86d41f78025e35e079158f9ae3ca895ccca9f81575528157a0 archives/attnmap100K/attnmap100K-layer22-ocr_vqa.tar
|
| 20 |
+
2314b5c6a18696feb2872ff6ef8030e11b9cdec17c43b449f8ab5d64f7ca6247 archives/attnmap100K/attnmap100K-layer22-textvqa.tar
|
| 21 |
+
9ccf06d729fb8684abd50b3a267ae7c1cccdfc939ba078b9737143344e663af7 archives/attnmap100K/attnmap100K-layer22-vg.tar
|
| 22 |
+
d5dac059361fc0fed6004eb57e74c459609b21fac778629d4b2339d26a53c3ce archives/attnmap100K/attnmap100K-layer23-coco.tar
|
| 23 |
+
a6a8c20f4df0ad45e2bcb26c88b9186079bedc56a4aaf5b058235f90fb8bc00e archives/attnmap100K/attnmap100K-layer23-gqa.tar
|
| 24 |
+
a359d412a8999d482f83ec67085048d4b541101fa73391dafce4e6e13a167336 archives/attnmap100K/attnmap100K-layer23-ocr_vqa.tar
|
| 25 |
+
c511f011dcea068a4a243cc341a0e8510369932d935157b7ba06c9c910375db2 archives/attnmap100K/attnmap100K-layer23-textvqa.tar
|
| 26 |
+
73810a387521588cbbc5f9785ceb46894961f126ea65389e8ecbffcddbf1b20b archives/attnmap100K/attnmap100K-layer23-vg.tar
|
| 27 |
+
0b5e4c59871d5b78dc9b0a82360c7db8242b8c836a3a70ca3259a6bc7ea23e31 archives/attnmap1K/attnmap1K-layer15-coco.tar
|
| 28 |
+
06ebb4e19b0ef101e8bfd8311845b152eddad6ab2db7a887b1c582ce880de40f archives/attnmap1K/attnmap1K-layer20-coco.tar
|
| 29 |
+
6bd1a25f336189de5e27bc5a7fb3797117713881f159d3ebdebaf79d016cd288 archives/attnmap1K/attnmap1K-layer22-coco.tar
|
| 30 |
+
e3d7ac55cad0acca1aec7bba65b36fb597f837f016bd13caf18882cf026cb4c6 archives/attnmap1K/attnmap1K-layer23-coco.tar
|
archives/attnmap100K/attnmap100K-layer15-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59e700d543fbb55e96ec0ad3ce22076708918aaa9a9e368cd443f0da98241e80
|
| 3 |
+
size 964044800
|
archives/attnmap100K/attnmap100K-layer15-gqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb2e17542d74a434ee39fff2ba7b9e9ed98d8c8e72cdc9edfa835b2611512b94
|
| 3 |
+
size 636416000
|
archives/attnmap100K/attnmap100K-layer15-ocr_vqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77df9f8819cd2d6e7d88939ec84089be5acc6de6ad1f1a575f8b7e4c901303c0
|
| 3 |
+
size 281088000
|
archives/attnmap100K/attnmap100K-layer15-textvqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:515836af98e4d9eed9ce0c504c4110b3b56fe31607e09ec3a7a1248db9670e57
|
| 3 |
+
size 1115801600
|
archives/attnmap100K/attnmap100K-layer15-vg.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99f93b9634eb40244621e6baa68a1a723b392dfc66c6f71f6699ecd48660e5fe
|
| 3 |
+
size 944506880
|
archives/attnmap100K/attnmap100K-layer20-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a1dfacf2a16640986b1031e51a23ba1fbcd22f8dec01b789a05b87651853754
|
| 3 |
+
size 851087360
|
archives/attnmap100K/attnmap100K-layer20-gqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:40b2d18e7a29d775c4bb090294cb40b69254a299b7be783ada090adf6c6e89ae
|
| 3 |
+
size 561305600
|
archives/attnmap100K/attnmap100K-layer20-ocr_vqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4df148c24e2bf004028dd850b83e1ed6f6a5350ab714f7e12ec40c15a61a23d0
|
| 3 |
+
size 256798720
|
archives/attnmap100K/attnmap100K-layer20-textvqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:452cbcac80c3e75a1fc86b21bf8bc34d3c90577e66e9285c1078947bd9bd3ff4
|
| 3 |
+
size 1040302080
|
archives/attnmap100K/attnmap100K-layer20-vg.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68bd5b32885e8cf47c1a6ee11840664467cb7cb598046a90d92ea9d6914cbed2
|
| 3 |
+
size 905871360
|
archives/attnmap100K/attnmap100K-layer22-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a73cec927868814144c66d478b9fc50eaa416458d4d281708688026c6db996e9
|
| 3 |
+
size 865925120
|
archives/attnmap100K/attnmap100K-layer22-gqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a157ee4a8b0d3fc995e79d02ad99c7c91dbb95bb47415d511229f2263e4354e0
|
| 3 |
+
size 562831360
|
archives/attnmap100K/attnmap100K-layer22-ocr_vqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b611921a95551c86d41f78025e35e079158f9ae3ca895ccca9f81575528157a0
|
| 3 |
+
size 272015360
|
archives/attnmap100K/attnmap100K-layer22-textvqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2314b5c6a18696feb2872ff6ef8030e11b9cdec17c43b449f8ab5d64f7ca6247
|
| 3 |
+
size 1051975680
|
archives/attnmap100K/attnmap100K-layer22-vg.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ccf06d729fb8684abd50b3a267ae7c1cccdfc939ba078b9737143344e663af7
|
| 3 |
+
size 900884480
|
archives/attnmap100K/attnmap100K-layer23-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5dac059361fc0fed6004eb57e74c459609b21fac778629d4b2339d26a53c3ce
|
| 3 |
+
size 872171520
|
archives/attnmap100K/attnmap100K-layer23-gqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6a8c20f4df0ad45e2bcb26c88b9186079bedc56a4aaf5b058235f90fb8bc00e
|
| 3 |
+
size 568698880
|
archives/attnmap100K/attnmap100K-layer23-ocr_vqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a359d412a8999d482f83ec67085048d4b541101fa73391dafce4e6e13a167336
|
| 3 |
+
size 277176320
|
archives/attnmap100K/attnmap100K-layer23-textvqa.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c511f011dcea068a4a243cc341a0e8510369932d935157b7ba06c9c910375db2
|
| 3 |
+
size 1070704640
|
archives/attnmap100K/attnmap100K-layer23-vg.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73810a387521588cbbc5f9785ceb46894961f126ea65389e8ecbffcddbf1b20b
|
| 3 |
+
size 912076800
|
archives/attnmap1K/attnmap1K-layer15-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b5e4c59871d5b78dc9b0a82360c7db8242b8c836a3a70ca3259a6bc7ea23e31
|
| 3 |
+
size 38092800
|
archives/attnmap1K/attnmap1K-layer20-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06ebb4e19b0ef101e8bfd8311845b152eddad6ab2db7a887b1c582ce880de40f
|
| 3 |
+
size 33761280
|
archives/attnmap1K/attnmap1K-layer22-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6bd1a25f336189de5e27bc5a7fb3797117713881f159d3ebdebaf79d016cd288
|
| 3 |
+
size 34355200
|
archives/attnmap1K/attnmap1K-layer23-coco.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3d7ac55cad0acca1aec7bba65b36fb597f837f016bd13caf18882cf026cb4c6
|
| 3 |
+
size 34600960
|
metadata/data.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
home_dir = '/mnt/bn/bes-mllm-shared/zhangyuan.kevin/LLaVA/playground/data/'
|
| 5 |
+
save_dir ='/mnt/bn/bes-mllm-shared/zhangyuan.kevin'
|
| 6 |
+
|
| 7 |
+
data = json.load(open(os.path.join(home_dir, 'llava_v1_5_mix665k.json')))
|
| 8 |
+
|
| 9 |
+
# 0 - 364099 coco: 25K
|
| 10 |
+
# 364100 - 450516 vg: 20K
|
| 11 |
+
# 450517 - 522656 gqa: 20K
|
| 12 |
+
# 522657 - 602656 ocrvqa: 20K
|
| 13 |
+
# 602657 - 624610 textvqa: 15K
|
| 14 |
+
# 624611 - 649999 caption: None
|
| 15 |
+
|
| 16 |
+
sample_data = []
|
| 17 |
+
sample_data.extend(data[0:25000])
|
| 18 |
+
sample_data.extend(data[364100:384100])
|
| 19 |
+
sample_data.extend(data[450517:470517])
|
| 20 |
+
sample_data.extend(data[522657:542657])
|
| 21 |
+
sample_data.extend(data[602657:617657])
|
| 22 |
+
|
| 23 |
+
print('length of reward dataset is:',len(sample_data))
|
| 24 |
+
|
| 25 |
+
filter_sample_data = []
|
| 26 |
+
for item in sample_data:
|
| 27 |
+
i = {}
|
| 28 |
+
i['conversations'] = item['conversations'][:2]
|
| 29 |
+
i['image'] = item['image']
|
| 30 |
+
i['id'] = item['id']
|
| 31 |
+
|
| 32 |
+
filter_sample_data.append(i)
|
| 33 |
+
|
| 34 |
+
with open(os.path.join(save_dir, 'llava_v1_5_mix100k_filter.json'), 'w') as f:
|
| 35 |
+
json.dump(filter_sample_data, f, indent=4)
|
metadata/data_json.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
data = json.load(open('llava_v1_5_mix1k_filter.json'))
|
| 5 |
+
LAYERS = [15, 20, 22, 23]
|
| 6 |
+
|
| 7 |
+
collection = []
|
| 8 |
+
|
| 9 |
+
for item in data:
|
| 10 |
+
new_item = {}
|
| 11 |
+
image_path = item['image']
|
| 12 |
+
qs = item['conversations'][0]['value']
|
| 13 |
+
label = item['conversations'][1]['value']
|
| 14 |
+
idx_list =[]
|
| 15 |
+
attn_path = []
|
| 16 |
+
loss_list = []
|
| 17 |
+
for idx, l in enumerate(LAYERS):
|
| 18 |
+
idx_list.append(idx)
|
| 19 |
+
attn_path.append(f'APICLIP_llava_ViT-L-14-336_{l}/1_3_BICUBIC_0/{image_path}')
|
| 20 |
+
img = os.path.join(f'/mnt/bn/bes-mllm-shared/zhangyuan.kevin/attnmap/APICLIP_llava_ViT-L-14-336_{l}/1_3_BICUBIC_0/', image_path)
|
| 21 |
+
|
| 22 |
+
# TODO: 计算loss
|
| 23 |
+
# loss = Model(img, qs, label)
|
| 24 |
+
loss = 1
|
| 25 |
+
loss_list.append(loss)
|
| 26 |
+
|
| 27 |
+
new_item['image'] = item['image']
|
| 28 |
+
new_item['conversations'] = item['conversations']
|
| 29 |
+
new_item['id'] = item['id']
|
| 30 |
+
new_item['attn_map_path'] = attn_path
|
| 31 |
+
new_item['attn_map_idx'] = idx_list
|
| 32 |
+
new_item['llava_loss'] = loss_list
|
| 33 |
+
|
| 34 |
+
collection.append(new_item)
|
| 35 |
+
|
| 36 |
+
with open('llava_v1_5_mix1k_reward.json', 'w') as f:
|
| 37 |
+
json.dump(collection, f, indent=4)
|
metadata/llava_v1_5_mix100k_filter.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a97d80bd1bb592229769164788b17fb3ac487cae8935cfa3146ed52a98175f42
|
| 3 |
+
size 44457209
|
metadata/llava_v1_5_mix100k_reward.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc7548d85238473d6f5ef1d6c39138856ed25fdcf06f2b802a3abec3d97310c1
|
| 3 |
+
size 109450115
|
metadata/llava_v1_5_mix1k_filter.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
metadata/llava_v1_5_mix1k_reward.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|