@@ -564,9 +564,13 @@ def plot_vmaf(self):
564
564
vm = self .d .get ('tg_vmaf' )
565
565
if vm :
566
566
plt .hlines (vm , 0 , len (x1 ), colors = 'red' )
567
+ plt .hlines (sum (real_y )/ len (real_y ),0 , len (x1 ), colors = 'blue' )
567
568
568
569
# Save/close
569
- plt .savefig (self .d .get ('input_file' ).stem )
570
+ plt .ylabel ('VMAF' )
571
+ plt .xlabel ('Frames' )
572
+ plt .tight_layout ()
573
+ plt .savefig (self .d .get ('input_file' ).stem , dpi = 600 )
570
574
plt .close ()
571
575
except Exception as e :
572
576
_ , _ , exc_tb = sys .exc_info ()
@@ -577,6 +581,7 @@ def target_vmaf(self, source, command):
577
581
mincq = self .d .get ('min_cq' )
578
582
maxcq = self .d .get ('max_cq' )
579
583
steps = self .d .get ('vmaf_steps' )
584
+ frames = self .frame_probe (source )
580
585
581
586
# Making 3fps probing file
582
587
cq = self .man_cq (command , - 1 )
@@ -625,8 +630,11 @@ def target_vmaf(self, source, command):
625
630
626
631
for i in range (int (min (xnew )), int (max (xnew )) + 1 , 1 ):
627
632
plt .axvline (i , color = 'grey' , linewidth = 0.5 )
628
-
629
- plt .savefig (probe .stem )
633
+ plt .ylabel ('vmaf' )
634
+ plt .xlabel ('cq' )
635
+ plt .title (f'Chunk: { probe .stem } , Frames: { frames } ' ) # Add frame count
636
+ plt .tight_layout ()
637
+ plt .savefig (probe .stem , dpi = 300 )
630
638
plt .close ()
631
639
632
640
return int (tg_cq [0 ]), f'Target: CQ { int (tg_cq [0 ])} Vmaf: { round (float (tg_cq [1 ]), 2 )} \n '
0 commit comments