Myosotis-Researches 0.1.0__tar.gz → 0.1.1__tar.gz
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-0.1.0 → myosotis_researches-0.1.1/Myosotis_Researches.egg-info}/PKG-INFO +6 -5
- {myosotis_researches-0.1.0/Myosotis_Researches.egg-info → myosotis_researches-0.1.1}/PKG-INFO +6 -5
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/README.md +5 -4
- myosotis_researches-0.1.1/myosotis_researches/CcGAN/utils/make_h5.py +34 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/setup.py +1 -1
- myosotis_researches-0.1.0/myosotis_researches/CcGAN/utils/make_h5.py +0 -43
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/LICENSE +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/Myosotis_Researches.egg-info/SOURCES.txt +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/Myosotis_Researches.egg-info/dependency_links.txt +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/Myosotis_Researches.egg-info/top_level.txt +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/internal/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/internal/install_datasets.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/internal/show_datasets.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/internal/uninstall_datasets.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/CcGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/ResNet_class_eval.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/ResNet_embed.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/ResNet_regre_eval.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/autoencoder.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/cGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_128/cGAN_concat_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/CcGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/ResNet_class_eval.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/ResNet_embed.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/ResNet_regre_eval.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/autoencoder.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/cGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/models_256/cGAN_concat_SAGAN.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/DiffAugment_pytorch.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/eval_metrics.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/opts.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/pretrain_AE.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/pretrain_CNN_class.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/pretrain_CNN_regre.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/train_ccgan.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/train_cgan.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/train_cgan_concat.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/train_net_for_label_embed.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/utils.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/DiffAugment_pytorch.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/eval_metrics.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/opts.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/pretrain_AE.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_class.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_regre.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/train_ccgan.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/train_cgan.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/train_cgan_concat.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/train_net_for_label_embed.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128_output_10/utils.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/utils/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/utils/concat_image.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/utils/print_hdf5.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/__init__.py +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/pyproject.toml +0 -0
- {myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/setup.cfg +0 -0
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1/Myosotis_Researches.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Myosotis-Researches
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: A repository for storing my progress of researches.
|
5
5
|
Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
|
6
6
|
Author: Zeyu Xie
|
@@ -59,10 +59,11 @@ Import with code
|
|
59
59
|
from myosotis_researches.utils import *
|
60
60
|
```
|
61
61
|
|
62
|
-
| Function
|
63
|
-
|
|
64
|
-
| `concat_image(img_list, gap=2, direction="vertical")`
|
65
|
-
| `
|
62
|
+
| Function | Description |
|
63
|
+
| ------------------------------------------------------------ | ----------------------------------------- |
|
64
|
+
| `concat_image(img_list, gap=2, direction="vertical")` | Concat images vertically or horizontally. |
|
65
|
+
| `make_h5(old_datasets_name, size, new_datasets_path, image_indexes, train_indexes, val_indexes)` | Get piece of original HDF5 datasets. |
|
66
|
+
| `print_hdf5(name, obj)` | Print a basic structure of an HDF5 file. |
|
66
67
|
|
67
68
|
**Note**:
|
68
69
|
|
{myosotis_researches-0.1.0/Myosotis_Researches.egg-info → myosotis_researches-0.1.1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Myosotis-Researches
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: A repository for storing my progress of researches.
|
5
5
|
Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
|
6
6
|
Author: Zeyu Xie
|
@@ -59,10 +59,11 @@ Import with code
|
|
59
59
|
from myosotis_researches.utils import *
|
60
60
|
```
|
61
61
|
|
62
|
-
| Function
|
63
|
-
|
|
64
|
-
| `concat_image(img_list, gap=2, direction="vertical")`
|
65
|
-
| `
|
62
|
+
| Function | Description |
|
63
|
+
| ------------------------------------------------------------ | ----------------------------------------- |
|
64
|
+
| `concat_image(img_list, gap=2, direction="vertical")` | Concat images vertically or horizontally. |
|
65
|
+
| `make_h5(old_datasets_name, size, new_datasets_path, image_indexes, train_indexes, val_indexes)` | Get piece of original HDF5 datasets. |
|
66
|
+
| `print_hdf5(name, obj)` | Print a basic structure of an HDF5 file. |
|
66
67
|
|
67
68
|
**Note**:
|
68
69
|
|
@@ -36,10 +36,11 @@ Import with code
|
|
36
36
|
from myosotis_researches.utils import *
|
37
37
|
```
|
38
38
|
|
39
|
-
| Function
|
40
|
-
|
|
41
|
-
| `concat_image(img_list, gap=2, direction="vertical")`
|
42
|
-
| `
|
39
|
+
| Function | Description |
|
40
|
+
| ------------------------------------------------------------ | ----------------------------------------- |
|
41
|
+
| `concat_image(img_list, gap=2, direction="vertical")` | Concat images vertically or horizontally. |
|
42
|
+
| `make_h5(old_datasets_name, size, new_datasets_path, image_indexes, train_indexes, val_indexes)` | Get piece of original HDF5 datasets. |
|
43
|
+
| `print_hdf5(name, obj)` | Print a basic structure of an HDF5 file. |
|
43
44
|
|
44
45
|
**Note**:
|
45
46
|
|
@@ -0,0 +1,34 @@
|
|
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, old_datasets_name, 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"]
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="Myosotis-Researches",
|
5
|
-
version="0.1.
|
5
|
+
version="0.1.1",
|
6
6
|
description="A repository for storing my progress of researches.",
|
7
7
|
long_description=open("README.md").read(),
|
8
8
|
long_description_content_type="text/markdown",
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import h5py
|
2
|
-
import numpy as np
|
3
|
-
import os
|
4
|
-
from PIL import Image
|
5
|
-
from .print_hdf5 import print_hdf5
|
6
|
-
|
7
|
-
# Make all images to a HDF5 file
|
8
|
-
def make_h5(image_dir, h5_path, image_names = [], indx_train = None, indx_valid = None, image_labels = None, image_types = None):
|
9
|
-
|
10
|
-
N = len(image_names)
|
11
|
-
|
12
|
-
# Process none
|
13
|
-
if indx_train is None:
|
14
|
-
indx_train = np.array(range(1, N, 2), dtype=np.int32)
|
15
|
-
if indx_valid is None:
|
16
|
-
indx_valid = np.array(range(0, N, 2), dtype=np.int32)
|
17
|
-
if image_labels is None:
|
18
|
-
image_labels = np.zeros(N)
|
19
|
-
if image_types is None:
|
20
|
-
image_types = np.zeros(N)
|
21
|
-
|
22
|
-
# Get image data
|
23
|
-
image_datas = []
|
24
|
-
for i in range(N):
|
25
|
-
image_name = image_names[i]
|
26
|
-
image_path = os.path.join(image_dir, image_name)
|
27
|
-
image = Image.open(image_path).convert("RGB")
|
28
|
-
rgb_array = np.array(image).transpose((2, 0, 1))
|
29
|
-
image_datas.append(rgb_array)
|
30
|
-
image_datas = np.array(image_datas, dtype=np.uint8)
|
31
|
-
|
32
|
-
# Create a new HDF5 file
|
33
|
-
with h5py.File(h5_path, "w") as f:
|
34
|
-
f.create_dataset("images", data=image_datas)
|
35
|
-
f.create_dataset("indx_train", data=indx_train)
|
36
|
-
f.create_dataset("indx_valid", data=indx_valid)
|
37
|
-
f.create_dataset("labels", data=image_labels)
|
38
|
-
f.create_dataset("types", data=image_types)
|
39
|
-
|
40
|
-
# Visualize
|
41
|
-
f.visititems(print_hdf5)
|
42
|
-
|
43
|
-
__all__ = ["make_h5"]
|
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/Myosotis_Researches.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/Myosotis_Researches.egg-info/top_level.txt
RENAMED
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/opts.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/train_128/utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{myosotis_researches-0.1.0 → myosotis_researches-0.1.1}/myosotis_researches/CcGAN/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|