Myosotis-Researches 0.1.31__tar.gz → 0.1.33__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.31 → myosotis_researches-0.1.33/Myosotis_Researches.egg-info}/PKG-INFO +1 -1
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/Myosotis_Researches.egg-info/SOURCES.txt +1 -0
- {myosotis_researches-0.1.31/Myosotis_Researches.egg-info → myosotis_researches-0.1.33}/PKG-INFO +1 -1
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/__init__.py +1 -0
- myosotis_researches-0.1.33/myosotis_researches/CcGAN/utils/similarity.py +52 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/setup.py +1 -1
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/LICENSE +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/MANIFEST.in +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/Myosotis_Researches.egg-info/dependency_links.txt +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/Myosotis_Researches.egg-info/top_level.txt +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/README.md +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/CcGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/ResNet_class_eval.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/ResNet_embed.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/ResNet_regre_eval.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/autoencoder.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/cGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_128/cGAN_concat_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/CcGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/ResNet_class_eval.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/ResNet_embed.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/ResNet_regre_eval.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/autoencoder.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/cGAN_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/models_256/cGAN_concat_SAGAN.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/IMGs_dataset.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/SimpleProgressBar.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/opts.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/train.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/train/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/train/train_ccgan.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/train/train_cgan.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/train/train_cgan_concat.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/train/train_net_for_label_embed.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/concat_image.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/dataset.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/src/style.css +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/src/style.css.map +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/src/style.scss +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/src/template.html +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/__init__.py +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/pyproject.toml +0 -0
- {myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/setup.cfg +0 -0
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/Myosotis_Researches.egg-info/SOURCES.txt
RENAMED
@@ -38,6 +38,7 @@ myosotis_researches/CcGAN/train/train_net_for_label_embed.py
|
|
38
38
|
myosotis_researches/CcGAN/utils/__init__.py
|
39
39
|
myosotis_researches/CcGAN/utils/concat_image.py
|
40
40
|
myosotis_researches/CcGAN/utils/dataset.py
|
41
|
+
myosotis_researches/CcGAN/utils/similarity.py
|
41
42
|
myosotis_researches/CcGAN/utils/src/style.css
|
42
43
|
myosotis_researches/CcGAN/utils/src/style.css.map
|
43
44
|
myosotis_researches/CcGAN/utils/src/style.scss
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import cv2
|
2
|
+
import numpy as np
|
3
|
+
from PIL import Image
|
4
|
+
from skimage.metrics import structural_similarity as ssim
|
5
|
+
|
6
|
+
|
7
|
+
# MSE
|
8
|
+
def _MSE(image_1, image_2):
|
9
|
+
array_1 = np.array(image_1) / 255
|
10
|
+
array_2 = np.array(image_2) / 255
|
11
|
+
n, m, _ = array_1.shape
|
12
|
+
return np.sum((array_1 - array_2) ** 2) / (n * m * 3)
|
13
|
+
|
14
|
+
|
15
|
+
def MSE(images):
|
16
|
+
MSE_sum = 0
|
17
|
+
n = len(images)
|
18
|
+
for i in range(n):
|
19
|
+
for j in range(i + 1, n):
|
20
|
+
MSE_sum += _MSE(images[i], images[j])
|
21
|
+
return MSE_sum / (n * (n - 1) / 2)
|
22
|
+
|
23
|
+
|
24
|
+
# SSIM
|
25
|
+
|
26
|
+
|
27
|
+
def _SSIM(image_1, image_2):
|
28
|
+
|
29
|
+
array_1 = np.array(image_1)
|
30
|
+
array_2 = np.array(image_2)
|
31
|
+
score, _ = ssim(array_1, array_2, channel_axis=-1, full=True)
|
32
|
+
return score
|
33
|
+
|
34
|
+
|
35
|
+
def SSIM(images):
|
36
|
+
SSIM_sum = 0
|
37
|
+
n = len(images)
|
38
|
+
for i in range(n):
|
39
|
+
for j in range(i + 1, n):
|
40
|
+
SSIM_sum += _SSIM(images[i], images[j])
|
41
|
+
return SSIM_sum / (n * (n - 1) / 2)
|
42
|
+
|
43
|
+
|
44
|
+
# Similarity
|
45
|
+
_method_dict = {"MSE": MSE, "SSIM": SSIM}
|
46
|
+
|
47
|
+
|
48
|
+
def similarity(images, method):
|
49
|
+
return _method_dict[method](images)
|
50
|
+
|
51
|
+
|
52
|
+
__all__ = ["similarity"]
|
@@ -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.33",
|
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",
|
File without changes
|
File without changes
|
File without changes
|
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/Myosotis_Researches.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/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
|
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/__init__.py
RENAMED
File without changes
|
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/opts.py
RENAMED
File without changes
|
{myosotis_researches-0.1.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/old/train.py
RENAMED
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.31 → myosotis_researches-0.1.33}/myosotis_researches/CcGAN/utils/dataset.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
|