-
Notifications
You must be signed in to change notification settings - Fork 14
/
plot_mesh.py
36 lines (27 loc) · 997 Bytes
/
plot_mesh.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os, sys
import numpy as np
import time
import torch
import scipy.io
import matplotlib.pyplot as plt
from helpers import *
from MLP import *
import time
from load_data import *
from run_sdf import Runner
import logging, argparse
import scipy.io
if __name__=='__main__':
torch.set_default_tensor_type('torch.cuda.FloatTensor')
FORMAT = "[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s"
logging.getLogger('matplotlib.font_manager').disabled = True
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
parser = argparse.ArgumentParser()
parser.add_argument('--conf', type=str, default="./confs/conf.conf")
parser.add_argument('--is_continue', default=False, action="store_true")
parser.add_argument('--gpu', type=int, default=0)
args = parser.parse_args()
torch.cuda.set_device(args.gpu)
runner = Runner(args.conf, args.is_continue, write_config=False)
runner.set_params()
runner.validate_mesh(threshold=0.1)