-
Notifications
You must be signed in to change notification settings - Fork 380
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
App crash when using detect-threshold #122
Comments
At first glance this looks like a bug, however I noticed in your command you specified both Thank you for your submission, will triage/look into this further whenever I get some spare time! |
Adding both Again, I don't follow the documentation on how I'm to determine an optimum value for the threshold. Any tips would be appreciated. |
Hi @mrobe; To identify the exact threshold required, you can plot the values you obtain in the stats-file when running
That being said, your original command line argument list looks like it indeed does trigger a bug, so I will keep this open for eventually fixing that (or providing a more appropriate error message to the user). |
Hi @Breakthrough, I've looked at the stats file and I see the delta_rgb value, but I have no idea how am I supposed to do "manual analysis" as you suggest. Am I looking for an average of all these values? Minimum? Maximum? Etc. I could write a simple app (or probably use Excel) to do a summation of the values, but I need some tips on what I should do to compute the threshold argument. |
@mrobe unfortunately I have not been successful in such a development as of yet, which is why automatic threshold determination is still marked as a possible long term project goal on the features page. If you could do so with an algorithm that works on all input videos of all types, I would love to see what you come up with. I don't mean to sound discouraging, but that is a non-trivial problem that I would like a robust solution for that works on a wide variety of input test cases. If you would like to discuss this further, or have any solutions that you would like to propose, please feel free to post them here. The best I've seen so far was referenced here in #53, with a threshold of T = μ + ασ, where α = 5 (I was unable to get a response from the author on why the value of 5 for alpha was selected, nor was it suitable for all ad-hoc test cases I was doing). This also did not seem to work well with the output of This has also been suggested in #35 as a possible solution to the camera flash question, but again, no actual algorithm, design, or implementation has materialized as of yet in terms of automatic threshold determination. A solution for the camera flash question was proposed in this comment, but still requires manual adjustment by the end user for optimal performance on all input videos (it is still a significant improvement in detection accuracy, but does not directly deal with automatic parameter determination). Thank you. |
I'm running into the same issue
However, it seems like the problem is somehow related to loading the cached stats in this mode. If As expected, the stats file generated by each mode, for a given video file, are both generated fine and are identical. It looks like the same problem as the OP, but there are some different line numbers so posting the stack trace here for completeness:
|
Sorry this one seems to have slipped past my radar - do you know if this is still happening on v0.5.3? My apologies for the lack of progress on this one. Will make sure this makes it in for the next release. |
I can confirm that the same bug is observed in v0.5.3 when using |
This seems to be a very long standing issue due to how the actual detection logic was refactored to improve performance. Unfortunately, using a statsfile with This is because the average itself is not used for threshold calculations, but rather, summation of the amount of pixels that meet the target threshold based on the minimum pixel percentage. The performance issue will be fixed in #178. Pushing a fix to the v0.5.4 branch now. |
I may be doing this wrong, but when I add "detect-threshold" to the command line, I get the following error:
Command line:
scenedetect --input D-2019-2.mp4 --output D-2019-2 --stats D-stats.csv detect-content list-scenes save-images detect-threshold
Computing Environment:
Additional
I tried following the instructions here:
https://pyscenedetect.readthedocs.io/en/latest/examples/usage-example/#finding-optimal-thresholdsensitivity-value
But it seems like something is missing. How do I determine "an optimal value"? I.e., which file should I be looking at for this, and what am I supposed to look for in that file?
The text was updated successfully, but these errors were encountered: