rithwiks commited on
Commit
a822140
1 Parent(s): 516a96e

Recommend to do local use

Browse files
Files changed (1) hide show
  1. README.md +25 -24
README.md CHANGED
@@ -21,30 +21,7 @@ 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 from Huggingface Directly
25
-
26
- To directly use from this data from Huggingface, you'll want to log in on the command line before starting python:
27
-
28
- ```bash
29
- huggingface-cli login
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/SBI-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
 
@@ -52,6 +29,8 @@ Alternatively, you can clone this repo and use directly without connecting to hf
52
  git clone https://huggingface.co/datasets/AstroCompress/SBI-16-2D
53
  ```
54
 
 
 
55
  Then `cd SBI-16-3D` and start python like:
56
 
57
  ```python
@@ -68,3 +47,25 @@ ds["test"][0]["image"].shape # -> (TBD)
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
 
 
29
  git clone https://huggingface.co/datasets/AstroCompress/SBI-16-2D
30
  ```
31
 
32
+ `git lfs pull`
33
+
34
  Then `cd SBI-16-3D` and start python like:
35
 
36
  ```python
 
47
 
48
  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.
49
 
50
+ ## Use from Huggingface Directly
51
+
52
+ To directly use from this data from Huggingface, you'll want to log in on the command line before starting python:
53
+
54
+ ```bash
55
+ huggingface-cli login
56
+ ```
57
+
58
+ or
59
+
60
+ ```
61
+ import huggingface_hub
62
+ huggingface_hub.login(token=token)
63
+ ```
64
+
65
+ Then in your python script:
66
+
67
+ ```python
68
+ from datasets import load_dataset
69
+ dataset = load_dataset("AstroCompress/SBI-16-2D", "tiny")
70
+ ds = dataset.with_format("np")
71
+ ```