LittleMeow
LittleMeow
不用__base__的值,自己填一个就好了
> huggingface READMDE里有huggingface的镜像网站,替换了就行
> > > huggingface > > > > > > READMDE里有huggingface的镜像网站,替换了就行 > > 在哪个文件中替换呀? config里model_name
> > > > > huggingface > > > > > > > > > > > > READMDE里有huggingface的镜像网站,替换了就行 > > > > > > > > > 在哪个文件中替换呀? >...
> > > > > > > huggingface > > > > > > > > > > > > > > > > > > READMDE里有huggingface的镜像网站,替换了就行 > > >...
This [PR ](https://github.com/AILab-CVC/YOLO-World/pull/73#issue-2151222250) leads to the error. It should not be merged.
torch.einsum() should be replaced by torch.matmul() and torch.sum(), because einsum() is not supported by most edge devices. For example, I rewrite the [code](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/dense_heads/yolo_world_head.py#L77): `x = torch.einsum('bchw,bkc->bkhw', x, w)` to `batch,...
> @wondervictor May I ask where should I modify if I want to try using the effect of other text encoders, such as changing the text encoder of CLIP to...
> > 在处理了,这两天会随一个新feature一并更新,大家可以把遇到的问题或者潜在的solution共享一下,感谢支持! 1. yolo_world的[extract_feat()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/detectors/yolo_world.py#L66)接口、yolo_world_head的[predict()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/dense_heads/yolo_world_head.py#L257)接口,形参和mmdeploy的接口不一样:extract_feat()多需要一个"batch_data_samples",predict()需要img_feat和txt_feature。这导致调用到[这儿](https://github.com/open-mmlab/mmdeploy/blob/bc75c9d6c8940aa03d0e1e5b5962bd930478ba77/mmdeploy/codebase/mmdet/models/detectors/single_stage.py#L14)时就会报错。我把这儿按如下改了: `x = self.extract_feat(batch_inputs)` `output = self.bbox_head.predict(x, data_samples, rescale=False)` 改成 `img_feats, txt_feats = self.extract_feat(batch_inputs, data_samples)` `output = self.bbox_head.predict(img_feats, txt_feats, data_samples, rescale=False)` 当然也可以修改[extract_feat()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/detectors/yolo_world.py#L66)和[predict()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/dense_heads/yolo_world_head.py#L257),避免修改通用的mmdeploy。 2.用yolov8作为对比例子: yolo_world_head和yolov8_head都继承自yolov5_head,而yolov5_head的[predict_by_feat()](https://github.com/open-mmlab/mmyolo/blob/8c4d9dc503dc8e327bec8147e8dc97124052f693/mmyolo/models/dense_heads/yolov5_head.py#L276)接口,为了部署,是有重写的,即[yolov5_head__predict_by_feat()](https://github.com/open-mmlab/mmyolo/blob/8c4d9dc503dc8e327bec8147e8dc97124052f693/mmyolo/deploy/models/dense_heads/yolov5_head.py#L51)。 yolov8_head自身没有重写predict_by_feat()接口,因此会调用yolov5_head的predict_by_feat(),即在部署时也就调用了yolov5_head__predict_by_feat()。 而yolo_world_head不一样,是重写了[predict_by_feat()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/dense_heads/yolo_world_head.py#L425)的(虽然和yolov5_head的一字不差...),这就导致不会调用yolov5_head__predict_by_feat(),转换失败。...
> > > > 在处理了,这两天会随一个新feature一并更新,大家可以把遇到的问题或者潜在的solution共享一下,感谢支持! > > > > > > > > 1. yolo_world的[extract_feat()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/detectors/yolo_world.py#L66)接口、yolo_world_head的[predict()](https://github.com/AILab-CVC/YOLO-World/blob/e425669cba9b81bdc0621952262b4d44665c293f/yolo_world/models/dense_heads/yolo_world_head.py#L257)接口,形参和mmdet的通用接口是不一样的:extract_feat()多需要一个"batch_data_samples",predict()需要img_feat和txt_feature。这导致调用到[这儿](https://github.com/open-mmlab/mmdeploy/blob/bc75c9d6c8940aa03d0e1e5b5962bd930478ba77/mmdeploy/codebase/mmdet/models/detectors/single_stage.py#L14)时就会报错。我把这儿按如下改了: > > `x = self.extract_feat(batch_inputs)` > > `output = self.bbox_head.predict(x, data_samples, rescale=False)` > > 改成...