jskvrna commited on
Commit
b073e54
·
1 Parent(s): 6d118b2
Files changed (2) hide show
  1. predict.py +1 -1
  2. script.py +3 -3
predict.py CHANGED
@@ -10,7 +10,7 @@ from PIL import Image as PImage
10
  import cv2
11
  #import open3d as o3d
12
  #from visu import plot_reconstruction_local, plot_wireframe_local, plot_bpo_cameras_from_entry_local
13
- import pyvista as pv
14
  #from fast_pointnet import save_patches_dataset, predict_vertex_from_patch
15
  from fast_pointnet_v2 import save_patches_dataset, predict_vertex_from_patch
16
  #from fast_voxel import predict_vertex_from_patch_voxel
 
10
  import cv2
11
  #import open3d as o3d
12
  #from visu import plot_reconstruction_local, plot_wireframe_local, plot_bpo_cameras_from_entry_local
13
+ #import pyvista as pv
14
  #from fast_pointnet import save_patches_dataset, predict_vertex_from_patch
15
  from fast_pointnet_v2 import save_patches_dataset, predict_vertex_from_patch
16
  #from fast_voxel import predict_vertex_from_patch_voxel
script.py CHANGED
@@ -9,7 +9,7 @@ import gc
9
  from utils import empty_solution
10
  from predict import predict_wireframe
11
 
12
- from fast_pointnet import load_pointnet_model
13
  from fast_pointnet_class import load_pointnet_model as load_pointnet_class_model
14
  import torch
15
 
@@ -74,13 +74,13 @@ if __name__ == "__main__":
74
 
75
  device = "cuda" if torch.cuda.is_available() else "cpu"
76
 
77
- pnet_model = load_pointnet_model(model_path="pnet.pth", device=device, predict_score=True)
78
 
79
  pnet_class_model = load_pointnet_class_model(model_path="pnet_class.pth", device=device)
80
 
81
  voxel_model = None
82
 
83
- config = {'vertex_threshold': 0.32, 'edge_threshold': 0.65, 'only_predicted_connections': True}
84
 
85
  print('------------ Now you can do your solution ---------------')
86
  solution = []
 
9
  from utils import empty_solution
10
  from predict import predict_wireframe
11
 
12
+ from fast_pointnet_v2 import load_pointnet_model
13
  from fast_pointnet_class import load_pointnet_model as load_pointnet_class_model
14
  import torch
15
 
 
74
 
75
  device = "cuda" if torch.cuda.is_available() else "cpu"
76
 
77
+ pnet_model = load_pointnet_model(model_path="initial_epoch_60_v2.pth", device=device, predict_score=True)
78
 
79
  pnet_class_model = load_pointnet_class_model(model_path="pnet_class.pth", device=device)
80
 
81
  voxel_model = None
82
 
83
+ config = {'vertex_threshold': 0.59, 'edge_threshold': 0.65, 'only_predicted_connections': True}
84
 
85
  print('------------ Now you can do your solution ---------------')
86
  solution = []