Myosotis-Researches 0.0.23__py3-none-any.whl → 0.0.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- myosotis_researches/CcGAN/internal/__init__.py +3 -0
- myosotis_researches/CcGAN/internal/install_datasets.py +46 -0
- myosotis_researches/CcGAN/utils/__init__.py +1 -2
- {myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/METADATA +1 -1
- {myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/RECORD +8 -6
- {myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/WHEEL +0 -0
- {myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/licenses/LICENSE +0 -0
- {myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
import gdown
|
2
|
+
import getpass
|
3
|
+
from importlib import resources
|
4
|
+
import os
|
5
|
+
import subprocess
|
6
|
+
|
7
|
+
# Paths
|
8
|
+
datasets_dir = resources.files("myosotis_researches").joinpath("CcGAN", "datasets")
|
9
|
+
if not os.path.exists(datasets_dir):
|
10
|
+
os.makedirs(datasets_dir, exist_ok=True)
|
11
|
+
|
12
|
+
# File ID dictionary
|
13
|
+
file_id_dict = {
|
14
|
+
"Ra": "1CcXp7ga4Ebj7XeMA_fYH2RxTMOWvA0v5",
|
15
|
+
"MNIST": "1LCQmQEBAGBI7ouBEWvIAjGKZsKcYasoe",
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
# Function
|
20
|
+
def install_datasets(datasets_name):
|
21
|
+
|
22
|
+
# Path
|
23
|
+
zipped_dataset_path = os.path.join(datasets_dir, f"{datasets_name}_datasets.rar")
|
24
|
+
|
25
|
+
# File ID
|
26
|
+
file_id = file_id_dict[datasets_name]
|
27
|
+
|
28
|
+
# URL
|
29
|
+
url = f"https://drive.google.com/uc?id={file_id}"
|
30
|
+
|
31
|
+
# Download
|
32
|
+
gdown.download(url, zipped_dataset_path, quiet=False, use_cookies=False)
|
33
|
+
|
34
|
+
# Unzip
|
35
|
+
unzip_password = getpass.getpass("Password:")
|
36
|
+
cmd = ["unrar", "x", f"-p{unzip_password}", zipped_dataset_path, datasets_dir]
|
37
|
+
try:
|
38
|
+
subprocess.run(cmd, check=True)
|
39
|
+
except subprocess.CalledProcessError as e:
|
40
|
+
print(e)
|
41
|
+
|
42
|
+
# Delete zipped datasets
|
43
|
+
os.remove(zipped_dataset_path)
|
44
|
+
|
45
|
+
|
46
|
+
__all__ = ["install_datasets"]
|
@@ -2,6 +2,5 @@ from .print_hdf5_structure import print_hdf5_structure
|
|
2
2
|
from .concat_image_horizontal import concat_image_horizontal
|
3
3
|
from .concat_image_vertical import concat_image_vertical
|
4
4
|
from .make_h5 import make_h5
|
5
|
-
from .install_datasets import install_datasets
|
6
5
|
|
7
|
-
__all__ = ["print_hdf5_structure", "concat_image_horizontal", "concat_image_vertical", "make_h5"
|
6
|
+
__all__ = ["print_hdf5_structure", "concat_image_horizontal", "concat_image_vertical", "make_h5"]
|
@@ -1,5 +1,7 @@
|
|
1
1
|
myosotis_researches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
myosotis_researches/CcGAN/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
myosotis_researches/CcGAN/internal/__init__.py,sha256=QCWGhp2wzcwQVTMcUoKgg0Wm8AOSX7M7GCqKv-_7deA,78
|
4
|
+
myosotis_researches/CcGAN/internal/install_datasets.py,sha256=1WAhrzaCsWqI6vbW0awyovU2nqAtJQAEfWOdIRPQ7Jo,1121
|
3
5
|
myosotis_researches/CcGAN/models_128/CcGAN_SAGAN.py,sha256=uYDngtHoB7frPg2Vs7YCFXeUh7Y7MjaAXbRWHXO_xvw,10629
|
4
6
|
myosotis_researches/CcGAN/models_128/ResNet_class_eval.py,sha256=wa5CPkYzrS0X6kZ6pGHM-GxcGNkSpBdTTqgy5dKVKkU,5131
|
5
7
|
myosotis_researches/CcGAN/models_128/ResNet_embed.py,sha256=HKSY-5WWa9jGniOgRoR1WOTfWhR1Dcj6cq2sgznZEbE,6344
|
@@ -40,14 +42,14 @@ myosotis_researches/CcGAN/train_128_output_10/train_cgan.py,sha256=bYJbBskTpESfC
|
|
40
42
|
myosotis_researches/CcGAN/train_128_output_10/train_cgan_concat.py,sha256=PYctY3IZiHGh4TshXx3mUZBf9su_8NuV_D8InkxKQZ4,8940
|
41
43
|
myosotis_researches/CcGAN/train_128_output_10/train_net_for_label_embed.py,sha256=4j6r4_o4rXgAN4MdUQL-TXqZJpbhH7d9gWQR8YzBlXw,6976
|
42
44
|
myosotis_researches/CcGAN/train_128_output_10/utils.py,sha256=B-V6ct4WDisVVCOLO0W7VIBL8StPVNJJTZZ2b2NkMFU,3766
|
43
|
-
myosotis_researches/CcGAN/utils/__init__.py,sha256=
|
45
|
+
myosotis_researches/CcGAN/utils/__init__.py,sha256=Pu9COV4zcXHGXuczhObersyeshVChmlEtwqp8VLUDxw,300
|
44
46
|
myosotis_researches/CcGAN/utils/concat_image_horizontal.py,sha256=e6WsfO9IiSoP8zkZNz7IGimPUASr9VvyJUJdF-d40iw,954
|
45
47
|
myosotis_researches/CcGAN/utils/concat_image_vertical.py,sha256=97-SuE8ZWpaeBm_ed6MAEaUOvtpzlYq_X3yWt4OEUTY,951
|
46
48
|
myosotis_researches/CcGAN/utils/install_datasets.py,sha256=1WAhrzaCsWqI6vbW0awyovU2nqAtJQAEfWOdIRPQ7Jo,1121
|
47
49
|
myosotis_researches/CcGAN/utils/make_h5.py,sha256=Q5OW1JA35ormmsrlAJp6XdC6x0uJBRNjsE31wM3zBiI,1422
|
48
50
|
myosotis_researches/CcGAN/utils/print_hdf5_structure.py,sha256=leaR8H3GhlX6EuIXDMh36xG2zBdV-XlJkaXBuoorl6I,320
|
49
|
-
myosotis_researches-0.0.
|
50
|
-
myosotis_researches-0.0.
|
51
|
-
myosotis_researches-0.0.
|
52
|
-
myosotis_researches-0.0.
|
53
|
-
myosotis_researches-0.0.
|
51
|
+
myosotis_researches-0.0.24.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
52
|
+
myosotis_researches-0.0.24.dist-info/METADATA,sha256=sduDnuSVNkDLX9ZszfATQubydA8ZMSwQQ-PQzzFLvBE,765
|
53
|
+
myosotis_researches-0.0.24.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
54
|
+
myosotis_researches-0.0.24.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
|
55
|
+
myosotis_researches-0.0.24.dist-info/RECORD,,
|
File without changes
|
{myosotis_researches-0.0.23.dist-info → myosotis_researches-0.0.24.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|