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

Remove downscaling for perceptual hash #401

Open
Breakthrough opened this issue Jun 16, 2024 · 2 comments
Open

Remove downscaling for perceptual hash #401

Breakthrough opened this issue Jun 16, 2024 · 2 comments
Milestone

Comments

@Breakthrough
Copy link
Owner

The HashDetector already resizes the input to a specific size, so we should avoid downscaling the input for this particular detector. This might involve changing the SceneDetector interface so that detectors can choose if they want a pre-scaled version of the frame, or if they need to work with the original.

The perceptual hash detector is a bit of a special case, since it requires that the input be a square for the DCT. Right now the image is scaled twice, which is not ideal, especially if the downscaled version is smaller than the DCT size (since we're throwing away information).

This doesn't matter too much for accuracy since we apply a low-pass filter on the result, but it is something we should avoid doing for the pipeline.

@Breakthrough Breakthrough added this to the 0.6.5 milestone Jun 16, 2024
@Breakthrough
Copy link
Owner Author

It's probably best to just make downscaling a per-detector option, and allow SceneManager to automatically try to apply it if a global one was set.

@wjs018
Copy link
Collaborator

wjs018 commented Sep 5, 2024

make downscaling a per-detector option

This makes sense. It should be pretty easy to do on the python side, but will need more changes on the cli side to parse all those parameters.

@Breakthrough Breakthrough modified the milestones: 0.6.5, 0.6.6 Nov 20, 2024
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

No branches or pull requests

2 participants