Myosotis-Researches 0.1.13__py3-none-any.whl → 0.1.15__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.
@@ -37,7 +37,7 @@
37
37
  {% for item in items %}
38
38
  <tr>
39
39
  <td>
40
- <img src="{{ item.image }}" alt="" style="width: 64px;">
40
+ <img src="{{ item.image }}" alt="" style="width: {{ img_size }}px;">
41
41
  </td>
42
42
  <td class="code">
43
43
  {{ item.image_name }}
@@ -17,7 +17,7 @@ def Image_to_Base64(image: Image):
17
17
  return f"data:image/png;base64,{img_base64}"
18
18
 
19
19
 
20
- def datasets_to_html(indexes, datasets_path, list_path, template_path):
20
+ def datasets_to_html(indexes, datasets_path, list_path, template_path, img_size):
21
21
 
22
22
  N = len(indexes)
23
23
 
@@ -27,11 +27,14 @@ def datasets_to_html(indexes, datasets_path, list_path, template_path):
27
27
 
28
28
  # Get data
29
29
  with h5py.File(datasets_path, "r") as f:
30
- images = f["images"][indexes]
30
+ images = f["images"][:]
31
31
  index_train = f["index_train"][:]
32
32
  index_valid = f["index_valid"][:]
33
- labels = f["labels"][indexes]
34
- types = f["types"][indexes]
33
+ labels = f["labels"][:]
34
+ types = f["types"][:]
35
+ images = images[indexes]
36
+ labels = labels[indexes]
37
+ types = types[indexes]
35
38
 
36
39
  # Get list
37
40
  df = pd.read_csv(list_path)
@@ -63,6 +66,7 @@ def datasets_to_html(indexes, datasets_path, list_path, template_path):
63
66
  list_path=list_path,
64
67
  template_path=template_path,
65
68
  items=items,
69
+ img_size=img_size,
66
70
  )
67
71
 
68
72
 
@@ -76,13 +80,16 @@ def visualize_datasets(
76
80
  host="127.0.0.1",
77
81
  port=8000,
78
82
  debug=True,
83
+ img_size=64,
79
84
  ):
80
85
  # Local server
81
86
  app = Flask(__name__)
82
87
 
83
88
  @app.route("/")
84
89
  def index():
85
- return datasets_to_html(indexes, datasets_path, list_path, template_path)
90
+ return datasets_to_html(
91
+ indexes, datasets_path, list_path, template_path, img_size
92
+ )
86
93
 
87
94
  @app.route("/style.css")
88
95
  def style():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Myosotis-Researches
3
- Version: 0.1.13
3
+ Version: 0.1.15
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
@@ -34,13 +34,13 @@ myosotis_researches/CcGAN/utils/opts.py,sha256=pd7-wknNPBO5hWRpO3YAPmmAsPKgZUUpK
34
34
  myosotis_researches/CcGAN/utils/print_hdf5.py,sha256=VvmNAWtMDmg6D9V6ZbSUXrQTKRh9WIJeC4BR_ORJkco,300
35
35
  myosotis_researches/CcGAN/utils/train.py,sha256=5ZXgkGesuInqUooJRpLej_KHqYQtlSDq90_5wig5elQ,5152
36
36
  myosotis_researches/CcGAN/visualize/__init__.py,sha256=RHfzFo7FgcJhZVQ9DkEIGELK-lQNC5X915kPH8XGSiM,85
37
- myosotis_researches/CcGAN/visualize/visualize_datasets.py,sha256=BtNQW75wDPHxr8JIVk-WaT28DeCAKvgdVbXWfohTzNc,2541
37
+ myosotis_researches/CcGAN/visualize/visualize_datasets.py,sha256=UJoRldde8c0wHuYnoEwE_xF5u8SPmUMHx_3VGI3wLWI,2694
38
38
  myosotis_researches/CcGAN/visualize/src/style.css,sha256=tn4ht9S6r0erf6zo5zfmOKPGjJ1TCLYBTI-YMbuDjFQ,661
39
39
  myosotis_researches/CcGAN/visualize/src/style.css.map,sha256=QUV9UJNpjbfsAYBpnWPzOzInHPFmepgKkAuK_G_a2Xk,257
40
40
  myosotis_researches/CcGAN/visualize/src/style.scss,sha256=tyMXl4ouQ1zuZ6JmSxFFJBVzaUgpC3eyhXsbVRcnD9A,593
41
- myosotis_researches/CcGAN/visualize/src/template.html,sha256=_U3t5DfyvN2gdtWt5ggIiSpbhOXumOL52H42Envb8o8,1655
42
- myosotis_researches-0.1.13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
43
- myosotis_researches-0.1.13.dist-info/METADATA,sha256=v8wjW1OCllmfolvhOIF077GbpmDLRi88knZHqGXpYeY,2664
44
- myosotis_researches-0.1.13.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
45
- myosotis_researches-0.1.13.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
46
- myosotis_researches-0.1.13.dist-info/RECORD,,
41
+ myosotis_researches/CcGAN/visualize/src/template.html,sha256=oTUekYjhLRrxXYh1LjiMu-DJH70XB_bUF9ZXwmQZbYo,1667
42
+ myosotis_researches-0.1.15.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
43
+ myosotis_researches-0.1.15.dist-info/METADATA,sha256=RCIUf78KUj7jFmiYleQmgouQ2WT4fmeG5BV3RP2rxTw,2664
44
+ myosotis_researches-0.1.15.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
45
+ myosotis_researches-0.1.15.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
46
+ myosotis_researches-0.1.15.dist-info/RECORD,,