Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -89,7 +89,33 @@ The dataset is organized by temperature ranges:
|
|
| 89 |
|
| 90 |
## Usage Examples
|
| 91 |
|
| 92 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
```python
|
| 94 |
from dataloaders.regression_dataloader import RegressionLoader
|
| 95 |
|
|
|
|
| 89 |
|
| 90 |
## Usage Examples
|
| 91 |
|
| 92 |
+
### Option 1: Download and Use Locally
|
| 93 |
+
|
| 94 |
+
1. **Download the dataset** from [https://huggingface.co/datasets/johnpolat/CrysMTM](https://huggingface.co/datasets/johnpolat/CrysMTM)
|
| 95 |
+
2. **Use the provided loading script**:
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
# Download load_dataset.py from the repository and place it in your data directory
|
| 99 |
+
from load_dataset import load_dataset
|
| 100 |
+
|
| 101 |
+
# Load the dataset
|
| 102 |
+
dataset = load_dataset(".")
|
| 103 |
+
|
| 104 |
+
# Access splits
|
| 105 |
+
train_dataset = dataset["train"] # 5,064 samples
|
| 106 |
+
test_id_dataset = dataset["test_id"] # 1,380 samples
|
| 107 |
+
test_ood_dataset = dataset["test_ood"] # 6,588 samples
|
| 108 |
+
|
| 109 |
+
# Get a sample
|
| 110 |
+
sample = train_dataset[0]
|
| 111 |
+
print(f"Phase: {sample['phase']}")
|
| 112 |
+
print(f"Temperature: {sample['temperature']}K")
|
| 113 |
+
print(f"Image: {sample['image']}")
|
| 114 |
+
print(f"Regression labels: {sample['regression_labels']}")
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
### Option 2: Use with Original Dataloaders
|
| 118 |
+
|
| 119 |
```python
|
| 120 |
from dataloaders.regression_dataloader import RegressionLoader
|
| 121 |
|