def main(): gt_model = model.rigid_model(100) W = gt_model.W inf_model = factor(W) inf_model.register(gt_model) model.compare(inf_model, gt_model)
def advancedSearch(): if request.method == "GET": return render_template('advancedSearch.html') else: form = request.form select_choices = form["majors"] select_size = form["sizes"] select_location = form["locations"] # def choose(): # if forms = { "m": select_choices, "s": select_size, "l": select_location #"colleges": model.compare(select_choices,select_size,select_location) } colleges = model.compare(forms) # select_majors_list.append("m") # select_size_list.append("s") # select_location_list.append("l") # print("forms: "+str(forms)) # print(select_choices) # print(select_size) # print(select_location) # print(select_majors_list) #model.compare(forms) return render_template('Compare.html', forms=forms, colleges=colleges)
# Factor to C and B matrices. C, B = factor_S_sharp_to_C_and_B(S_sharp, n_basis) # Build linear model. scene = model.BasisShapeModel(Rs, Bs=B.reshape(n_basis, 3, B.shape[1]), C=C, Ts=Ts) return scene if __name__ == '__main__': # Set the seed. np.random.seed(0) # Generate some synthetic data. n_frames = 200 gt_model = model.simple_model(n_frames) W = gt_model.W # Use the Dai algorithm. inf_model = factor(W, use_method_1=0) # Register to ground truth inf_model.register(gt_model) model.compare(inf_model, gt_model, visualize=False)
else: # Recover S_sharp S_sharp = S_sharp_from_Rs(W_cent, Rs) # Factor to C and B matrices. C, B = factor_S_sharp_to_C_and_B(S_sharp, n_basis) # Build linear model. scene = model.BasisShapeModel(Rs, Bs = B.reshape(n_basis, 3, B.shape[1]), C=C, Ts=Ts) return scene if __name__ == '__main__': # Set the seed. np.random.seed(0) # Generate some synthetic data. n_frames = 200 gt_model = model.simple_model(n_frames) W = gt_model.W # Use the Dai algorithm. inf_model = factor(W, use_method_1 = 0) # Register to ground truth inf_model.register(gt_model) model.compare(inf_model, gt_model, visualize=False)