Download data/util.py from InPeerReview/RemoteSensingChangeDetection-RSCD.STNR: direct link, hf CLI and curl.
- Browser
- Download file 221 Bytes
-
https://huggingface.co/InPeerReview/RemoteSensingChangeDetection-RSCD.STNR/resolve/main/data/util.py
- Command line
-
hf download hf://InPeerReview/RemoteSensingChangeDetection-RSCD.STNR/data/util.py
-
curl -L -o util.py https://huggingface.co/InPeerReview/RemoteSensingChangeDetection-RSCD.STNR/resolve/main/data/util.py
221 Bytes
| import torchvision | |
| totensor = torchvision.transforms.ToTensor() | |
| def transform_augment_cd(img, min_max=(0, 1)): | |
| img = totensor(img) | |
| ret_img = img * (min_max[1] - min_max[0]) + min_max[0] | |
| return ret_img |