Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th September 2021, 22:55   #181  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by poisondeathray View Post
Can zopti help with selection on a per frame basis ?

eg. 4 versions of interpolate video, RIFE 2.4, 3.1, 3.4, 3.8 . On some frames maybe 2.4 "solves" it better, maybe 3.8 on others, you get the idea...

You can stackvertical/horizontal and manually choose with trim or remapframes, but can zopti help automatic this task ?
Almost.

Code:
 0         1         2         3	time (frames)
----------------------------------
[A ]      [B ]      [C ]      [D ]	original frames
[A ] [AB] [B ] [BC] [C ] [CD] [D ]	1) interpolate new frames (RIFE)
     [AB]      [BC]      [CD]  		2) remove original frames (SelectOdd)
     [AB] [BB] [BC] [CC] [CD]		3) interpolate new frames again (RIFE)
          [BB]      [CC]    		4) leave only latest interpolated frames (SelectOdd)
This is the basic structure for evaluating interpolated frames. In the end you can compare [BB] with [B] and [CC] with [C] etc. Let's say you calculate [AB], [BC] and [BB] with 4 different RIFE versions. You can now find out which one created the best match between [BB] and [B]. The only problem here is that [BB] was calculated from two interpolated frames [AB] and [BC], and [BC] will also have effect on the next frame [CC]. So if RIFE v1 was the best choice for [BB] and RIFE v2 was the best choice for [CC] then we don't know which one should be chosen for the interpolated frame [BC]. But it could be good enough to use the best choice from [BB] to select frame [AB] and the best of [CC] to select frame [BC] etc. Did I make any sense?

EDIT:
Now that I think about it, we could also use both [BB] vs [B] and [CC] vs [C] to select interpolated frame [BC]. The contribution of [BC] to [BB] and [CC] is 50% while [AB] and [CD] only contribute 25% each. Selecting the best RIFE version would be done with formula (assuming GMSD similarity metric) GMSD(BB, B) + GMSD(CC,C).

Last edited by zorr; 13th September 2021 at 23:06.
zorr is offline   Reply With Quote
Old 19th January 2022, 23:14   #182  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Zopti v1.2.1 released

Here's a new release, it contains the following goodies (including the .py support for Selur )
  • new option: retry
    -tries to run the script again this many times if execution fails
    -can be useful if the script uses plugins which are not 100% reliable and can crash
    -default value is zero (do not retry)
    -example: zopti script.avs -pop 24 -iters 10000 -retry 4
  • new visualization mode: line
    -draws a line chart of the best found result per all tested values of certain optimized parameter (given with option -param)
    -accepts parameter -range to limit the displayed values to certain range
    -black line shows the best values, blue line indicates the number of results per value
    -a red dot is displayed at the best found value (multiple dots possible if there are multiple values with the same best result)
    -example: zopti -mode evaluate -vismode line -param lambda -range 1000 5000 (displays the best result of lambda values between 1000 and 5000)
  • a shutdown hook will terminate all the running subprocesses if Zopti is aborted (for example with CTRL + C)
  • mode -validate also tests that the first result value (usually quality) is the same as before, gives a warning message if they differ
  • reading and parsing the log file with -autorefresh true is now MUCH faster by reading the file backwards and only adding the new results (previously up to several seconds, now < 1 ms)
  • scripts ending .py also correctly detected as VapourSynth scripts (previously only .vpy was detected)
  • support for custom output properties written by the script (only in VapourSynth scripts for now)
  • better support for displaying results from output files with different parameters (scripts can have different parameters and still be compared in the same chart)
  • option -continue now also supported by exhaustive algorithm (when using more than one thread)
  • order of runs in a visualization is now based on file name, not by modified date
  • all chart types now support the window size in option -shot (example: zopti -mode evaluate -shot 1200x800)
  • visualization mode seriespareto no longer contains the global pareto line
  • VapourSynth script output files will be interpreted even when VapourSynth reports failed execution (sometimes file still has complete data)
  • bugfix: using -alg mutation and threads < population size would stall progress after initial generation due to parameter queue being too small
  • bugfix: fixed a memory leak in XChart (at least partially)

Here's what -vismode line looks like:



Download link updated at first post.
zorr is offline   Reply With Quote
Old 1st February 2022, 23:36   #183  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Zopti v1.2.2 released

This release introduces a better way for Avisynth scripts to write the results (VS version doesn't need this change as it's already very reliable) and fixes a couple of bugs. I recommend the upgrade especially if you're using more than one thread, there was a rare but possible bug which could result in flawed results.
  • supports a new way for an Avisynth script to write the result file
    -first line is the number of frames (and also the number of actual result lines to be written), use for example WriteFileStart(resultFile, "FrameCount()")
    -then come the per frame result lines in any order, using the same format as before
    -do not write the last line which starts 'stop', it's no longer necessary and might cause trouble if used with the new way
    -this also means that calculating the sum of similarity metric or time is not needed, Zopti calculates those instead
    -old method still works as well, Zopti differentiates between them by looking at the first line (if it's a positive integer -> new way)
    -new way is safer as the last 'stop' line is no longer needed (it has the be the last line if used and that is hard to guarantee especially when the script is executed multithreaded)
  • bugfix: when using -threads > 1 it was possible for two threads to use the same result file which may have resulted in reporting invalid result for one thread or the same result for both threads
  • bugfix: -vismode line always drew the minimum result per parameter value even when the goal was to maximize the result value
Download link updated at first post.
zorr is offline   Reply With Quote
Old 5th March 2022, 21:30   #184  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Zopti v1.2.3 released

Zopti v1.2.3 is ready. This one has a new conversion feature to help importing Zopti data into other software. Also improvements to -vismode line and some other minor things. Details below:
Code:
  • new mode: convert -converts Zopti log file into other formats for easier importing into other software such as Excel or Google Docs -writes a new file and doesn't remove the original -does not overwrite an existing file (error message given in such situation) -supports sorting of the rows by result or parameter value using the option -sort, for example "-sort GMSD" sorts by GMSD -sort direction can be specified by adding a + or - after the field name, for example "-sort time-" sorts by time, descending -ascending direction (+) is the default if no + or - is given -multiple sort criterias supported, for example "-sort dct GMSD-" sorts by dct (ascending) and the rows with the same dct value by GMSD (descending) -output format: CSV -specified with -format csv or by not giving format option -target file name is the same as the original .log file but file ending changes from .log to .csv -csv file includes title row with the names of result values and optimized parameters -can be opened directly (for example) in Excel -uses the default decimal format of the OS with floating point values -output format: zopti -specified with -format zopti -keeps the original Zopti format and header rows, only sorts the results when option -sort is given -filename is "converted " + original file name -example: zopti -mode convert -format csv -sort dct time (sorts the latest log file by parameter dct and result time and writes a new file in csv format) -example: zopti -mode convert -log "./path/abc run-01.log" (converts file "./path/abc run-01.log" into a new csv file)
  • improvements to visualization mode: line -now supports option -types which controls which aggregate lines are displayed in the chart -valid values are "best", "worst", "average", "median", "count" and "samples" -best = best result per parameter value -worst = worst result per parameter value -average = average result per parameter value -median = median result per parameter value -count = number of samples per parameter value -samples = display all results as small dots -separate multiple values with space, for example "-types best average" -default value is "best count" which will display the best value per parameter value and the number of samples per parameter value -a legend is shown if more than one type is selected
  • display of option -groupby improved, pareto fronts can no longer be cut off the screen
  • option -continue also supported with mutation algorithm -but only for the generation of the initial random population -useful if you only want to test independent random samples with a large population
  • validation mode behavior change: it now validates all the results in the log file and not just the pareto front
zorr is offline   Reply With Quote
Old 29th April 2022, 10:23   #185  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Not sure if Zopti supports PSNR yet, but there's a plugin for that now https://github.com/AmusementClub/vs-ComparePlane
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.