예제 #1
0
  boxm_batch.run_process();

  

  boxm_batch.init_process("vilLoadImageViewProcess");
  boxm_batch.set_input_string(0,original_img_dir + "/frames_%(#)05d.tif"%{"#":frame});
  boxm_batch.run_process();
  (id,type) = boxm_batch.commit_output(0);
  true_img = dbvalue(id,type);

  boxm_batch.init_process("vilImageSSDProcess");
  boxm_batch.set_input_from_db(0,pred_img_byte);
  boxm_batch.set_input_from_db(1,true_img);
  boxm_batch.run_process();
  (id,type) = boxm_batch.commit_output(0);
  ssd = dbvalue(id,type);
  ssd_val = boxm_batch.get_output_float(ssd.id);
  
  ssd_vals.append(ssd_val);
  ssd_avg = ssd_avg + ssd_val;
  
  boxm_batch.remove_data(pred_img.id)
  boxm_batch.remove_data(true_img.id)
  
  
ssd_file = dir + "/ssd.txt"
f = open(ssd_file, 'w');
f.write(str(ssd_vals));
f.write("\n");
f.write(str(ssd_avg/(npixels*len(test_frames))));
f.close();
예제 #2
0
    
#dir = "/Users/isa/Experiments/super3d/sr2_scene_sr2_images/expectedImgs_1" 

#dir = "/Users/isa/Experiments/super3d/sr2_3scene_sr2_images/expectedImgs_2" 

#dir = "/Users/isa/Experiments/super3d/scene_sr2_images/expectedImgs_2" 

#dir = "/Users/isa/Experiments/super3d/scene/expectedImgs_2" 

#dir = "/Volumes/vision/video/isabel/super3d/scili_experiment/normal_scene/expectedImgs_0"

dir = "/Users/isa/Experiments/super3d/scili_experiments_bicubic/sr2_scene_sr2_images/expectedImgs_0"
   
boxm_batch.init_process("vilLoadImageViewProcess");
boxm_batch.set_input_string(0,dir + "/exepected_var.tiff");
boxm_batch.run_process();
(id,type) = boxm_batch.commit_output(0);
var_img = dbvalue(id,type);

boxm_batch.init_process("vilImageMeanProcess");
boxm_batch.set_input_from_db(0,var_img);
boxm_batch.run_process();
(id,type) = boxm_batch.commit_output(0);
mean = dbvalue(id,type);
mean_val = boxm_batch.get_output_float(mean.id);
 
  
mean_file = dir + "/mean_var.txt"
f = open(mean_file, 'w');
f.write(str(mean_val));
f.close();