visual-layer / fastdup

fastdup is a powerful free tool designed to rapidly extract valuable insights from your image & video datasets. Assisting you to increase your dataset images & labels quality and reduce your data operations costs at an unparalleled scale.
Other
1.56k stars 76 forks source link

[Bug / Feature request] Stats and outlier gallery sorting #145

Closed amirmk89 closed 1 year ago

amirmk89 commented 1 year ago

Sorting isn't functional for outliers (bug) and stats (feature request) galleries:

Outliers - ascending argument is unused, and not passed to inner function create_outliers_gallery.

Stats - no 'ascending' argument, determined internally, could be enhanced like this:

# adding ascending=None or ascending='auto' to arguments
# fastdup/fastdup_visualizer.py:277

auto_ascending = False
        name = metric
        if metric == 'dark':
            metric = 'mean'
            auto_ascending = True
        elif metric == 'bright':
            metric = 'mean'
            auto_ascending = False
        if metric == 'blur':
            auto_ascending = True
ascending =  auto_ascending if ascending is None else ascending

Would be great to have an option to override the default sorting for specific use cases (debugging, slicing a value).

Thanks!

dbickson commented 1 year ago

Now when external_df is given, sorting is not done by the gallery but performed by the user before the call to the gallery. I have fixed the sorting for the outliers, the sort_by column does not make sense and is removed for outliers. Fixed in v. 0.915