Myosotis-Researches 0.1.19__py3-none-any.whl → 0.1.21__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/utils/__init__.py +0 -2
- myosotis_researches/CcGAN/utils/view_dataset.py +16 -0
- myosotis_researches/CcGAN/visualize/visualize_datasets.py +0 -2
- {myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/METADATA +1 -1
- {myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/RECORD +8 -8
- {myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/WHEEL +1 -1
- myosotis_researches/CcGAN/utils/make_h5.py +0 -34
- {myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/licenses/LICENSE +0 -0
- {myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,5 @@
|
|
1
1
|
from .print_hdf5 import print_hdf5
|
2
2
|
from .concat_image import concat_image
|
3
|
-
from .make_h5 import make_h5
|
4
3
|
from .SimpleProgressBar import SimpleProgressBar
|
5
4
|
from .IMGs_dataset import IMGs_dataset
|
6
5
|
from .train import PlotLoss, compute_entropy, predict_class_labels, DiffAugment
|
@@ -9,7 +8,6 @@ from .opts import parse_opts
|
|
9
8
|
__all__ = [
|
10
9
|
"print_hdf5",
|
11
10
|
"concat_image",
|
12
|
-
"make_h5",
|
13
11
|
"SimpleProgressBar",
|
14
12
|
"IMGs_dataset",
|
15
13
|
"PlotLoss",
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import h5py
|
2
|
+
|
3
|
+
|
4
|
+
def _print_hdf5(name, obj):
|
5
|
+
indent = " " * name.count("/")
|
6
|
+
if isinstance(obj, h5py.Dataset):
|
7
|
+
print(f"{indent}[Dataset] {name} shape={obj.shape} dtype={obj.dtype}")
|
8
|
+
elif isinstance(obj, h5py.Group):
|
9
|
+
print(f"{indent}[Group] {name}")
|
10
|
+
|
11
|
+
|
12
|
+
def view_dataset(dataset_path):
|
13
|
+
with h5py.File(dataset_path, "r") as f:
|
14
|
+
f.visititems(_print_hdf5)
|
15
|
+
|
16
|
+
__all__ = ["view_dataset"]
|
@@ -38,8 +38,6 @@ def datasets_to_html(indexes, datasets_path, list_path, template_path, img_size)
|
|
38
38
|
|
39
39
|
# Get list
|
40
40
|
df = pd.read_csv(list_path)
|
41
|
-
tool_wears = df.iloc[indexes]["tool_wear"]
|
42
|
-
surfaces = df.iloc[indexes]["surface"]
|
43
41
|
image_names = df.iloc[indexes]["image_name"]
|
44
42
|
|
45
43
|
# Transform data to base64
|
@@ -27,20 +27,20 @@ myosotis_researches/CcGAN/train/train_cgan_concat.py,sha256=OrQbwdU_ujUeKFGixUUp
|
|
27
27
|
myosotis_researches/CcGAN/train/train_net_for_label_embed.py,sha256=4j6r4_o4rXgAN4MdUQL-TXqZJpbhH7d9gWQR8YzBlXw,6976
|
28
28
|
myosotis_researches/CcGAN/utils/IMGs_dataset.py,sha256=i45PBNSCeAEB5uUG0SluYRTuHWZwH_5ldz2wm6afkYs,927
|
29
29
|
myosotis_researches/CcGAN/utils/SimpleProgressBar.py,sha256=S4eD_m6ysHRMHAmRtkTXVRNfXTR8kuHv-d3lUN0BVn4,546
|
30
|
-
myosotis_researches/CcGAN/utils/__init__.py,sha256=
|
30
|
+
myosotis_researches/CcGAN/utils/__init__.py,sha256=lqT3Ewg4LafR_6mGco5zsnKkgCu7FphFPnIjWK9ZcMk,472
|
31
31
|
myosotis_researches/CcGAN/utils/concat_image.py,sha256=BIGKz52Inn9S7M5fBFKye2V9bLJ0DqEQILoOVWAXUiE,2165
|
32
|
-
myosotis_researches/CcGAN/utils/make_h5.py,sha256=VtFYjr_i-JktsEW_BvofpilcDmChRmyLykv0VvlMuY0,963
|
33
32
|
myosotis_researches/CcGAN/utils/opts.py,sha256=pd7-wknNPBO5hWRpO3YAPmmAsPKgZUUpKc4gWMs6Wto,5397
|
34
33
|
myosotis_researches/CcGAN/utils/print_hdf5.py,sha256=VvmNAWtMDmg6D9V6ZbSUXrQTKRh9WIJeC4BR_ORJkco,300
|
35
34
|
myosotis_researches/CcGAN/utils/train.py,sha256=5ZXgkGesuInqUooJRpLej_KHqYQtlSDq90_5wig5elQ,5152
|
35
|
+
myosotis_researches/CcGAN/utils/view_dataset.py,sha256=BaAKII7BAItVhL--H5q88H9cUR7nSDTtAvV_uz6b6hs,415
|
36
36
|
myosotis_researches/CcGAN/visualize/__init__.py,sha256=RHfzFo7FgcJhZVQ9DkEIGELK-lQNC5X915kPH8XGSiM,85
|
37
|
-
myosotis_researches/CcGAN/visualize/visualize_datasets.py,sha256=
|
37
|
+
myosotis_researches/CcGAN/visualize/visualize_datasets.py,sha256=TVyKFxyJCQl0ele_M1zp8kGP2eyXWyGnb1i2fu16ixg,2604
|
38
38
|
myosotis_researches/CcGAN/visualize/src/style.css,sha256=4XFbetMeTKBZcG2EJH2sq4EIuvfSO_AyiVeM63ixvSI,584
|
39
39
|
myosotis_researches/CcGAN/visualize/src/style.css.map,sha256=GTGPet_xXnKQnsz-E2CMUWtrgu3D5t0g4J_A_amFdvw,246
|
40
40
|
myosotis_researches/CcGAN/visualize/src/style.scss,sha256=qk50CR-6wZ3lUHV5QvRWTUyqgCqOcKVEndi2Miv3Yig,533
|
41
41
|
myosotis_researches/CcGAN/visualize/src/template.html,sha256=5b_gnguXoXw9ugaLPXQFpiv0bix4wFELABx4pzV6_ac,2371
|
42
|
-
myosotis_researches-0.1.
|
43
|
-
myosotis_researches-0.1.
|
44
|
-
myosotis_researches-0.1.
|
45
|
-
myosotis_researches-0.1.
|
46
|
-
myosotis_researches-0.1.
|
42
|
+
myosotis_researches-0.1.21.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
43
|
+
myosotis_researches-0.1.21.dist-info/METADATA,sha256=4d0pcMiYXOK05Xr3Lx1pSO3Xh2RudE9Bq9OUJRexmXk,3484
|
44
|
+
myosotis_researches-0.1.21.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
|
45
|
+
myosotis_researches-0.1.21.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
|
46
|
+
myosotis_researches-0.1.21.dist-info/RECORD,,
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import h5py
|
2
|
-
from importlib import resources
|
3
|
-
import os
|
4
|
-
|
5
|
-
datasets_dir = resources.files("myosotis_researches").joinpath("CcGAN", "datasets")
|
6
|
-
|
7
|
-
|
8
|
-
def make_h5(
|
9
|
-
old_datasets_name,
|
10
|
-
size,
|
11
|
-
new_datasets_path,
|
12
|
-
image_indexes,
|
13
|
-
train_indexes,
|
14
|
-
val_indexes,
|
15
|
-
):
|
16
|
-
|
17
|
-
old_datasets_path = os.path.join(
|
18
|
-
datasets_dir, f"{old_datasets_name}_datasets", f"{old_datasets_name}_{size}x{size}.h5"
|
19
|
-
)
|
20
|
-
|
21
|
-
with h5py.File(old_datasets_path, "r") as f:
|
22
|
-
image_datas = f["images"][:]
|
23
|
-
image_labels = f["labels"][:]
|
24
|
-
image_types = f["types"][:]
|
25
|
-
|
26
|
-
with h5py.File(new_datasets_path, "w") as f:
|
27
|
-
f.create_dataset("images", data=image_datas[image_indexes])
|
28
|
-
f.create_dataset("indx_train", data=train_indexes)
|
29
|
-
f.create_dataset("indx_valid", data=val_indexes)
|
30
|
-
f.create_dataset("labels", data=image_labels[image_indexes])
|
31
|
-
f.create_dataset("types", data=image_types[image_indexes])
|
32
|
-
|
33
|
-
|
34
|
-
__all__ = ["make_h5"]
|
{myosotis_researches-0.1.19.dist-info → myosotis_researches-0.1.21.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|