Skip to content

Commit

Permalink
add some logging messages since this step tends to take very long
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Aug 7, 2024
1 parent d9ea397 commit ddd837e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

import cyclopts
from loguru import logger
from umap import UMAP

from depiction.image.feature_selection import FeatureSelectionIQR, select_features
Expand Down Expand Up @@ -29,9 +30,11 @@ def compute_image_umap_coefs(
input_image_conc = MultiChannelImageConcatenation.read_hdf5(path=input_image_path, allow_individual=True)
input_image = input_image_conc.get_combined_image()
if enable_feature_selection:
logger.info(f"Feature selection requested: {feature_selection}")
input_image = select_features(feature_selection=feature_selection, image=input_image)

# compute the umap transformation into 2D
logger.info(f"Computing UMAP for input image with shape {input_image.dimensions}")
umap = UMAP(n_components=2, n_jobs=n_jobs, random_state=random_state)
values = umap.fit_transform(input_image.data_flat.values.T)

Expand Down

0 comments on commit ddd837e

Please sign in to comment.