0

I am trying to feed extracted features from 23rd layer of Yolov5m to the final detect layer of yolo.

I load features using np.load as features are saved np arrays. shape is 768x20x20 as you are probably aware that it can be written as (N x (3x (80+5)) * 20x20 . here 80 represents the classes in coco , 5 represents the bounding box coords + obj and 20x20 represents the grid size.

This is my final model with just detect layer

# (no) means number of outputs per anchor and is equal to >> nc(number of classes) + 5>> 80
# na means number of anchors
# ch input channel(for rgb it would be 3)
    self.m = nn.ModuleList(nn.Conv2d(x, self.no * self.na, 1) for x in ch)  # output conv
        x[0] = self.m[0](x[0])  # conv >>>> this raises error

source: https://github.com/ultralytics/yolov5/blob/master/models/yolo.py line#53 and line #60

Please have a look and suggest sth. I have been trying since weeks and have hit a roadblock. Thanks!

model

background: I am trying to implement a multi-view object detection use-case where a number of self-driving cars interact with each other to detect occluded objects. so these cars share features instead of images which are later fused together to make a prediction.

Error

model.yaml

0 Answers0