Update README.md
Browse files
README.md
CHANGED
|
@@ -21,35 +21,16 @@ pip install datasets astropy
|
|
| 21 |
|
| 22 |
There are two datasets: `tiny` and `full`, each with `train` and `test` splits. The `tiny` dataset has 2 2D images in the `train` and 1 in the `test`. The `full` dataset contains all the images in the `data/` directory.
|
| 23 |
|
| 24 |
-
## Use
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
```bash
|
| 29 |
-
huggingface-
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
or
|
| 33 |
-
|
| 34 |
-
```
|
| 35 |
-
import huggingface_hub
|
| 36 |
-
huggingface_hub.login(token=token)
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
Then in your python script:
|
| 40 |
-
|
| 41 |
-
```python
|
| 42 |
-
from datasets import load_dataset
|
| 43 |
-
dataset = load_dataset("AstroCompress/GBI-16-2D", "tiny")
|
| 44 |
-
ds = dataset.with_format("np")
|
| 45 |
```
|
| 46 |
|
| 47 |
-
## Local Use
|
| 48 |
-
|
| 49 |
-
Alternatively, you can clone this repo and use directly without connecting to hf:
|
| 50 |
-
|
| 51 |
```bash
|
| 52 |
-
git
|
| 53 |
```
|
| 54 |
|
| 55 |
Then `cd SBI-16-3D` and start python like:
|
|
@@ -67,4 +48,27 @@ ds["test"][0]["image"].shape # -> (TBD)
|
|
| 67 |
```
|
| 68 |
|
| 69 |
Note of course that it will take a long time to download and convert the images in the local cache for the `full` dataset. Afterward, the usage should be quick as the files are memory-mapped from disk.
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
There are two datasets: `tiny` and `full`, each with `train` and `test` splits. The `tiny` dataset has 2 2D images in the `train` and 1 in the `test`. The `full` dataset contains all the images in the `data/` directory.
|
| 23 |
|
| 24 |
+
## Local Use (RECOMMENDED)
|
| 25 |
|
| 26 |
+
Alternatively, you can clone this repo and use directly without connecting to hf:
|
| 27 |
|
| 28 |
```bash
|
| 29 |
+
git clone https://huggingface.co/datasets/AstroCompress/GBI-16-2D
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
```bash
|
| 33 |
+
git lfs pull
|
| 34 |
```
|
| 35 |
|
| 36 |
Then `cd SBI-16-3D` and start python like:
|
|
|
|
| 48 |
```
|
| 49 |
|
| 50 |
Note of course that it will take a long time to download and convert the images in the local cache for the `full` dataset. Afterward, the usage should be quick as the files are memory-mapped from disk.
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
## Use from Huggingface Directly
|
| 54 |
+
|
| 55 |
+
To directly use from this data from Huggingface, you'll want to log in on the command line before starting python:
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
huggingface-cli login
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
or
|
| 62 |
+
|
| 63 |
+
```
|
| 64 |
+
import huggingface_hub
|
| 65 |
+
huggingface_hub.login(token=token)
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
Then in your python script:
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from datasets import load_dataset
|
| 72 |
+
dataset = load_dataset("AstroCompress/GBI-16-2D", "tiny")
|
| 73 |
+
ds = dataset.with_format("np")
|
| 74 |
+
```
|