|
@@ -1,4 +1,6 @@
|
|
|
import numpy as np
|
|
|
+import logging
|
|
|
+
|
|
|
from contextlib import contextmanager
|
|
|
|
|
|
from cvdatasets.dataset.mixins.base import BaseMixin
|
|
@@ -19,7 +21,7 @@ class ImageProfilerMixin(BaseMixin):
|
|
|
def _profile_img(self, img, tag):
|
|
|
if len(img) == 0: return
|
|
|
if self._profile_img_enabled:
|
|
|
- print(f"[{tag:^30s}]",
|
|
|
+ logging.info(f"[{tag:^30s}]" + \
|
|
|
" | ".join([
|
|
|
f"size: {str(img.shape):>20s}",
|
|
|
f"pixel values: ({img.min():+8.2f}, {img.max():+8.2f})"
|