joonmyung 1.5.1__tar.gz → 1.5.2__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.
- {joonmyung-1.5.1 → joonmyung-1.5.2}/PKG-INFO +1 -1
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/draw.py +17 -9
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung.egg-info/PKG-INFO +1 -1
- {joonmyung-1.5.1 → joonmyung-1.5.2}/setup.py +2 -3
- {joonmyung-1.5.1 → joonmyung-1.5.2}/LICENSE.txt +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/README.md +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/__init__.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/__init__.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/analysis.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/dataset.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/hook.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/metric.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/model.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/analysis/utils.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/app.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/data.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/dummy.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/file.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/gradcam.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/log.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/meta_data/__init__.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/meta_data/label.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/meta_data/utils.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/metric.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/script.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/status.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung/utils.py +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung.egg-info/SOURCES.txt +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung.egg-info/dependency_links.txt +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung.egg-info/not-zip-safe +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/joonmyung.egg-info/top_level.txt +0 -0
- {joonmyung-1.5.1 → joonmyung-1.5.2}/setup.cfg +0 -0
|
@@ -225,20 +225,27 @@ def saliency(attentions=None, gradients=None, head_fusion="mean",
|
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
def data2PIL(datas):
|
|
228
|
-
if type(datas) == torch.Tensor:
|
|
229
|
-
if
|
|
228
|
+
if type(datas) == torch.Tensor: # MAKE TO (..., H, W, 3)
|
|
229
|
+
if datas.shape[-1] == 3:
|
|
230
|
+
pils = datas
|
|
231
|
+
elif len(datas.shape) == 2:
|
|
230
232
|
pils = datas.unsqueeze(-1).detach().cpu()
|
|
231
|
-
|
|
233
|
+
elif len(datas.shape) == 3:
|
|
232
234
|
pils = datas.permute(1, 2, 0).detach().cpu()
|
|
233
235
|
elif len(datas.shape) == 4:
|
|
234
236
|
pils = datas.permute(0, 2, 3, 1).detach().cpu()
|
|
235
237
|
elif type(datas) == np.ndarray:
|
|
236
|
-
if len(datas.shape) ==
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
if len(datas.shape) == 2:
|
|
239
|
+
datas = np.expand_dims(datas, axis=-1)
|
|
240
|
+
# TODO NEED TO CHECK
|
|
241
|
+
# if datas.max() <= 1:
|
|
242
|
+
# pils = cv2.cvtColor(datas, cv2.COLOR_BGR2RGB) # 0.29ms
|
|
243
|
+
# else:
|
|
244
|
+
# pils = datas
|
|
245
|
+
|
|
246
|
+
# image = Image.fromarray(image) # 0.32ms
|
|
247
|
+
pils = cv2.cvtColor(datas, cv2.COLOR_BGR2RGB) # 0.29ms
|
|
248
|
+
|
|
242
249
|
elif type(datas) == PIL.JpegImagePlugin.JpegImageFile \
|
|
243
250
|
or type(datas) == PIL.Image.Image:
|
|
244
251
|
pils = datas
|
|
@@ -246,6 +253,7 @@ def data2PIL(datas):
|
|
|
246
253
|
raise ValueError
|
|
247
254
|
return pils
|
|
248
255
|
|
|
256
|
+
|
|
249
257
|
def drawImgPlot(datas:list, col=1, title:str=None, columns=None, showRows:list=None,
|
|
250
258
|
output_dir='./', save_name=None, show=True, fmt=1,
|
|
251
259
|
vis_x = False, vis_y = False, border=False, p=False):
|
|
@@ -3,7 +3,7 @@ from setuptools import find_packages
|
|
|
3
3
|
|
|
4
4
|
setuptools.setup(
|
|
5
5
|
name="joonmyung",
|
|
6
|
-
version="1.5.
|
|
6
|
+
version="1.5.2",
|
|
7
7
|
author="JoonMyung Choi",
|
|
8
8
|
author_email="pizard@korea.ac.kr",
|
|
9
9
|
description="JoonMyung's Library",
|
|
@@ -26,5 +26,4 @@ setuptools.setup(
|
|
|
26
26
|
# rm -rf ./*.egg-info ./dist/*
|
|
27
27
|
|
|
28
28
|
# python setup.py sdist; python -m twine upload dist/*
|
|
29
|
-
# ID:JoonmyungChoi
|
|
30
|
-
|
|
29
|
+
# ID:JoonmyungChoi
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|