带检测的视觉嵌入

发布于 2025-02-04 10:05:10 字数 615 浏览 5 评论 0 原文

我正在尝试借助此 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])

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文