flir_paired / README.md
newguyme's picture
Update README.md
d098a4e verified
|
raw
history blame
1.21 kB
---
dataset_info:
features:
- name: rgb
dtype: image
- name: ir
dtype: image
splits:
- name: train
num_bytes: 743157232.6539416
num_examples: 4113
- name: test
num_bytes: 186676141.08705837
num_examples: 1029
download_size: 928212503
dataset_size: 929833373.7409999
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: test
path: data/test-*
---
For modified FLIR
Usage:
```py
from torchvision import transforms
from datasets import load_dataset
dataset_name = "newguyme/flir_paired"
dataset_flir_paired = load_dataset(dataset_name, split="train",use_auth_token=True)
# dataset_flir_paired
flir_preprocess = transforms.Compose(
[
transforms.Resize((config.image_size, config.image_size)),
# transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
transforms.Normalize([0.5], [0.5]),
]
)
def flir_transform(examples):
rgb = [flir_preprocess(image.convert("RGB")) for image in examples["rgb"]]
ir = [flir_preprocess(image.convert("RGB")) for image in examples["ir"]]
return {"rgb_t_3ch": rgb, "ir_t_3ch":ir}
dataset_flir_paired.set_transform(flir_transform)
```