Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding eps_t parameter to temporal tools for full 3D IoU calculation #749

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

ramanakumars
Copy link
Collaborator

@ramanakumars ramanakumars commented Nov 6, 2023

Adding an eps_t which defines the temporal width of temporal shape tools, thereby constructing a fully 3D IoU. This metric uses the displayTime attribute which is a normalized time value for the video, so eps_t is essentially the fraction of the video that two shapes must overlap to be part of the same cluster.

Also updating the solver from scipy.optimize.shgo to scipy.optimize.direct. One main issue was that keeping locally_biased to True was causing poor convergence (particularly on the rectangle tool), but locally_biased=False is definitely much slower.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

./panoptes_aggregation/reducers/shape_metric_IoU.py:12: [F401] 'sys' imported...
./panoptes_aggregation/reducers/shape_metric_IoU.py:12: [F401] 'sys' imported but unused
./panoptes_aggregation/reducers/shape_reducer_dbscan.py:16: [F401] 'sys' impo...
./panoptes_aggregation/reducers/shape_reducer_dbscan.py:16: [F401] 'sys' imported but unused

@ramanakumars ramanakumars marked this pull request as ready for review November 7, 2023 18:33
Copy link
Collaborator

@CKrawczyk CKrawczyk left a comment

Choose a reason for hiding this comment

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

These changes all look good. The basic idea is to expand each 2D shape into a volume with a width of eps_t in the time direction and calculate the intersection over the union of the volumes. This will preserve the scale independence of this metric and lead to better results.

I have no issue with the optimizer being changed, as long as it is stable I don't care too much about the speed.

@CKrawczyk CKrawczyk merged commit 7a2b50f into zooniverse:master Nov 8, 2023
7 checks passed
@CKrawczyk CKrawczyk deleted the temporal_shape_fix branch November 8, 2023 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants