Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Is it possible to get the status update in JSON format? #140

Closed
velara3 opened this issue May 5, 2019 · 18 comments
Closed

Is it possible to get the status update in JSON format? #140

velara3 opened this issue May 5, 2019 · 18 comments

Comments

@velara3
Copy link

velara3 commented May 5, 2019

Is it possible to get the status update in JSON format?

Currently the output is:

[1/356] "frame_201.png
Iteration #1(1->32)...(19.9308[ms], 16.602[GFLOPS], 1.34507[GB/s])

@YukihoAA
Copy link
Collaborator

YukihoAA commented May 5, 2019

No, never considered.

Why do you want that information?? you can see quick summary at the end of application..

or may be you want silent option? --slient ?

@DeadSix27
Copy link
Owner

He probably wants to parse it with another program to get progress bars 'n stuff, would be my guess.

You could just use regex, there isn't much variation in the messages, shouldn't be too hard.

@velara3
Copy link
Author

velara3 commented May 5, 2019

@DeadSix27 Correct. For progress bar. I'm using RegEx now but it has some issues:

For all output from directory I'm parsing for, "[1/300] 'image.png'" in the standard out,

 var imageMatch = line.replace(/(\[)(\d+)\/(\d+)(\])(.*)/,"$2/$3/$5");

But when converting a single image there is no image status.

In JSON it would be an object like this:

{
  index:1,
  total: 300,
  name:"image.png",
  block: 1
  totalBlocks: 8,
  stage: "scaling", 
  iteration: [ {index: 1, total:9, ..}]
}

For a single image there is no [1/1] image.png output but an empty string. I attempted to guess if the iterations or start block are progress info:

start process block (0,0)
start process block (3,0)
start process block (0,1)

What are the values (1,2) and they start over? Are they out of order if using more than one thread?

@DeadSix27
Copy link
Owner

DeadSix27 commented May 5, 2019

I'll see about adding [1/1] for now, the json part requires more work.

Is this better?:

Silent mode:

click to expand log
K:\w2x\waifu2x-converter-cpp\out\Release>waifu2x-converter-cpp.exe -i 7KMAtWE.jpg -s
CUDA: GeForce RTX 2060
Working on file #1/1 "7KMAtWE.jpg": Done. Took: 2.86194s total, file: 2.86194s avg: 2.86194s
process successfully done! (all:2.91814[sec], 1 [files processed], 0 [files errored], 2003.02[GFLOPS], filter:1.80191[sec], 3243.83[GFLOPS])

Verbose mode:

click to expand log

K:\w2x\waifu2x-converter-cpp\out\Release>waifu2x-converter-cpp.exe -i 7KMAtWE.jpg
CUDA: GeForce RTX 2060
Working on file #1/1 "7KMAtWE.jpg":
start process block (1/3,1/4) ...
Iteration #1(3->32)...(1.984[ms], 228.319[GFLOPS], 18.4981[GB/s])
Iteration #2(32->32)...(2.6779[ms], 1804.34[GFLOPS], 25.0603[GB/s])
Iteration #3(32->64)...(4.4317[ms], 2180.58[GFLOPS], 22.7144[GB/s])
Iteration #4(64->64)...(7.3524[ms], 2628.71[GFLOPS], 18.255[GB/s])
Iteration #5(64->128)...(14.9[ms], 2594.28[GFLOPS], 13.5119[GB/s])
Iteration #6(128->128)...(29.6102[ms], 2610.9[GFLOPS], 9.06564[GB/s])
Iteration #7(128->3)...(3.9939[ms], 453.677[GFLOPS], 34.3933[GB/s])
total : 0.082833[sec], 1835.64[GFLOPS]
start process block (2/3,1/4) ...
Iteration #1(3->32)...(1.899[ms], 238.539[GFLOPS], 19.326[GB/s])
Iteration #2(32->32)...(3.3518[ms], 1441.57[GFLOPS], 20.0217[GB/s])
Iteration #3(32->64)...(4.1881[ms], 2307.41[GFLOPS], 24.0356[GB/s])
Iteration #4(64->64)...(8.5547[ms], 2259.27[GFLOPS], 15.6894[GB/s])
Iteration #5(64->128)...(15.1613[ms], 2549.56[GFLOPS], 13.279[GB/s])
Iteration #6(128->128)...(29.8787[ms], 2587.44[GFLOPS], 8.98417[GB/s])
Iteration #7(128->3)...(3.1216[ms], 580.452[GFLOPS], 44.0042[GB/s])
total : 0.0850701[sec], 1787.37[GFLOPS]
start process block (3/3,1/4) ...
Iteration #1(3->32)...(1.2188[ms], 127.76[GFLOPS], 10.3509[GB/s])
Iteration #2(32->32)...(1.3692[ms], 1213.08[GFLOPS], 16.8483[GB/s])
Iteration #3(32->64)...(1.769[ms], 1877.83[GFLOPS], 19.5608[GB/s])
Iteration #4(64->64)...(2.9088[ms], 2284.03[GFLOPS], 15.8613[GB/s])
Iteration #5(64->128)...(5.8571[ms], 2268.62[GFLOPS], 11.8157[GB/s])
Iteration #6(128->128)...(11.5344[ms], 2303.99[GFLOPS], 7.99996[GB/s])
Iteration #7(128->3)...(1.5836[ms], 393.315[GFLOPS], 29.8173[GB/s])
total : 0.0451983[sec], 1156.41[GFLOPS]
start process block (1/3,2/4) ...
Iteration #1(3->32)...(2.2726[ms], 199.324[GFLOPS], 16.149[GB/s])
Iteration #2(32->32)...(2.7769[ms], 1740.01[GFLOPS], 24.1668[GB/s])
Iteration #3(32->64)...(3.9422[ms], 2451.34[GFLOPS], 25.5348[GB/s])
Iteration #4(64->64)...(7.3174[ms], 2641.29[GFLOPS], 18.3423[GB/s])
Iteration #5(64->128)...(14.6411[ms], 2640.15[GFLOPS], 13.7508[GB/s])
Iteration #6(128->128)...(28.325[ms], 2729.37[GFLOPS], 9.47698[GB/s])
Iteration #7(128->3)...(2.9833[ms], 607.361[GFLOPS], 46.0441[GB/s])
total : 0.080737[sec], 1883.3[GFLOPS]
start process block (2/3,2/4) ...
Iteration #1(3->32)...(1.8614[ms], 243.357[GFLOPS], 19.7164[GB/s])
Iteration #2(32->32)...(2.735[ms], 1766.67[GFLOPS], 24.5371[GB/s])
Iteration #3(32->64)...(4.1784[ms], 2312.77[GFLOPS], 24.0913[GB/s])
Iteration #4(64->64)...(7.1404[ms], 2706.76[GFLOPS], 18.7969[GB/s])
Iteration #5(64->128)...(14.8338[ms], 2605.85[GFLOPS], 13.5722[GB/s])
Iteration #6(128->128)...(29.1609[ms], 2651.13[GFLOPS], 9.20532[GB/s])
Iteration #7(128->3)...(3.1078[ms], 583.03[GFLOPS], 44.1996[GB/s])
total : 0.082971[sec], 1832.59[GFLOPS]
start process block (3/3,2/4) ...
Iteration #1(3->32)...(1.1197[ms], 139.067[GFLOPS], 11.267[GB/s])
Iteration #2(32->32)...(1.3958[ms], 1189.96[GFLOPS], 16.5272[GB/s])
Iteration #3(32->64)...(1.9332[ms], 1718.34[GFLOPS], 17.8993[GB/s])
Iteration #4(64->64)...(2.9174[ms], 2277.29[GFLOPS], 15.8145[GB/s])
Iteration #5(64->128)...(5.3509[ms], 2483.24[GFLOPS], 12.9335[GB/s])
Iteration #6(128->128)...(10.5348[ms], 2522.6[GFLOPS], 8.75904[GB/s])
Iteration #7(128->3)...(2.0068[ms], 310.372[GFLOPS], 23.5293[GB/s])
total : 0.0444052[sec], 1177.07[GFLOPS]
start process block (1/3,3/4) ...
Iteration #1(3->32)...(1.9218[ms], 235.709[GFLOPS], 19.0968[GB/s])
Iteration #2(32->32)...(2.7819[ms], 1736.88[GFLOPS], 24.1234[GB/s])
Iteration #3(32->64)...(4.2867[ms], 2254.34[GFLOPS], 23.4827[GB/s])
Iteration #4(64->64)...(7.6391[ms], 2530.06[GFLOPS], 17.5698[GB/s])
Iteration #5(64->128)...(13.5784[ms], 2846.78[GFLOPS], 14.827[GB/s])
Iteration #6(128->128)...(27.5672[ms], 2804.4[GFLOPS], 9.73749[GB/s])
Iteration #7(128->3)...(4.0897[ms], 443.049[GFLOPS], 33.5877[GB/s])
total : 0.082605[sec], 1840.71[GFLOPS]
start process block (2/3,3/4) ...
Iteration #1(3->32)...(1.7691[ms], 256.054[GFLOPS], 20.7451[GB/s])
Iteration #2(32->32)...(2.7692[ms], 1744.85[GFLOPS], 24.234[GB/s])
Iteration #3(32->64)...(3.9378[ms], 2454.08[GFLOPS], 25.5633[GB/s])
Iteration #4(64->64)...(7.1653[ms], 2697.35[GFLOPS], 18.7316[GB/s])
Iteration #5(64->128)...(14.1689[ms], 2728.14[GFLOPS], 14.209[GB/s])
Iteration #6(128->128)...(26.1217[ms], 2959.59[GFLOPS], 10.2763[GB/s])
Iteration #7(128->3)...(3.0158[ms], 600.815[GFLOPS], 45.5479[GB/s])
total : 0.0790126[sec], 1924.4[GFLOPS]
start process block (3/3,3/4) ...
Iteration #1(3->32)...(1.0687[ms], 145.704[GFLOPS], 11.8047[GB/s])
Iteration #2(32->32)...(1.4877[ms], 1116.45[GFLOPS], 15.5063[GB/s])
Iteration #3(32->64)...(1.7686[ms], 1878.26[GFLOPS], 19.5652[GB/s])
Iteration #4(64->64)...(2.9338[ms], 2264.56[GFLOPS], 15.7261[GB/s])
Iteration #5(64->128)...(5.9569[ms], 2230.62[GFLOPS], 11.6178[GB/s])
Iteration #6(128->128)...(10.5635[ms], 2515.75[GFLOPS], 8.73524[GB/s])
Iteration #7(128->3)...(1.5828[ms], 393.514[GFLOPS], 29.8324[GB/s])
total : 0.0450604[sec], 1159.95[GFLOPS]
start process block (1/3,4/4) ...
Iteration #1(3->32)...(1.0234[ms], 135.728[GFLOPS], 10.9964[GB/s])
Iteration #2(32->32)...(1.854[ms], 799.157[GFLOPS], 11.0994[GB/s])
Iteration #3(32->64)...(2.182[ms], 1358.05[GFLOPS], 14.1464[GB/s])
Iteration #4(64->64)...(3.3217[ms], 1784.19[GFLOPS], 12.3902[GB/s])
Iteration #5(64->128)...(6.812[ms], 1740.03[GFLOPS], 9.06267[GB/s])
Iteration #6(128->128)...(12.1395[ms], 1952.82[GFLOPS], 6.78061[GB/s])
Iteration #7(128->3)...(1.5132[ms], 367.178[GFLOPS], 27.8359[GB/s])
total : 0.0483327[sec], 964.674[GFLOPS]
start process block (2/3,4/4) ...
Iteration #1(3->32)...(1.1176[ms], 124.287[GFLOPS], 10.0696[GB/s])
Iteration #2(32->32)...(1.7071[ms], 867.927[GFLOPS], 12.0545[GB/s])
Iteration #3(32->64)...(2.1013[ms], 1410.21[GFLOPS], 14.6897[GB/s])
Iteration #4(64->64)...(3.2302[ms], 1834.73[GFLOPS], 12.7412[GB/s])
Iteration #5(64->128)...(5.8887[ms], 2012.86[GFLOPS], 10.4836[GB/s])
Iteration #6(128->128)...(11.9945[ms], 1976.42[GFLOPS], 6.86258[GB/s])
Iteration #7(128->3)...(1.4385[ms], 386.246[GFLOPS], 29.2813[GB/s])
total : 0.0480106[sec], 971.146[GFLOPS]
start process block (3/3,4/4) ...
Iteration #1(3->32)...(0.907[ms], 52.644[GFLOPS], 4.26514[GB/s])
Iteration #2(32->32)...(1.0951[ms], 465.084[GFLOPS], 6.45949[GB/s])
Iteration #3(32->64)...(1.0969[ms], 928.641[GFLOPS], 9.67334[GB/s])
Iteration #4(64->64)...(1.5111[ms], 1348.19[GFLOPS], 9.36244[GB/s])
Iteration #5(64->128)...(2.5226[ms], 1615.2[GFLOPS], 8.4125[GB/s])
Iteration #6(128->128)...(6.8508[ms], 1189.5[GFLOPS], 4.1302[GB/s])
Iteration #7(128->3)...(1.503[ms], 127.074[GFLOPS], 9.63351[GB/s])
total : 0.0352981[sec], 454.06[GFLOPS]
start scaling
#1 2x scaling...
start process block (1/5,1/7) ...
Iteration #1(3->32)...(1.8427[ms], 245.827[GFLOPS], 19.9165[GB/s])
Iteration #2(32->32)...(2.6484[ms], 1824.44[GFLOPS], 25.3394[GB/s])
Iteration #3(32->64)...(3.7823[ms], 2554.97[GFLOPS], 26.6143[GB/s])
Iteration #4(64->64)...(7.2579[ms], 2662.94[GFLOPS], 18.4926[GB/s])
Iteration #5(64->128)...(14.4993[ms], 2665.97[GFLOPS], 13.8853[GB/s])
Iteration #6(128->128)...(26.6153[ms], 2904.7[GFLOPS], 10.0858[GB/s])
Iteration #7(128->3)...(2.9788[ms], 608.278[GFLOPS], 46.1137[GB/s])
total : 0.0783851[sec], 1939.81[GFLOPS]
start process block (2/5,1/7) ...
Iteration #1(3->32)...(1.8504[ms], 244.804[GFLOPS], 19.8336[GB/s])
Iteration #2(32->32)...(2.8771[ms], 1679.41[GFLOPS], 23.3252[GB/s])
Iteration #3(32->64)...(3.764[ms], 2567.4[GFLOPS], 26.7437[GB/s])
Iteration #4(64->64)...(7.682[ms], 2515.93[GFLOPS], 17.4717[GB/s])
Iteration #5(64->128)...(13.6314[ms], 2835.71[GFLOPS], 14.7693[GB/s])
Iteration #6(128->128)...(27.325[ms], 2829.26[GFLOPS], 9.8238[GB/s])
Iteration #7(128->3)...(2.9691[ms], 610.266[GFLOPS], 46.2643[GB/s])
total : 0.0792504[sec], 1918.63[GFLOPS]
start process block (3/5,1/7) ...
Iteration #1(3->32)...(1.9737[ms], 229.51[GFLOPS], 18.5946[GB/s])
Iteration #2(32->32)...(2.8079[ms], 1720.8[GFLOPS], 23.9[GB/s])
Iteration #3(32->64)...(3.8857[ms], 2486.98[GFLOPS], 25.9061[GB/s])
Iteration #4(64->64)...(8.0133[ms], 2411.91[GFLOPS], 16.7494[GB/s])
Iteration #5(64->128)...(14.0078[ms], 2759.51[GFLOPS], 14.3725[GB/s])
Iteration #6(128->128)...(27.9118[ms], 2769.78[GFLOPS], 9.61727[GB/s])
Iteration #7(128->3)...(3.0159[ms], 600.796[GFLOPS], 45.5464[GB/s])
total : 0.0809681[sec], 1877.92[GFLOPS]
start process block (4/5,1/7) ...
Iteration #1(3->32)...(1.8903[ms], 239.636[GFLOPS], 19.415[GB/s])
Iteration #2(32->32)...(2.7482[ms], 1758.18[GFLOPS], 24.4192[GB/s])
Iteration #3(32->64)...(3.982[ms], 2426.84[GFLOPS], 25.2796[GB/s])
Iteration #4(64->64)...(6.8499[ms], 2821.55[GFLOPS], 19.5941[GB/s])
Iteration #5(64->128)...(13.7354[ms], 2814.24[GFLOPS], 14.6575[GB/s])
Iteration #6(128->128)...(27.3871[ms], 2822.84[GFLOPS], 9.80153[GB/s])
Iteration #7(128->3)...(2.9724[ms], 609.588[GFLOPS], 46.213[GB/s])
total : 0.0807189[sec], 1883.72[GFLOPS]
start process block (5/5,1/7) ...
Iteration #1(3->32)...(1.36[ms], 219.883[GFLOPS], 17.8146[GB/s])
Iteration #2(32->32)...(2.0619[ms], 1547[GFLOPS], 21.4862[GB/s])
Iteration #3(32->64)...(3.5178[ms], 1813.5[GFLOPS], 18.8906[GB/s])
Iteration #4(64->64)...(4.7436[ms], 2689.74[GFLOPS], 18.6788[GB/s])
Iteration #5(64->128)...(9.7701[ms], 2611.86[GFLOPS], 13.6034[GB/s])
Iteration #6(128->128)...(18.1683[ms], 2809.08[GFLOPS], 9.75377[GB/s])
Iteration #7(128->3)...(2.4739[ms], 483.513[GFLOPS], 36.6552[GB/s])
total : 0.0621218[sec], 1615.83[GFLOPS]
start process block (1/5,2/7) ...
Iteration #1(3->32)...(1.8083[ms], 250.503[GFLOPS], 20.2954[GB/s])
Iteration #2(32->32)...(2.6095[ms], 1851.63[GFLOPS], 25.7171[GB/s])
Iteration #3(32->64)...(4.6655[ms], 2071.31[GFLOPS], 21.5761[GB/s])
Iteration #4(64->64)...(7.0199[ms], 2753.22[GFLOPS], 19.1196[GB/s])
Iteration #5(64->128)...(12.8852[ms], 2999.93[GFLOPS], 15.6246[GB/s])
Iteration #6(128->128)...(26.2599[ms], 2944.01[GFLOPS], 10.2223[GB/s])
Iteration #7(128->3)...(2.8415[ms], 637.67[GFLOPS], 48.3419[GB/s])
total : 0.0782503[sec], 1943.15[GFLOPS]
start process block (2/5,2/7) ...
Iteration #1(3->32)...(1.8869[ms], 240.068[GFLOPS], 19.45[GB/s])
Iteration #2(32->32)...(2.5442[ms], 1899.16[GFLOPS], 26.3772[GB/s])
Iteration #3(32->64)...(3.9554[ms], 2443.16[GFLOPS], 25.4496[GB/s])
Iteration #4(64->64)...(7.0662[ms], 2735.18[GFLOPS], 18.9943[GB/s])
Iteration #5(64->128)...(12.6244[ms], 3061.9[GFLOPS], 15.9474[GB/s])
Iteration #6(128->128)...(25.5344[ms], 3027.66[GFLOPS], 10.5127[GB/s])
Iteration #7(128->3)...(2.9049[ms], 623.753[GFLOPS], 47.2868[GB/s])
total : 0.0773773[sec], 1965.07[GFLOPS]
start process block (3/5,2/7) ...
Iteration #1(3->32)...(1.6937[ms], 267.453[GFLOPS], 21.6686[GB/s])
Iteration #2(32->32)...(2.6471[ms], 1825.33[GFLOPS], 25.3518[GB/s])
Iteration #3(32->64)...(3.7345[ms], 2587.68[GFLOPS], 26.955[GB/s])
Iteration #4(64->64)...(6.5184[ms], 2965.05[GFLOPS], 20.5906[GB/s])
Iteration #5(64->128)...(12.5493[ms], 3080.23[GFLOPS], 16.0429[GB/s])
Iteration #6(128->128)...(25.1496[ms], 3073.98[GFLOPS], 10.6735[GB/s])
Iteration #7(128->3)...(2.7777[ms], 652.316[GFLOPS], 49.4522[GB/s])
total : 0.0770795[sec], 1972.66[GFLOPS]
start process block (4/5,2/7) ...
Iteration #1(3->32)...(1.8398[ms], 246.214[GFLOPS], 19.9479[GB/s])
Iteration #2(32->32)...(2.4514[ms], 1971.05[GFLOPS], 27.3757[GB/s])
Iteration #3(32->64)...(3.6792[ms], 2626.57[GFLOPS], 27.3601[GB/s])
Iteration #4(64->64)...(6.4297[ms], 3005.95[GFLOPS], 20.8746[GB/s])
Iteration #5(64->128)...(12.0794[ms], 3200.05[GFLOPS], 16.6669[GB/s])
Iteration #6(128->128)...(25.2443[ms], 3062.45[GFLOPS], 10.6335[GB/s])
Iteration #7(128->3)...(2.839[ms], 638.232[GFLOPS], 48.3845[GB/s])
total : 0.0746007[sec], 2038.21[GFLOPS]
start process block (5/5,2/7) ...
Iteration #1(3->32)...(1.3217[ms], 226.255[GFLOPS], 18.3308[GB/s])
Iteration #2(32->32)...(2.018[ms], 1580.66[GFLOPS], 21.9536[GB/s])
Iteration #3(32->64)...(2.5155[ms], 2536.09[GFLOPS], 26.4176[GB/s])
Iteration #4(64->64)...(4.6165[ms], 2763.8[GFLOPS], 19.193[GB/s])
Iteration #5(64->128)...(10.146[ms], 2515.09[GFLOPS], 13.0994[GB/s])
Iteration #6(128->128)...(17.5337[ms], 2910.75[GFLOPS], 10.1068[GB/s])
Iteration #7(128->3)...(2.2093[ms], 541.422[GFLOPS], 41.0453[GB/s])
total : 0.0605129[sec], 1658.79[GFLOPS]
start process block (1/5,3/7) ...
Iteration #1(3->32)...(1.8623[ms], 243.239[GFLOPS], 19.7069[GB/s])
Iteration #2(32->32)...(2.4178[ms], 1998.44[GFLOPS], 27.7562[GB/s])
Iteration #3(32->64)...(3.5853[ms], 2695.36[GFLOPS], 28.0767[GB/s])
Iteration #4(64->64)...(6.5549[ms], 2948.54[GFLOPS], 20.4759[GB/s])
Iteration #5(64->128)...(12.9987[ms], 2973.74[GFLOPS], 15.4882[GB/s])
Iteration #6(128->128)...(25.2516[ms], 3061.56[GFLOPS], 10.6304[GB/s])
Iteration #7(128->3)...(2.6968[ms], 671.885[GFLOPS], 50.9357[GB/s])
total : 0.0759949[sec], 2000.82[GFLOPS]
start process block (2/5,3/7) ...
Iteration #1(3->32)...(1.7115[ms], 264.671[GFLOPS], 21.4433[GB/s])
Iteration #2(32->32)...(2.3671[ms], 2041.25[GFLOPS], 28.3507[GB/s])
Iteration #3(32->64)...(3.497[ms], 2763.42[GFLOPS], 28.7856[GB/s])
Iteration #4(64->64)...(6.8623[ms], 2816.45[GFLOPS], 19.5587[GB/s])
Iteration #5(64->128)...(13.5388[ms], 2855.11[GFLOPS], 14.8703[GB/s])
Iteration #6(128->128)...(25.7167[ms], 3006.19[GFLOPS], 10.4382[GB/s])
Iteration #7(128->3)...(2.6614[ms], 680.822[GFLOPS], 51.6132[GB/s])
total : 0.0775811[sec], 1959.91[GFLOPS]
start process block (3/5,3/7) ...
Iteration #1(3->32)...(1.6999[ms], 266.477[GFLOPS], 21.5896[GB/s])
Iteration #2(32->32)...(2.4003[ms], 2013.01[GFLOPS], 27.9585[GB/s])
Iteration #3(32->64)...(3.5099[ms], 2753.26[GFLOPS], 28.6798[GB/s])
Iteration #4(64->64)...(6.1943[ms], 3120.18[GFLOPS], 21.6679[GB/s])
Iteration #5(64->128)...(12.4169[ms], 3113.07[GFLOPS], 16.2139[GB/s])
Iteration #6(128->128)...(23.7891[ms], 3249.78[GFLOPS], 11.284[GB/s])
Iteration #7(128->3)...(2.7507[ms], 658.719[GFLOPS], 49.9376[GB/s])
total : 0.0728292[sec], 2087.79[GFLOPS]
start process block (4/5,3/7) ...
Iteration #1(3->32)...(1.6264[ms], 278.52[GFLOPS], 22.5653[GB/s])
Iteration #2(32->32)...(2.6454[ms], 1826.51[GFLOPS], 25.3681[GB/s])
Iteration #3(32->64)...(3.4069[ms], 2836.5[GFLOPS], 29.5469[GB/s])
Iteration #4(64->64)...(6.8601[ms], 2817.36[GFLOPS], 19.565[GB/s])
Iteration #5(64->128)...(12.0937[ms], 3196.27[GFLOPS], 16.6472[GB/s])
Iteration #6(128->128)...(23.1801[ms], 3335.16[GFLOPS], 11.5804[GB/s])
Iteration #7(128->3)...(2.9999[ms], 604[GFLOPS], 45.7893[GB/s])
total : 0.0719537[sec], 2113.19[GFLOPS]
start process block (5/5,3/7) ...
Iteration #1(3->32)...(1.3319[ms], 224.522[GFLOPS], 18.1904[GB/s])
Iteration #2(32->32)...(1.7203[ms], 1854.19[GFLOPS], 25.7527[GB/s])
Iteration #3(32->64)...(2.5688[ms], 2483.47[GFLOPS], 25.8695[GB/s])
Iteration #4(64->64)...(4.3351[ms], 2943.2[GFLOPS], 20.4389[GB/s])
Iteration #5(64->128)...(9.0131[ms], 2831.23[GFLOPS], 14.746[GB/s])
Iteration #6(128->128)...(16.1898[ms], 3152.37[GFLOPS], 10.9457[GB/s])
Iteration #7(128->3)...(1.9252[ms], 621.319[GFLOPS], 47.1023[GB/s])
total : 0.0564268[sec], 1778.91[GFLOPS]
start process block (1/5,4/7) ...
Iteration #1(3->32)...(1.7111[ms], 264.733[GFLOPS], 21.4483[GB/s])
Iteration #2(32->32)...(2.453[ms], 1969.77[GFLOPS], 27.3579[GB/s])
Iteration #3(32->64)...(3.441[ms], 2808.39[GFLOPS], 29.2541[GB/s])
Iteration #4(64->64)...(6.1952[ms], 3119.73[GFLOPS], 21.6648[GB/s])
Iteration #5(64->128)...(12.1013[ms], 3194.26[GFLOPS], 16.6368[GB/s])
Iteration #6(128->128)...(22.8923[ms], 3377.09[GFLOPS], 11.726[GB/s])
Iteration #7(128->3)...(2.6608[ms], 680.975[GFLOPS], 51.6249[GB/s])
total : 0.0702943[sec], 2163.08[GFLOPS]
start process block (2/5,4/7) ...
Iteration #1(3->32)...(1.6997[ms], 266.509[GFLOPS], 21.5921[GB/s])
Iteration #2(32->32)...(2.6093[ms], 1851.78[GFLOPS], 25.7191[GB/s])
Iteration #3(32->64)...(3.3874[ms], 2852.83[GFLOPS], 29.717[GB/s])
Iteration #4(64->64)...(6.9397[ms], 2785.04[GFLOPS], 19.3406[GB/s])
Iteration #5(64->128)...(12.2732[ms], 3149.52[GFLOPS], 16.4038[GB/s])
Iteration #6(128->128)...(22.9235[ms], 3372.5[GFLOPS], 11.7101[GB/s])
Iteration #7(128->3)...(2.6877[ms], 674.16[GFLOPS], 51.1082[GB/s])
total : 0.0726215[sec], 2093.76[GFLOPS]
start process block (3/5,4/7) ...
Iteration #1(3->32)...(1.9456[ms], 232.825[GFLOPS], 18.8632[GB/s])
Iteration #2(32->32)...(2.3386[ms], 2066.12[GFLOPS], 28.6962[GB/s])
Iteration #3(32->64)...(3.3817[ms], 2857.64[GFLOPS], 29.7671[GB/s])
Iteration #4(64->64)...(6.0275[ms], 3206.53[GFLOPS], 22.2676[GB/s])
Iteration #5(64->128)...(11.4927[ms], 3363.41[GFLOPS], 17.5178[GB/s])
Iteration #6(128->128)...(24.3936[ms], 3169.25[GFLOPS], 11.0043[GB/s])
Iteration #7(128->3)...(2.6394[ms], 686.497[GFLOPS], 52.0434[GB/s])
total : 0.0725379[sec], 2096.17[GFLOPS]
start process block (4/5,4/7) ...
Iteration #1(3->32)...(1.6854[ms], 268.77[GFLOPS], 21.7753[GB/s])
Iteration #2(32->32)...(2.3413[ms], 2063.74[GFLOPS], 28.6631[GB/s])
Iteration #3(32->64)...(4.0078[ms], 2411.22[GFLOPS], 25.1168[GB/s])
Iteration #4(64->64)...(6.157[ms], 3139.09[GFLOPS], 21.7992[GB/s])
Iteration #5(64->128)...(12.5737[ms], 3074.25[GFLOPS], 16.0117[GB/s])
Iteration #6(128->128)...(22.9459[ms], 3369.2[GFLOPS], 11.6986[GB/s])
Iteration #7(128->3)...(2.728[ms], 664.201[GFLOPS], 50.3532[GB/s])
total : 0.0715231[sec], 2125.91[GFLOPS]
start process block (5/5,4/7) ...
Iteration #1(3->32)...(1.317[ms], 227.062[GFLOPS], 18.3962[GB/s])
Iteration #2(32->32)...(1.9679[ms], 1620.9[GFLOPS], 22.5125[GB/s])
Iteration #3(32->64)...(2.6344[ms], 2421.63[GFLOPS], 25.2253[GB/s])
Iteration #4(64->64)...(4.6267[ms], 2757.7[GFLOPS], 19.1507[GB/s])
Iteration #5(64->128)...(7.9488[ms], 3210.31[GFLOPS], 16.7204[GB/s])
Iteration #6(128->128)...(16.5253[ms], 3088.37[GFLOPS], 10.7235[GB/s])
Iteration #7(128->3)...(2.1426[ms], 558.276[GFLOPS], 42.323[GB/s])
total : 0.0570061[sec], 1760.83[GFLOPS]
start process block (1/5,5/7) ...
Iteration #1(3->32)...(1.6404[ms], 276.143[GFLOPS], 22.3727[GB/s])
Iteration #2(32->32)...(2.2217[ms], 2174.84[GFLOPS], 30.2061[GB/s])
Iteration #3(32->64)...(3.5663[ms], 2709.72[GFLOPS], 28.2263[GB/s])
Iteration #4(64->64)...(6.1531[ms], 3141.08[GFLOPS], 21.813[GB/s])
Iteration #5(64->128)...(11.2886[ms], 3424.22[GFLOPS], 17.8345[GB/s])
Iteration #6(128->128)...(23.3202[ms], 3315.13[GFLOPS], 11.5109[GB/s])
Iteration #7(128->3)...(2.6003[ms], 696.819[GFLOPS], 52.826[GB/s])
total : 0.0714266[sec], 2128.79[GFLOPS]
start process block (2/5,5/7) ...
Iteration #1(3->32)...(1.7614[ms], 257.173[GFLOPS], 20.8358[GB/s])
Iteration #2(32->32)...(2.3923[ms], 2019.75[GFLOPS], 28.052[GB/s])
Iteration #3(32->64)...(3.2436[ms], 2979.31[GFLOPS], 31.0344[GB/s])
Iteration #4(64->64)...(6.0244[ms], 3208.18[GFLOPS], 22.279[GB/s])
Iteration #5(64->128)...(11.7034[ms], 3302.86[GFLOPS], 17.2024[GB/s])
Iteration #6(128->128)...(22.0384[ms], 3507.94[GFLOPS], 12.1804[GB/s])
Iteration #7(128->3)...(2.6617[ms], 680.745[GFLOPS], 51.6074[GB/s])
total : 0.069482[sec], 2188.36[GFLOPS]
start process block (3/5,5/7) ...
Iteration #1(3->32)...(1.7706[ms], 255.837[GFLOPS], 20.7275[GB/s])
Iteration #2(32->32)...(2.4364[ms], 1983.19[GFLOPS], 27.5443[GB/s])
Iteration #3(32->64)...(3.2245[ms], 2996.95[GFLOPS], 31.2183[GB/s])
Iteration #4(64->64)...(6.7262[ms], 2873.44[GFLOPS], 19.9545[GB/s])
Iteration #5(64->128)...(11.3092[ms], 3417.99[GFLOPS], 17.802[GB/s])
Iteration #6(128->128)...(23.0494[ms], 3354.07[GFLOPS], 11.6461[GB/s])
Iteration #7(128->3)...(2.5503[ms], 710.481[GFLOPS], 53.8617[GB/s])
total : 0.0718582[sec], 2116[GFLOPS]
start process block (4/5,5/7) ...
Iteration #1(3->32)...(1.7203[ms], 263.317[GFLOPS], 21.3336[GB/s])
Iteration #2(32->32)...(2.3404[ms], 2064.54[GFLOPS], 28.6741[GB/s])
Iteration #3(32->64)...(3.3379[ms], 2895.14[GFLOPS], 30.1577[GB/s])
Iteration #4(64->64)...(5.7638[ms], 3353.23[GFLOPS], 23.2863[GB/s])
Iteration #5(64->128)...(11.0421[ms], 3500.67[GFLOPS], 18.2326[GB/s])
Iteration #6(128->128)...(22.5854[ms], 3422.98[GFLOPS], 11.8854[GB/s])
Iteration #7(128->3)...(2.5218[ms], 718.51[GFLOPS], 54.4704[GB/s])
total : 0.0700499[sec], 2170.62[GFLOPS]
start process block (5/5,5/7) ...
Iteration #1(3->32)...(1.2316[ms], 242.807[GFLOPS], 19.6718[GB/s])
Iteration #2(32->32)...(1.7823[ms], 1789.69[GFLOPS], 24.8568[GB/s])
Iteration #3(32->64)...(2.3455[ms], 2719.9[GFLOPS], 28.3323[GB/s])
Iteration #4(64->64)...(5.089[ms], 2507.19[GFLOPS], 17.411[GB/s])
Iteration #5(64->128)...(7.5962[ms], 3359.33[GFLOPS], 17.4965[GB/s])
Iteration #6(128->128)...(15.9738[ms], 3195[GFLOPS], 11.0938[GB/s])
Iteration #7(128->3)...(2.0818[ms], 574.581[GFLOPS], 43.5591[GB/s])
total : 0.0549619[sec], 1826.32[GFLOPS]
start process block (1/5,6/7) ...
Iteration #1(3->32)...(1.6027[ms], 282.639[GFLOPS], 22.899[GB/s])
Iteration #2(32->32)...(2.5414[ms], 1901.25[GFLOPS], 26.4063[GB/s])
Iteration #3(32->64)...(3.3858[ms], 2854.18[GFLOPS], 29.731[GB/s])
Iteration #4(64->64)...(6.0729[ms], 3182.56[GFLOPS], 22.1011[GB/s])
Iteration #5(64->128)...(10.913[ms], 3542.08[GFLOPS], 18.4483[GB/s])
Iteration #6(128->128)...(22.6224[ms], 3417.38[GFLOPS], 11.8659[GB/s])
Iteration #7(128->3)...(2.5227[ms], 718.254[GFLOPS], 54.451[GB/s])
total : 0.0698826[sec], 2175.82[GFLOPS]
start process block (2/5,6/7) ...
Iteration #1(3->32)...(1.6807[ms], 269.522[GFLOPS], 21.8362[GB/s])
Iteration #2(32->32)...(2.9737[ms], 1624.86[GFLOPS], 22.5675[GB/s])
Iteration #3(32->64)...(3.2881[ms], 2938.98[GFLOPS], 30.6144[GB/s])
Iteration #4(64->64)...(6.1091[ms], 3163.7[GFLOPS], 21.9701[GB/s])
Iteration #5(64->128)...(11.8105[ms], 3272.91[GFLOPS], 17.0464[GB/s])
Iteration #6(128->128)...(21.7835[ms], 3548.99[GFLOPS], 12.3229[GB/s])
Iteration #7(128->3)...(2.555[ms], 709.174[GFLOPS], 53.7626[GB/s])
total : 0.0699283[sec], 2174.4[GFLOPS]
start process block (3/5,6/7) ...
Iteration #1(3->32)...(1.6784[ms], 269.891[GFLOPS], 21.8662[GB/s])
Iteration #2(32->32)...(3.3403[ms], 1446.53[GFLOPS], 20.0907[GB/s])
Iteration #3(32->64)...(3.2775[ms], 2948.49[GFLOPS], 30.7134[GB/s])
Iteration #4(64->64)...(5.7844[ms], 3341.29[GFLOPS], 23.2034[GB/s])
Iteration #5(64->128)...(10.9486[ms], 3530.56[GFLOPS], 18.3883[GB/s])
Iteration #6(128->128)...(22.0281[ms], 3509.58[GFLOPS], 12.186[GB/s])
Iteration #7(128->3)...(2.4872[ms], 728.506[GFLOPS], 55.2282[GB/s])
total : 0.0686085[sec], 2216.23[GFLOPS]
start process block (4/5,6/7) ...
Iteration #1(3->32)...(1.618[ms], 279.966[GFLOPS], 22.6824[GB/s])
Iteration #2(32->32)...(2.3567[ms], 2050.26[GFLOPS], 28.4758[GB/s])
Iteration #3(32->64)...(3.2815[ms], 2944.9[GFLOPS], 30.676[GB/s])
Iteration #4(64->64)...(5.8746[ms], 3289.99[GFLOPS], 22.8471[GB/s])
Iteration #5(64->128)...(11.6604[ms], 3315.04[GFLOPS], 17.2658[GB/s])
Iteration #6(128->128)...(21.2099[ms], 3644.97[GFLOPS], 12.6561[GB/s])
Iteration #7(128->3)...(2.6728[ms], 677.918[GFLOPS], 51.3931[GB/s])
total : 0.0688848[sec], 2207.34[GFLOPS]
start process block (5/5,6/7) ...
Iteration #1(3->32)...(1.3129[ms], 227.771[GFLOPS], 18.4537[GB/s])
Iteration #2(32->32)...(1.8593[ms], 1715.57[GFLOPS], 23.8274[GB/s])
Iteration #3(32->64)...(2.5298[ms], 2521.76[GFLOPS], 26.2683[GB/s])
Iteration #4(64->64)...(4.3815[ms], 2912.03[GFLOPS], 20.2225[GB/s])
Iteration #5(64->128)...(7.9901[ms], 3193.72[GFLOPS], 16.634[GB/s])
Iteration #6(128->128)...(15.0517[ms], 3390.73[GFLOPS], 11.7734[GB/s])
Iteration #7(128->3)...(1.8881[ms], 633.527[GFLOPS], 48.0278[GB/s])
total : 0.0543722[sec], 1846.13[GFLOPS]
start process block (1/5,7/7) ...
Iteration #1(3->32)...(1.2083[ms], 219.665[GFLOPS], 17.7969[GB/s])
Iteration #2(32->32)...(1.6174[ms], 1750.44[GFLOPS], 24.3116[GB/s])
Iteration #3(32->64)...(2.0714[ms], 2733.57[GFLOPS], 28.4747[GB/s])
Iteration #4(64->64)...(4.3349[ms], 2612.43[GFLOPS], 18.1419[GB/s])
Iteration #5(64->128)...(6.7819[ms], 3339.66[GFLOPS], 17.3941[GB/s])
Iteration #6(128->128)...(13.8457[ms], 3271.66[GFLOPS], 11.3599[GB/s])
Iteration #7(128->3)...(2.5232[ms], 420.769[GFLOPS], 31.8985[GB/s])
total : 0.05189[sec], 1716.96[GFLOPS]
start process block (2/5,7/7) ...
Iteration #1(3->32)...(1.1519[ms], 230.42[GFLOPS], 18.6683[GB/s])
Iteration #2(32->32)...(1.5382[ms], 1840.56[GFLOPS], 25.5634[GB/s])
Iteration #3(32->64)...(2.4101[ms], 2349.41[GFLOPS], 24.473[GB/s])
Iteration #4(64->64)...(3.6864[ms], 3072[GFLOPS], 21.3333[GB/s])
Iteration #5(64->128)...(7.5943[ms], 2982.4[GFLOPS], 15.5333[GB/s])
Iteration #6(128->128)...(13.7528[ms], 3293.76[GFLOPS], 11.4367[GB/s])
Iteration #7(128->3)...(1.8131[ms], 585.562[GFLOPS], 44.3916[GB/s])
total : 0.0507845[sec], 1754.33[GFLOPS]
start process block (3/5,7/7) ...
Iteration #1(3->32)...(1.1149[ms], 238.067[GFLOPS], 19.2878[GB/s])
Iteration #2(32->32)...(1.6625[ms], 1702.95[GFLOPS], 23.6521[GB/s])
Iteration #3(32->64)...(2.2427[ms], 2524.77[GFLOPS], 26.2997[GB/s])
Iteration #4(64->64)...(3.6728[ms], 3083.38[GFLOPS], 21.4123[GB/s])
Iteration #5(64->128)...(6.7517[ms], 3354.6[GFLOPS], 17.4719[GB/s])
Iteration #6(128->128)...(13.6581[ms], 3316.6[GFLOPS], 11.516[GB/s])
Iteration #7(128->3)...(2.0562[ms], 516.333[GFLOPS], 39.1433[GB/s])
total : 0.0511938[sec], 1740.31[GFLOPS]
start process block (4/5,7/7) ...
Iteration #1(3->32)...(1.2135[ms], 218.723[GFLOPS], 17.7206[GB/s])
Iteration #2(32->32)...(1.6689[ms], 1696.42[GFLOPS], 23.5614[GB/s])
Iteration #3(32->64)...(2.1912[ms], 2584.11[GFLOPS], 26.9179[GB/s])
Iteration #4(64->64)...(4.5958[ms], 2464.12[GFLOPS], 17.112[GB/s])
Iteration #5(64->128)...(6.6725[ms], 3394.42[GFLOPS], 17.6793[GB/s])
Iteration #6(128->128)...(13.1064[ms], 3456.21[GFLOPS], 12.0007[GB/s])
Iteration #7(128->3)...(2.5934[ms], 409.379[GFLOPS], 31.0351[GB/s])
total : 0.0516319[sec], 1725.54[GFLOPS]
start process block (5/5,7/7) ...
Iteration #1(3->32)...(1.0298[ms], 170.149[GFLOPS], 13.7852[GB/s])
Iteration #2(32->32)...(1.7338[ms], 1077.98[GFLOPS], 14.972[GB/s])
Iteration #3(32->64)...(1.8345[ms], 2037.62[GFLOPS], 21.2252[GB/s])
Iteration #4(64->64)...(2.8847[ms], 2591.61[GFLOPS], 17.9973[GB/s])
Iteration #5(64->128)...(4.7651[ms], 3137.82[GFLOPS], 16.3428[GB/s])
Iteration #6(128->128)...(9.5851[ms], 3119.85[GFLOPS], 10.8328[GB/s])
Iteration #7(128->3)...(2.1046[ms], 333.021[GFLOPS], 25.2464[GB/s])
total : 0.0449913[sec], 1307.26[GFLOPS]
Done. Took: 4.30298s total, file: 4.30298s avg: 4.30298s
process successfully done! (all:4.35907[sec], 1 [files processed], 0 [files errored], 1340.9[GFLOPS], filter:2.1953[sec], 2662.55[GFLOPS])

@velara3
Copy link
Author

velara3 commented May 6, 2019

@DeadSix27 I sort of found a way to get the progress.

     // not all code
     var array:Array = value.split("\n");

     for(var index:int = 0; index < array.length; index++) {
        var line:String = array[index];

        if (line.indexOf("start scaling")) {
           inScalingSection = true;
        }

        if (line && line.indexOf("start process block")!=-1) {
           stepMatch = line.replace(/(start process block \()(.+)(\).*)/,"$2");
           steps = stepMatch.split(",");
           
           if (steps.length>1) {
              step = steps[0];
              block = steps[1];

              step = step + (block * 9);
              totalSteps = 64; //(8x8?)

              if (inScalingSection) {
                 step *= 2;
                 totalSteps *= 2;
              }

              hasInfo = true;
           }
        }
      }

I like, "Working on file #1/1 "7KMAtWE.jpg" but
I would keep the same format you have for directories, [1/1] "image_name.png", so that existing regex do not have to be rewritten.

I would also keep the same format for start process block for now, start process block (0,0).

start process block (0,0) ...
Iteration #1(3->32)...(64.739[ms], 6.99709[GFLOPS], 0.566894[GB/s])
Iteration #2(32->32)...(87.2869[ms], 55.3558[GFLOPS], 0.76883[GB/s])
Iteration #3(32->64)...(134.4[ms], 71.9023[GFLOPS], 0.748982[GB/s])
Iteration #4(64->64)...(196.78[ms], 98.2181[GFLOPS], 0.68207[GB/s])
Iteration #5(64->128)...(478.533[ms], 80.7775[GFLOPS], 0.420716[GB/s])
Iteration #6(128->128)...(930.426[ms], 83.0903[GFLOPS], 0.288508[GB/s])
Iteration #7(128->3)...(52.5041[ms], 34.5105[GFLOPS], 2.61624[GB/s])
total : 1.94871[sec], 78.0271[GFLOPS]
start process block (1,0) ...
Iteration #1(3->32)...(6.21319[ms], 72.907[GFLOPS], 5.90682[GB/s])
Iteration #2(32->32)...(48.7142[ms], 99.1875[GFLOPS], 1.3776[GB/s])
Iteration #3(32->64)...(105.258[ms], 91.8094[GFLOPS], 0.956348[GB/s])
Iteration #4(64->64)...(180.152[ms], 107.284[GFLOPS], 0.745025[GB/s])
Iteration #5(64->128)...(325.688[ms], 118.686[GFLOPS], 0.618158[GB/s])
Iteration #6(128->128)...(654.163[ms], 118.181[GFLOPS], 0.410349[GB/s])
Iteration #7(128->3)...(50.7381[ms], 35.7116[GFLOPS], 2.7073[GB/s])
total : 1.37112[sec], 110.896[GFLOPS]
start process block (2,0) ...

The reason I was seeing different numbers was that I was parsing the statement, start process block (n,n) and it would iterate (1,0), (2,0), (3,0) etc but then it would reset to (0,0) again. I didn't know why but I found out that that was the scaling step. So it's working now if I account for it.

start scaling
#1 2x scaling...
start process block (0,0) <-- value reset

I'll wait for a JSON solution. But if there was a property that had the step you were on (increment it in the loop) that would show the progress.

start process block (0,0) ...
progress (0/128) ...
Iteration #1(3->32)...(64.739[ms], 6.99709[GFLOPS], 0.566894[GB/s])
Iteration #2(32->32)...(87.2869[ms], 55.3558[GFLOPS], 0.76883[GB/s])
Iteration #3(32->64)...(134.4[ms], 71.9023[GFLOPS], 0.748982[GB/s])
Iteration #4(64->64)...(196.78[ms], 98.2181[GFLOPS], 0.68207[GB/s])
Iteration #5(64->128)...(478.533[ms], 80.7775[GFLOPS], 0.420716[GB/s])
Iteration #6(128->128)...(930.426[ms], 83.0903[GFLOPS], 0.288508[GB/s])
Iteration #7(128->3)...(52.5041[ms], 34.5105[GFLOPS], 2.61624[GB/s])
total : 1.94871[sec], 78.0271[GFLOPS]
start process block (1,0) ...
progress (1/128) ...
Iteration #1(3->32)...(6.21319[ms], 72.907[GFLOPS], 5.90682[GB/s])

I'm not interested in the iteration information personally.

@DeadSix27
Copy link
Owner

I changed way more than that, see #141

Overall its focused on viewability, rather than parseability.

but the (x/y,x/y) imo is easier to parse so..
Takes only a few min to change the regex for it...

But I'll be looking into a JSON format, shouldn't be too hard now that i use printf universally.

@velara3
Copy link
Author

velara3 commented May 6, 2019

I updated my previous comment (last previous comment). What do those values mean (xy,xy)? In my comment update I mention that those values reset at the scaling stage. Does the (xy,xy) update change that? Also, thanks, I'll check out the changes in #141.

@DeadSix27
Copy link
Owner

Its: (current_column/total_columns, current_row/total_rows)

The reason it goes to 0 again, is because of the filter and scale process.. first it filters, e.g 0/4,0/4
until it reaches 4/4,4/4
then a message appears saying it now scales 2x
then it scales, e.g 0/9,0/9
till 9/9..

@DeadSix27
Copy link
Owner

DeadSix27 commented May 6, 2019

PS, Maybe this demonstrates it better:

click to expand
K:\w2x\waifu2x-converter-cpp\out\Release>waifu2x-converter-cpp.exe -i 7KMAtWE.jpg
CUDA: GeForce RTX 2060
Processing file [1/1] "7KMAtWE.jpg":
start process block (1/3,1/4) ...
start process block (2/3,1/4) ...
start process block (3/3,1/4) ...
start process block (1/3,2/4) ...
start process block (2/3,2/4) ...
start process block (3/3,2/4) ...
start process block (1/3,3/4) ...
start process block (2/3,3/4) ...
start process block (3/3,3/4) ...
start process block (1/3,4/4) ...
start process block (2/3,4/4) ...
start process block (3/3,4/4) ...
start scaling
#1 2x scaling...
start process block (1/5,1/7) ...
start process block (2/5,1/7) ...
start process block (3/5,1/7) ...
start process block (4/5,1/7) ...
start process block (5/5,1/7) ...
start process block (1/5,2/7) ...
start process block (2/5,2/7) ...
start process block (3/5,2/7) ...
start process block (4/5,2/7) ...
start process block (5/5,2/7) ...
start process block (1/5,3/7) ...
start process block (2/5,3/7) ...
start process block (3/5,3/7) ...
start process block (4/5,3/7) ...
start process block (5/5,3/7) ...
start process block (1/5,4/7) ...
start process block (2/5,4/7) ...
start process block (3/5,4/7) ...
start process block (4/5,4/7) ...
start process block (5/5,4/7) ...
start process block (1/5,5/7) ...
start process block (2/5,5/7) ...
start process block (3/5,5/7) ...
start process block (4/5,5/7) ...
start process block (5/5,5/7) ...
start process block (1/5,6/7) ...
start process block (2/5,6/7) ...
start process block (3/5,6/7) ...
start process block (4/5,6/7) ...
start process block (5/5,6/7) ...
start process block (1/5,7/7) ...
start process block (2/5,7/7) ...
start process block (3/5,7/7) ...
start process block (4/5,7/7) ...
start process block (5/5,7/7) ...
Done, took: 3.128s total, file: 3.128s avg: 3.128s
Finished processing 1 files
Took: 3.182secs total, filter: 1.889secs; 0 files skipped, 0 files errored. [GFLOPS: 1837.08, GFLOPS-Filter: 3093.76]

K:\w2x\waifu2x-converter-cpp\out\Release>

As you can see, it goes from 1/3,/14 to 3/3,4/4 for the filter process

then it switches to the scale process, announced via: start scaling\n#1 2x scaling...
And begins at (1/5,1/7), till it reaches (5/5,7/7)

That said, I should look into making it show that it's filtering first and also the amount of 2x scales it does if you have a higher scale_factor

EDIT 2: it goes column by column, then row by row.

@velara3
Copy link
Author

velara3 commented May 18, 2019

Is it always the same amount of columns and rows? If it is different depending on scale values is it possible to get the scale values and columns and rows counts up front?

@DeadSix27
Copy link
Owner

You get the total rows and columns once the process starts
start process block (1/3,1/4) ...
so in a progress bar you can set the Value to 1 and the Total to 3, i dont see where the problem is.. before anything happens the value is 0, so the total might as well be 1.. as it doesn't matter until we get the first data

@DeadSix27
Copy link
Owner

That said, there is also this change: #147

Step 02/03, 2x Scaling:
.....
Step 03/03, 2x Scaling:
.....

So a progress bar layout could look like this:
image

@YukihoAA
Copy link
Collaborator

I don't think print to JSON is essential feature and there is more cons then pros.

formating to JSON will slow down may be 0.3 times more than now, it is not big issue on single image but on converting big image or many images in row.. it will be big thing.
and.. end-user cannot read JSON thing, JSON is much easier to program is but this project's cui is front-end also, so JSON print is good idea but should not slow down progress.
if you want to make your own project based on this cui, please use string stream to handle output with regex. (which is i do in same way) or using w2x lib directly.

I suggests making some basic message block (but not a json, much simple way) for programs that uses w2x lib (include our cui).

something like this:

now:

cui: call w2x lib to work
w2x lib: converts, prints logs.

maybe:

cui: call w2x lib and handle logs.
w2x lib: converts, pass log message block to front-end program.

  • message block means, like TCP protocol Packet, formated, packed, expendable message block to make w2xlib more back-end.
    so w2x lib will not handle log anymore in this case, only log message block send to front-end, front-end can handle it but also not if is doesn't needed.

we can use pipelining and network technique to implement messaging feature.

@velara3
Copy link
Author

velara3 commented May 23, 2019

I don't think print to JSON is essential feature and there is more cons then pros.

What if we put it behind a flag? I'm not saying to use JSON by default because it may break other applications expecting the same format.

If a flag is set then then return JSON.

JSON:

 --message-type json

Results:

{ block: 0, totalBlocks: 9, iteration: 3, ms: 64.739, gbs: .505038 }

If you are worried about speed that's OK maybe people use it for single images.

Or you can build a JSON string by hand.

For example, you can create a JSON string easily without using JSON utilities:

var output = "{block:" + block + ", totalBlocks:"+totalBlocks+",iteration:"+iteration+",ms:"+ms+"}";

But then again, if you are putting it behind a command line argument and it is not on by default then the user can say, I will accept 1 millisecond to get JSON format. :)

@YukihoAA
Copy link
Collaborator

YukihoAA commented May 23, 2019

you mean only JSON for Iteration part? It is not required many time but.. it is only needed for special case.. and nothing changed i think.. and.. regex need 1 single line to read it without JSON too. does it changes something?? fully JSON parsed so like pack one images result in single JSON is not you meant? only single line of output??

as our print is seperated in many function so we need to combine it to single logging function to build it to one JSON Object. but if only Iteration part, it takes 1 min to implement it. as you said. is it what you need?

@YukihoAA
Copy link
Collaborator

YukihoAA commented May 23, 2019

as @DeadSix27 wants to implement logging feature for who use w2x lib, so I suggest messaging and it can be used in JSON thing. use messaging between w2x lib and front-end program and make JSON on front-end based on standard messaging protocol. it won't be slow down anything and also, you can make JSON in front-end.

제목 없음

I mean, No JSON fucntion in w2x lib, and implement in front-end is better and faster.

This can make w2x lib more library.

@velara3
Copy link
Author

velara3 commented May 23, 2019

you mean only JSON for Iteration part? It is not required many time but.. it is only needed for special case.. and nothing changed i think.. and.. regex need 1 single line to read it without JSON too. does it changes something?? fully JSON parsed so like pack one images result in single JSON is not you meant? only single line of output??

as our print is seperated in many function so we need to combine it to single logging function to build it to one JSON Object. but if only Iteration part, it takes 1 min to implement it. as you said. is it what you need?

I have a front end and want to show progress of current image and if processing multiple then overall progress.

"{ index: 10, total: 1000, imageProgressPercent:50 }"

I suggest using JSON because it is easy to add new properties. If you update a string with more or less info then you have to update your RegEx. If you update a JSON it is a new property your software can safely ignore.

I don't follow the diagram but I think @DeadSix27 understands what I'm suggesting.

@YukihoAA
Copy link
Collaborator

YukihoAA commented May 23, 2019

umm what i mean is waifu2x-converter-cpp 's CUI is "front-end" program.
and there is w2x lib for our back-end.
printing JSON is more like back-end function not front-end function.
so i think we dont need to add json in CUI because CUI is front-end.
but if deadsix27 wants, no problem.

anyway it is not subject what i'm saying.
I suggest messaging function in w2x lib to support someone makes front-end like you.

like Win32API


struct packet{
int message;
int body_legth;
char *body;
}


Define of W2X_CONV_ITERATION packet::

  • MSG ID: W2X_CONV_ITERATION
    | Iteration | inputPlanes | outputPlanes | time_spent | gflops | gbps |
    .....4byte............4byte....................4byte...............4byte..........4byte....4byte

struct packet recived;
JSONObject obj;

swtich(recived.message)
{
case: W2X_CONV_ITERATION:
int offset = 0;

obj.add("iteration", read_int(recived, &offset));
obj.add("inputPlanes", read_int(recived, &offset));
obj.add("outputPlanes", read_int(recived, &offset));
obj.add("time_spent", read_float(recived, &offset));
obj.add("gflops", read_float(recived, &offset));
obj.add("gbps", read_float(recived, &offset));
break;

case: W2X_CONV_START_PROCESS_BLOCK:
int offset = 0;

obj.add("row", read_int(recived, &offset));
obj.add("col", read_int(recived, &offset));

.
.
.

}


somthing like this. example is in case with JSON making.

but it is hard too. if we can print json in easy way it will be fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants