MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / __init__

Method __init__

main.py:18–32  ·  view source on GitHub ↗
(self, cfg, args)

Source from the content-addressed store, hash-verified

16
17class main(object):
18 def __init__(self, cfg, args):
19 self.classes, self.classes_num = load_classes(args.cls_file)
20 self.seg_model = load_seg_module(cfg)
21 self.test_data = load_test_data(cfg)
22 self.obj_model = OAM_GRAM(in_dim=1024, one_hot_cls_num=150).cuda().eval()
23 self.classifier = Classifier(num_classes=self.classes_num, in_dim=2048).cuda().eval()
24 if args.ckpt:
25 self.obj_model, self.classifier = \
26 load_checkpoint(args.ckpt, self.obj_model, self.classifier)
27 self.cfg = cfg
28 self.args = args
29 self.correct = 0
30 self.count = 0
31 logging.info(self.obj_model)
32 logging.info(self.classifier)
33
34 def get_object_feature(self, segSize, img_resized_list, batch_data):
35 segmentation_module = self.seg_model

Callers

nothing calls this directly

Calls 6

load_classesFunction · 0.85
load_seg_moduleFunction · 0.85
load_test_dataFunction · 0.85
OAM_GRAMClass · 0.85
ClassifierClass · 0.85
load_checkpointFunction · 0.85

Tested by

no test coverage detected