Hey,
I am trying to introduce a new layer to the vision yolov5 model by first defining the module class layer in the common.py file, calling it in the yolo.py and tf.py and yet I am getting the error below. Any leads on what I am missing would be greatly appreciated.
Thanks
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[384], line 7
3 print('Printing the model architecture in the yaml configuration file.')
5 cfg = 'models\sandbox_config.yaml'
----> 7 model = Model(cfg, ch=3, nc = data_dict['nc'], anchors = hyp.get('anchors')).to(device)
File d:\new_pc_labwork\lab_work_projects\object_counting\training_yolov5\yolov5\models\yolo.py:238, in DetectionModel.__init__(self, cfg, ch, nc, anchors)
236 LOGGER.info(f"Overriding model.yaml anchors with anchors={anchors}")
237 self.yaml["anchors"] = round(anchors) # override yaml value
--> 238 self.model, self.save = parse_model(deepcopy(self.yaml), ch=[ch]) # model, savelist
239 self.names = [str(i) for i in range(self.yaml["nc"])] # default names
240 self.inplace = self.yaml.get("inplace", True)
File d:\new_pc_labwork\lab_work_projects\object_counting\training_yolov5\yolov5\models\yolo.py:393, in parse_model(d, ch)
390 no = na * (nc + 5) # number of outputs = anchors * (classes + 5)
392 layers, save, c2 = [], [], ch[-1] # layers, savelist, ch out
--> 393 for i, (f, n, m, args) in enumerate(d["backbone"] + d["head"]): # from, number, module, args
394 m = eval(m) if isinstance(m, str) else m # eval strings
395 for j, a in enumerate(args):
File <string>:1
NameError: name 'Involution' is not defined