我正在尝试借助此 COLAB笔记本。我希望通过FC1为(1000,2048)后向量的形状,但是这种模型使我输出(1000,1024)。有什么办法,我们可以调整代码中有利于(1000,2048)结果的代码中的功能?我认为,我们必须使用其他配置文件(CFG,我们正在通过),但是我不确定我们应该使用哪个文件传递到模型中。我们正在使用的当前文件是:cfg_path =“ Coco-instancesementation/mask_rcnn_r_101_fpn_3x.yaml”。如果有人可以回答,那将有很大的帮助。
box_features = model.roi_heads.box_head.fc1(box_features)
# print(box_features.shape) # torch.Size([1000, 1024])
I'm trying to extract visual embeddings from the detectron model with the help of this colab notebook. I want the shape of vector after passing through fc1 to be (1000, 2048), but somehow this model gives me output of (1000, 1024). Is there any way, we can tweak the features in the code which favours our result of (1000, 2048)? I think, we have to use a different config file (cfg, we are passing), but I'm not sure which file should we use to pass into the model. The current file which we are using is : cfg_path = "COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml". If anybody can answer, it would be of great help.
box_features = model.roi_heads.box_head.fc1(box_features)
# print(box_features.shape) # torch.Size([1000, 1024])
发布评论