Parcourir la source

Correlation and MSCN analysis

Jérôme BUISINE il y a 5 ans
Parent
commit
2a5c94de35

Fichier diff supprimé car celui-ci est trop grand
+ 650 - 0
analysis/corr_analysys.ipynb


Fichier diff supprimé car celui-ci est trop grand
+ 410 - 0
analysis/mscn_analysis.ipynb


SVDAnalysis/svd_mean_rotations_view.py → analysis/svd_mean_rotations_view.py


SVDAnalysis/svd_roration_view.py → analysis/svd_rotation_view.py


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 707
corr_analysys.ipynb


+ 10 - 5
display_svd_data_scene.py

@@ -40,7 +40,8 @@ seuil_expe_filename = cfg.seuil_expe_filename
 
 metric_choices      = cfg.metric_choices_labels
 
-max_nb_bits = 8
+max_nb_bits         = 8
+display_error       = False
 
 error_data_choices  = ['mae', 'mse', 'ssim', 'psnr']
 
@@ -224,16 +225,19 @@ def display_svd_values(p_scene, p_interval, p_indices, p_metric, p_mode, p_step,
             ax2 = plt.subplot2grid(gridsize, (2, 0), colspan=2)
 
 
-            ax1.set_title(p_scene + ' scene interval information SVD['+ str(begin_data) +', '+ str(end_data) +'], from scenes indices [' + str(begin_index) + ', '+ str(end_index) + ']' + p_metric + ' metric, ' + p_mode + ', with step of ' + str(p_step) + ', svd norm ' + str(p_norm), fontsize=20)
+            ax1.set_title(p_scene + ' scene interval information SVD['+ str(begin_data) +', '+ str(end_data) +'], from scenes indices [' + str(begin_index) + ', '+ str(end_index) + '], ' + p_metric + ' metric, ' + p_mode + ', with step of ' + str(p_step) + ', svd norm ' + str(p_norm), fontsize=20)
             ax1.set_ylabel('Image samples or time (minutes) generation', fontsize=14)
             ax1.set_xlabel('Vector features', fontsize=16)
 
             for id, data in enumerate(images_data):
 
-                p_label = p_scene + '_' + str(images_indices[id]) + " | " + p_error + ": " + str(error_data[id])
+                if display_error:
+                    p_label = p_scene + '_' + str(images_indices[id]) + " | " + p_error + ": " + str(error_data[id])
+                else:
+                    p_label = p_scene + '_' + str(images_indices[id])
 
                 if images_indices[id] == threshold_image_zone:
-                    ax1.plot(data, label=p_label, lw=4, color='red')
+                    ax1.plot(data, label=p_label + " (threshold mean)", lw=4, color='red')
                 else:
                     ax1.plot(data, label=p_label)
 
@@ -249,7 +253,8 @@ def display_svd_values(p_scene, p_interval, p_indices, p_metric, p_mode, p_step,
             ax2.set_xticklabels(list(map(int, images_indices)))
             ax2.plot(error_data)
 
-            plt.show()
+            plot_name = p_scene + '_' + p_metric + '_' + str(p_step) + '_' + p_mode + '_' + str(p_norm) + '.png'
+            plt.savefig(plot_name)
 
 def main():
 

+ 7 - 0
generate_metrics_curve.sh

@@ -0,0 +1,7 @@
+for metric in {"lab","mscn","low_bits_2","low_bits_3","low_bits_4","low_bits_5","low_bits_6","low_bits_4_shifted_2"}; do
+
+    python display_svd_data_scene.py --scene D --interval "0, 800" --indices "0, 1200" --metric ${metric} --mode svdne --step 100 --norm 1 --error mse --ylim "0, 0.1"
+
+done
+
+

+ 1 - 1
runAll_maxwell.sh

@@ -18,7 +18,7 @@ fi
 
 for size in {"4","8","16","26","32","40"}; do
 
-    for metric in {"lab","mscn","mscn_revisited","low_bits_2","low_bits_3","low_bits_4","low_bits_5","low_bits_6","low_bits_4_shifted_2"}; do
+    for metric in {"lab","mscn","low_bits_2","low_bits_3","low_bits_4","low_bits_5","low_bits_6","low_bits_4_shifted_2"}; do
         bash generateAndTrain_maxwell.sh ${size} ${metric}
     done
 done