Spaces:
Runtime error
Runtime error
Download utils/sam_dataset_test.py from shgao/EditAnything: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/spaces/shgao/EditAnything/resolve/main/utils/sam_dataset_test.py
- Command line
-
hf download hf://spaces/shgao/EditAnything/utils/sam_dataset_test.py
-
curl -L -o sam_dataset_test.py https://huggingface.co/spaces/shgao/EditAnything/resolve/main/utils/sam_dataset_test.py
339 Bytes
| from sam_dataset import SAMDataset | |
| dataset = SAMDataset() | |
| print(len(dataset)) | |
| item = dataset[1234] | |
| jpg = item['jpg'] | |
| txt = item['txt'] | |
| hint = item['hint'] | |
| print(txt) | |
| print(jpg.shape) | |
| print(hint.shape) | |
| for each in dataset: | |
| jpg = item['jpg'] | |
| txt = item['txt'] | |
| hint = item['hint'] | |
| print(txt) | |
| print(jpg.shape,hint.shape) |