Browse Source

Merge branch 'release/v0.6.2'

Jérôme BUISINE 7 months ago
parent
commit
dcc8c475dd
4 changed files with 9 additions and 67 deletions
  1. 1 47
      experimentConfig.default.js
  2. 0 13
      myfile.csv
  3. 4 4
      utils/convert_folder.sh
  4. 4 3
      utils/extract_stats.py

+ 1 - 47
experimentConfig.default.js

@@ -53,29 +53,14 @@ export const experiments = {
     availableScenes: {
       whitelist: [
         'p3d_arcsphere-view0_part6',
-        'p3d_bathroom-view0_part6',
-        'p3d_bedroom-view0_part6',
-        'p3d_bedroom-view1_part6',
-        'p3d_bidir-view0_part6',
-        'p3d_bmw-m6-view0_part6',
         'p3d_bunny-fur-view0_part6',
         'p3d_car2-view0_part6',
         'p3d_caustic-view0_part6',
-        'p3d_chopper-titan-view0_part6',
-        'p3d_classroom-view0_part6',
-        'p3d_classroom-view1_part6',
         'p3d_coffee-splash-view0_part6',
-        'p3d_contemporary-bathroom-view0_part6',
-        'p3d_contemporary-bathroom-view1_part6',
         'p3d_cornel-box-view0_part6',
         'p3d_crown-view0_part6',
-        'p3d_dining-room-view0_part6',
-        'p3d_dining-room-view1_part6',
         'p3d_dragon-view0_part6',
         'p3d_dragon_250-view0_part6',
-        'p3d_echecs-view0_part6',
-        'p3d_echecs-view1_part6',
-        'p3d_echecs-view2_part6',
         'p3d_ecosys-view0_part6',
         'p3d_eponge-fractal-5-view0_part6',
         'p3d_eponge-fractal-5-view1_part6',
@@ -83,55 +68,24 @@ export const experiments = {
         'p3d_eponge-fractal-6-view1_part6',
         'p3d_ganesha-view0_part6',
         'p3d_glass-of-water-view0_part6',
-        'p3d_glass-view0_part6',
-        'p3d_glasses-view0_part6',
         'p3d_indirect-view0_part6',
         'p3d_kitchen-view0_part6',
-        'p3d_kitchen-view1_part6',
-        'p3d_lamp-view0_part6',
-        'p3d_landscape-view0_part6',
-        'p3d_landscape-view1_part6',
-        'p3d_landscape-view2_part6',
         'p3d_landscape-view3_part6',
-        'p3d_landscape-view4_part6',
-        'p3d_living-room-2-view0_part6',
-        'p3d_living-room-2-view1_part6',
-        'p3d_living-room-3-view0_part6',
-        'p3d_living-room-3-view1_part6',
         'p3d_living-room-view0_part6',
         'p3d_living-room-view1_part6',
         'p3d_living-room-view2_part6',
-        'p3d_low_table_2spheric_view0_part6',
-        'p3d_low_table_coridor_view0_part6',
         'p3d_low_table_upper_view0_part6',
-        'p3d_low_table_window-view0_part6',
         'p3d_pavilion-day-view0_part6',
         'p3d_pavilion-day-view1_part6',
         'p3d_pavilion-day-view2_part6',
         'p3d_pavilion-night-view0_part6',
         'p3d_pavilion-night-view1_part6',
         'p3d_pavilion-night-view2_part6',
-        'p3d_rubix-view0_part6',
-        'p3d_sanmiguel-view0_part6',
-        'p3d_sanmiguel-view1_part6',
-        'p3d_sanmiguel-view2_part6',
-        'p3d_sanmiguel-view3_part6',
-        'p3d_spaceship-view0_part6',
-        'p3d_sportscar-view0_part6',
-        'p3d_staircase-view0_part6',
         'p3d_staircase-view1_part6',
         'p3d_staircase2-view0_part6',
         'p3d_staircase2-view1_part6',
         'p3d_tt-view0_part6',
-        'p3d_tungsten_veach-mis-view0_part6',
-        'p3d_veach-ajar-view0_part6',
-        'p3d_veach-ajar-view1_part6',
-        'p3d_villa-daylight-view0_part6',
-        'p3d_villa-daylight-view1_part6',
-        'p3d_villa-daylight-view2_part6',
-        'p3d_vw-van-view0_part6',
-        // 'p3d_whiteroom-daytime-view0_part6',
-        'p3d_whiteroom-night-view0_part6'
+        'p3d_vw-van-view0_part6'
       ],
       blacklist: null
       // No whitelist = Select all scenes

+ 0 - 13
myfile.csv

@@ -1,13 +0,0 @@
-50_shades_of_grey;0;12;16;22;26;32;38;46;54;62;70;72;78;88;94;102;
-p3d_pavilion-day-view2_part6;3500;1920;1580;1260;460;820;1980;1140;240;660;1140;660;440;680;760;1140;
-p3d_landscape-view4_part6;240;240;220;200;160;140;180;160;900;200;1280;2320;2840;2120;2300;2680;
-p3d_bedroom-view1_part6;5860;5800;4380;5180;6620;5060;4280;3980;4860;4500;3360;4280;5880;4060;4600;5020;
-p3d_landscape-view0_part6;60;20;20;20;40;60;80;80;600;960;200;260;100;120;100;60;
-p3d_eponge-fractal-5-view0_part6;20;40;40;20;40;60;40;40;40;80;80;40;40;40;80;40;
-p3d_dragon_250-view0_part6;740;640;880;820;920;640;620;680;1360;1480;1540;1180;1040;1080;860;1100;
-p3d_living-room-2-view1_part6;6060;4540;4800;7740;6220;5520;5660;5360;6100;4600;6880;5160;8140;6340;5920;8100;
-p3d_kitchen-view0_part6;5360;5320;3760;4880;3940;6700;6000;3620;4440;5980;5900;5620;5940;5840;3820;4420;
-p3d_landscape-view3_part6;1140;1500;1740;2180;580;760;800;1760;980;1220;1060;1320;640;800;1400;1040;
-p3d_staircase2-view1_part6;2320;2720;2900;3140;3560;4320;5000;5480;2960;2140;2920;2620;2300;780;420;400;
-p3d_kitchen-view1_part6;4820;7100;6400;6440;6420;5340;5000;6520;5220;7840;7380;6060;5620;6140;8260;5640;
-p3d_bedroom-view0_part6;6240;7460;5600;5340;4780;4660;5120;3380;5640;6840;5080;4740;4080;4940;7420;4320;

+ 4 - 4
utils/convert_folder.sh

@@ -41,9 +41,9 @@ do
     IFS='/' read -ra ADDR <<< "${folder_path}"
     folder=${ADDR[-1]}
 
-    if [[ "$folder" == ${prefix}* ]]; then
+#    if [[ "$folder" == ${prefix}* ]]; then
 
-        output_scene_folder=$output_folder/${folder}_part6
+        output_scene_folder=$output_folder/${folder}_${width}_${height}
         mkdir -p $output_scene_folder
 
         for file in $(ls ${folder_path}*)
@@ -54,5 +54,5 @@ do
             echo "Images centered saved into $output_scene_folder/$file"
         done
 
-    fi
-done
+#    fi
+done

+ 4 - 3
utils/extract_stats.py

@@ -2,6 +2,7 @@
 import os, sys
 import argparse
 import json
+import numpy as np
 
 
 def main():
@@ -34,9 +35,9 @@ def main():
 
         for extract in extracts:
             if extract['index'] not in dict_data[scene]:
-                dict_data[scene][extract['index']] = (extract['quality'], 1)
+                dict_data[scene][extract['index']] = [extract['quality']]
             else:
-                dict_data[scene][extract['index']] = (dict_data[scene][extract['index']][0] + extract['quality'], dict_data[scene][extract['index']][1] + 1)
+                dict_data[scene][extract['index']].append(extract['quality'])
             
     
     output_file = open(p_output, 'w')
@@ -45,7 +46,7 @@ def main():
 
         for extract in dict_data[scene]:
             thresholds_data = dict_data[scene][extract]
-            output_file.write(str(int(thresholds_data[0] / thresholds_data[1])) + ';')
+            output_file.write(str(int(np.mean(thresholds_data))) + ';')
 
         output_file.write('\n')