Skip to content

Conversation

@dahhei
Copy link
Contributor

@dahhei dahhei commented Sep 2, 2025

Occasionally, there are cases where the user may want to filter their own gt annotations as well as the predictions. I have added logic that allows the user to do this. The filtering values will be the same for both gt and pred. The user has to specify these values to also help prevent a user from accidentally using this information.

Maybe in the future iteration I will also add an ethogram output that fully does not include the raw data.

Please test this feature request using another dataset! I have only managed to test it on Feeding behavior. Hopefully @michberger can find the time to review & test.

@dahhei dahhei self-assigned this Sep 2, 2025
@dahhei dahhei added the enhancement New feature or request label Sep 2, 2025
@dahhei dahhei changed the title Adding filters for gt data in compare-gt.py KLAUS-256: Adding filters for gt data in compare-gt.py Sep 2, 2025
Copy link

@michberger michberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well and is a very helpful tool for testing the performance of classifiers on the ground truth dataset. Only suggestion is that the filter and stitch values used be indicated on the output ethogram and bout performance figures for reference.

filter_scan,
iou_thresholds,
filter_ground_truth,
False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SkepticRaven, I'm curious about your opinion on permanently setting this to False. This is thefilter_ground_truth argument of the generate_iou_scan call.

It's used to switch on this call to filter_by_settings.

Which, for reference, is defined here.

Copy link
Contributor

@SkepticRaven SkepticRaven Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a machine learning perspective, we should avoid modifying the ground truth data. I'd prefer it wasn't a parameter at all. The reason this capability exists is just for practical reasons. While the user should go in and manually modify the ground truth data, it can get effort-expensive. Allowing the ground truth to be modify-able runs the risk of observing "improved" performance by removing shorter but difficult real events.

At least in this edit, the behavior appears to be generating an unfiltered and filtered version (edits below, L345).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does it make sense to remove the filter_ground_truth argument entirely?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should first look into what generate_filtered_iou_curve does differently. That new function appears to have high overlap with what that arg does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd make more sense for me to change this back to filter_ground_truth and modify my code to work with some of the older logic. In the current state, I rewrote the whole function without removing the older functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants