def __init__(self, dataset): self.vis = visdom.Visdom(server="http://localhost") self.sp = pv.SchematicPlotter(self.vis) self.dataset = dataset self.vis_index = 0 self.model = None self.opts = None
parser.add_argument("--data_type", type=str, default="combined", help="(combined|separate)") parser.add_argument("--min_seg_size", type=int, default=6, help="min seg size") parser.add_argument( "--save_dataset", type=bool, default=False, help="should we save this min seg size dataset" ) parser.add_argument( "--load_saved_dataset", type=bool, default=False, help="should we load a presaved dataset for this mss", ) parser.add_argument("--useid", type=bool, default=False, help="should we use the block id") opts = parser.parse_args() vis = visdom.Visdom(server="http://localhost") sp = pv.SchematicPlotter(vis) if opts.data_type == "separate": dataset = SegmentContextSeparateInstanceData( nexamples=3, min_seg_size=opts.min_seg_size, data_preparsed=opts.load_saved_dataset, save_preparsed=opts.save_dataset, for_vis=True, useid=opts.useid, ) for n in range(len(dataset)): shape, seg, target = dataset[n] sp.drawPlotly(shape) sp.drawPlotly(seg) target_coord = index_to_coord(target.item(), 32)
def __init__(self): self.vis = visdom.Visdom(server="http://localhost") self.sp = pv.SchematicPlotter(self.vis)