INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]   Go Down

Author Topic: Black bar detection not updating tag correctly  (Read 3332 times)

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Black bar detection not updating tag correctly
« Reply #50 on: June 28, 2023, 05:14:31 pm »

here's one why I don't understand why it picked the wrong choice, it does say the score is low but not sure why

https://www.blu-ray.com/movies/American-Graffiti-Blu-ray/22698/

Code: [Select]
Score: 1
Result: 0x0x1920x1080 (1.78)

0x136x1920x948 (2.36), 46% (538 samples), first at 00:00:46
0x0x1920x1080 (1.78), 4% (48 samples), first at 00:14:04
2x136x1186x948 (1.46), 2% (22 samples), first at 00:42:10
674x432x1306x948 (1.22), 2% (21 samples), first at 01:24:24
0x136x1156x948 (1.42), 1% (17 samples), first at 00:42:16
672x432x1308x948 (1.23), 1% (16 samples), first at 01:24:25
0x136x1836x948 (2.26), 1% (15 samples), first at 00:28:11
456x304x1920x948 (2.27), 1% (15 samples), first at 00:28:08
0x136x1192x948 (1.47), 1% (15 samples), first at 00:42:13
610x428x1298x948 (1.32), 1% (15 samples), first at 01:24:19
2x136x1182x948 (1.45), 1% (15 samples), first at 00:42:11
672x436x1304x948 (1.23), 1% (15 samples), first at 01:24:23
2x196x1306x948 (1.73), 1% (14 samples), first at 00:28:09
600x424x1304x948 (1.34), 1% (14 samples), first at 01:24:21
534x136x1830x948 (1.6), 1% (13 samples), first at 00:56:15
0x196x1312x948 (1.74), 1% (13 samples), first at 00:28:10
604x424x1304x948 (1.34), 1% (13 samples), first at 01:24:21
444x300x1920x948 (2.28), 1% (12 samples), first at 00:28:07
464x304x1920x948 (2.26), 1% (12 samples), first at 00:28:09
610x424x1302x948 (1.32), 1% (11 samples), first at 01:24:20
560x136x1868x948 (1.61), 1% (11 samples), first at 00:56:13
0x136x1624x948 (2), 1% (9 samples), first at 00:42:15
412x304x1920x948 (2.34), 1% (9 samples), first at 00:28:08
616x420x1304x948 (1.3), 1% (9 samples), first at 01:24:23
610x428x1302x948 (1.33), 1% (9 samples), first at 01:24:22
2x136x1162x948 (1.43), 1% (8 samples), first at 00:42:10
672x436x1308x948 (1.24), 1% (8 samples), first at 01:24:25
2x136x1838x948 (2.26), 1% (8 samples), first at 00:28:12
252x136x964x948 (0.88), 1% (8 samples), first at 00:42:16
616x424x1304x948 (1.31), 1% (7 samples), first at 01:24:23
2x136x1834x948 (2.26), 1% (7 samples), first at 00:28:11
2x136x1174x948 (1.44), 1% (7 samples), first at 00:42:11
606x424x1302x948 (1.33), 1% (6 samples), first at 01:24:20
544x134x1840x946 (1.6), 1% (6 samples), first at 00:56:14
102x136x1190x948 (1.34), 1% (6 samples), first at 00:42:14
102x136x1182x948 (1.33), 1% (6 samples), first at 00:42:14
384x136x1920x948 (1.89), 1% (6 samples), first at 00:56:17
2x136x1178x948 (1.45), 0% (5 samples), first at 00:42:13
552x136x1920x948 (1.68), 0% (5 samples), first at 00:56:17
608x424x1300x948 (1.32), 0% (5 samples), first at 01:24:20
0x196x1304x948 (1.73), 0% (5 samples), first at 00:28:09
528x136x1836x948 (1.61), 0% (5 samples), first at 00:56:16
608x424x1304x948 (1.33), 0% (5 samples), first at 01:24:21
350x136x1186x948 (1.03), 0% (5 samples), first at 00:42:10
240x136x1096x948 (1.05), 0% (5 samples), first at 00:42:15
0x136x1840x948 (2.27), 0% (5 samples), first at 00:28:12
572x136x1920x948 (1.66), 0% (4 samples), first at 00:56:20
672x440x1304x948 (1.24), 0% (4 samples), first at 01:24:23
452x304x1920x948 (2.28), 0% (4 samples), first at 00:28:07
142x136x1834x948 (2.08), 0% (4 samples), first at 00:56:19
560x134x1872x946 (1.62), 0% (4 samples), first at 00:56:13
612x424x1304x948 (1.32), 0% (4 samples), first at 01:24:22
354x136x1186x948 (1.02), 0% (4 samples), first at 00:42:10
254x136x978x948 (0.89), 0% (4 samples), first at 00:42:17
606x428x1298x948 (1.33), 0% (4 samples), first at 01:24:19
0x136x1112x948 (1.37), 0% (4 samples), first at 00:42:10
676x436x1304x948 (1.23), 0% (3 samples), first at 01:24:24
550x136x1858x948 (1.61), 0% (3 samples), first at 00:56:16
168x136x1920x948 (2.16), 0% (3 samples), first at 00:14:07
560x134x1868x946 (1.61), 0% (3 samples), first at 00:56:13
548x134x1840x946 (1.59), 0% (3 samples), first at 00:56:14
544x134x1844x946 (1.6), 0% (3 samples), first at 00:56:14
0x196x1920x948 (2.55), 0% (3 samples), first at 00:28:09
564x136x1868x948 (1.61), 0% (3 samples), first at 00:56:13
610x424x1298x948 (1.31), 0% (3 samples), first at 01:24:20
394x136x1918x948 (1.88), 0% (3 samples), first at 00:56:18
394x134x1706x798 (1.98), 0% (3 samples), first at 00:56:17
0x196x1308x948 (1.74), 0% (3 samples), first at 00:28:10
576x136x1920x948 (1.66), 0% (3 samples), first at 00:56:20
12x136x1920x948 (2.35), 0% (3 samples), first at 00:14:08
2x136x1766x948 (2.17), 0% (3 samples), first at 00:28:11
2x136x1798x948 (2.21), 0% (3 samples), first at 00:28:12
380x136x1920x948 (1.9), 0% (3 samples), first at 00:56:17
448x136x1920x948 (1.81), 0% (2 samples), first at 00:56:18
476x304x1920x948 (2.24), 0% (2 samples), first at 00:28:07
320x136x1096x948 (0.96), 0% (2 samples), first at 00:42:15
562x134x1870x946 (1.61), 0% (2 samples), first at 00:56:13
550x136x1834x948 (1.58), 0% (2 samples), first at 00:56:15
296x136x1096x948 (0.99), 0% (2 samples), first at 00:42:15
548x136x1860x948 (1.62), 0% (2 samples), first at 00:56:16
548x136x1836x948 (1.59), 0% (2 samples), first at 00:56:15
674x436x1306x948 (1.23), 0% (2 samples), first at 01:24:24
420x136x1920x948 (1.85), 0% (2 samples), first at 00:56:18
670x436x1306x948 (1.24), 0% (2 samples), first at 01:24:25
542x134x1846x946 (1.61), 0% (2 samples), first at 00:56:14
32x136x1172x948 (1.4), 0% (2 samples), first at 00:42:12
532x134x1824x946 (1.59), 0% (2 samples), first at 00:56:15
4x136x1920x948 (2.36), 0% (2 samples), first at 00:14:08
612x428x1300x948 (1.32), 0% (2 samples), first at 01:24:19
612x424x1300x948 (1.31), 0% (2 samples), first at 01:24:19
2x196x1314x948 (1.74), 0% (2 samples), first at 00:28:11
360x136x1164x948 (0.99), 0% (2 samples), first at 00:42:17
360x136x1168x948 (1), 0% (2 samples), first at 00:42:17
360x136x1172x948 (1), 0% (2 samples), first at 00:42:17
2x136x1794x948 (2.21), 0% (2 samples), first at 00:28:12
254x136x974x948 (0.89), 0% (2 samples), first at 00:42:17
0x136x1176x948 (1.45), 0% (2 samples), first at 00:42:12
244x136x1096x948 (1.05), 0% (2 samples), first at 00:42:15
0x136x1168x948 (1.44), 0% (2 samples), first at 00:42:11
460x304x1920x948 (2.27), 0% (2 samples), first at 00:28:07

Its score is 1 because it's below 50%, and not a standard aspect ratio we recognize. At score 1 it does the old algorithm to union all detected rectangles. Although for the next build I had already tweaked the heuristic to go down to 40% before doing that, after reviewing some of my results.

The accurate AR of the result is 2.3645..., which is more then 0.01 away from the recognized 2.35. maybe the limit should be 0.015 instead to allow for rounding issues?
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Black bar detection not updating tag correctly
« Reply #51 on: June 28, 2023, 05:16:50 pm »

How common are dirty/elevated black bars, anyway? Did you have any where lower black level was a problem?
I think this is very rare tbh, it seems theoretically possible to handle it but I'm not sure there are enough films with this problem to be able to do any good testing
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Black bar detection not updating tag correctly
« Reply #52 on: June 28, 2023, 05:22:58 pm »

Its score 1 because its below 50% and not a standard aspect ratio we recognize. At score 1 it does the old algorithm to union all detected rectangles. Although for the next build I had already tweaked the heuristic to go down to 40% before doing that, after reviewing some of my results.

The accurate AR of the result is 2.3645..., which is more then 0.01 away from the recognized 2.35. maybe the limit should be 0.015 instead to allow for rounding issues?
perhaps it should discard anything with fewer than x (4?) samples? and/or it should aggregate those first?

e.g. I see 4x136x1920x948 is in there which I would think should be aggregated with 0x136x1920x948

just lowering the bar to 40% is simpler and probably works just as well mind you

I think VAR is a different problem as that is going to be a truly multi modal case as opposed to 1 mode + bunch of noise
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Black bar detection not updating tag correctly
« Reply #53 on: June 28, 2023, 05:23:58 pm »

* VAR is as big a pain here as it is in football :)

https://www.blu-ray.com/movies/Aquaman-Blu-ray/227124/ is a good example, my analysis happens to look at the 1st hour, yours is more comprehensive which means you detect the 2nd half of the film being IMAX whereas mine sees the scope part

https://www.reddit.com/r/movies/comments/21jqpc/hunger_games_catching_fire_bluray_slowly_changes/ is another one
https://www.blu-ray.com/movies/TRON-Legacy-Blu-ray/18434/
https://www.blu-ray.com/movies/Top-Gun-Maverick-4K-Blu-ray/317486/

would be nice to add a VAR flag and hence allow for a profile driven choice on how to react

Variable AR is not something we're really setup to track. I could check if there is two good matches and maybe indicate that, but that also only works if both are similarly common in the material, if there is only a much shorter period it would just discard it as a misdetection.
In the long term we might have runtime detection through JRVR, but the topic is a bit on hold in libplacebo because its a bit annoying.

But until such a time, I'm not sure how to deal with these, and might just ignore their existence. I'll check out some of the provided examples and see if there is a clean way to at least try to flag it, but it might not be reliable.

perhaps it should discard anything with fewer than x (4?) samples? and/or it should aggregate those first?

e.g. I see 4x136x1920x948 is in there which I would think should be aggregated with 0x136x1920x948

The next version already does some aggregation of differences <8 in all parts of the rectangle, which cuts down on such noise a lot and increases confidence. I wanted to use the round parameter for that, but I realized instead of leaving more of the image intact, it actually crops more, which is not the way I would like these to be unified, so I made my own aggregation.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Black bar detection not updating tag correctly
« Reply #54 on: June 28, 2023, 05:28:27 pm »

I would say this is very close to job done though, the report is very useful & the results look very accurate. Variable aspect ratio is the only meaningful scenario left that I can see not handled.

For reference, here's aquaman

Code: [Select]
Score: 3
Result: 0x0x3840x2160 (1.78)

0x0x3840x2160 (1.78), 63% (920 samples), first at 00:35:49
0x280x3840x1884 (2.39), 25% (368 samples), first at 00:17:55
0x276x3840x1884 (2.39), 13% (184 samples), first at 00:00:46

Hits <1% have been skipped due to a high accuracy score.

top gun maverick

Code: [Select]
Score: 2
Result: 0x276x3840x1884 (2.39)

0x276x3840x1884 (2.39), 44% (626 samples), first at 00:16:17
0x68x3840x2092 (1.9), 38% (543 samples), first at 01:21:21
780x554x3004x1578 (2.17), 13% (184 samples), first at 00:00:46
2x276x2834x1884 (1.76), 1% (16 samples), first at 00:32:37
2x278x2238x1398 (2), 1% (15 samples), first at 00:32:38
0x276x3768x1884 (2.34), 1% (8 samples), first at 00:32:34
2x276x3522x1884 (2.19), 0% (7 samples), first at 01:05:10
0x212x3840x2092 (2.04), 0% (4 samples), first at 01:53:53
0x276x3444x1884 (2.14), 0% (4 samples), first at 01:05:10
0x276x3620x1884 (2.25), 0% (2 samples), first at 00:32:34
0x244x3840x2092 (2.08), 0% (2 samples), first at 01:53:53
0x248x3840x2092 (2.08), 0% (2 samples), first at 01:53:53
0x276x3500x1884 (2.18), 0% (2 samples), first at 01:05:10

I think these are obviously 2 ARs so flagging that in some way via a field would be sufficient imo, e.g. secondary AR

one could then write a profile rule which picks the min or max as the actual AR and can choose to effectively zoom or not

though, in this case, automatic cropping would need to respect that choice also
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Black bar detection not updating tag correctly
« Reply #55 on: June 30, 2023, 02:05:32 am »

lots of 2 or 4px differences in the latest build, I don't think it produced any material changes at all on my library (though not sure it was intended to if it's just a small tweak)
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10944
Re: Black bar detection not updating tag correctly
« Reply #56 on: June 30, 2023, 02:47:11 am »

If anything it should have combined those slight variations into one rect and as a result improved the score. The actual result would likely not change substantially unless you had some very weird one before.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Black bar detection not updating tag correctly
« Reply #57 on: June 30, 2023, 02:56:24 am »

Right, no regression anyway as it all still seems sensible.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Black bar detection not updating tag correctly
« Reply #58 on: June 30, 2023, 08:36:11 am »

Logged
Pages: 1 [2]   Go Up