'TransformerBlock' object has no attribute 'conv'
Thanks for your work. And I have two questions:
- When I run the test.py or detect_twostream with pre-trained model 'yolov5l_transformerx3_llvip_s1024_bs32_e200', there is always a Error: 'TransformerBlock' object has no attribute 'conv'.
- Can you upload a simple example of the dataset (the training list, the images(rgb and IR) and the annotation), because I changed the code and read the annotation from xml file directly, and I am not sure if I did it correctly.
I have the same problem
I have the same problem
I know the reason. The architecture of the released pretrained model is different from the codes. I train the model again, and the inference codes run correctly.
Sorry for the late reply.
Yes, the reason is exactly what you said.
Because I didn't realize that the TransformerBlock module already exists in the yolov5 repository when I first trained.
Later, to distinguish this module from the original TransformerBlock module in YOLOv5, I named it myTransformerBlock.
If you want to detect it with pre-trained model 'yolov5l_transformerx3_llvip_s1024_bs32_e200', pls change the name of the myTransformerBlock module in models/common.py to TransformerBlock.
https://github.com/DocF/multispectral-object-detection/blob/6905a036e39fa4c411a9ddda961b88aa578cf7b1/models/common.py#L516 ↓
class TransformerBlock(nn.Module):
thanks for your response
发自我的iPhone
在 2022年2月28日,12:23,Richard Fang @.***> 写道:
Sorry for the late reply. Yes, the reason is exactly what you said. Because I didn't realize that the TransformerBlock module already exists in the yolov5 repository when I first trained. Later, to distinguish this module from the original TransformerBlock module in YOLOv5, I named it myTransformerBlock. If you want to detect it with pre-trained model 'yolov5l_transformerx3_llvip_s1024_bs32_e200', pls change the name of the myTransformerBlock module in models/common.py to TransformerBlock.
https://github.com/DocF/multispectral-object-detection/blob/6905a036e39fa4c411a9ddda961b88aa578cf7b1/models/common.py#L516 ↓ class TransformerBlock(nn.Module):
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.