Liuchen1997 / RFAConv

RAFConv: Innovating Spatital Attention and Standard Convolutional Operation
136 stars 18 forks source link

Training the YOLOv5 and YOLOv8 with RFAConv #14

Open nguyenduylinhqbu opened 7 months ago

nguyenduylinhqbu commented 7 months ago

Dear Mr. @Liuchen1997, I am trying to train the YOLOv5 and YOLOv8 architectures with your proposed modules but I got many errors. Please provide the guide details to train the YOLOv5 and YOLOv8 architectures with RFAConv. Thank you very much. Best regards.

CV-ZhangXin commented 7 months ago

Thank you for your letter. We are more than happy to help you. In fact, we have already provided very complete code in the repository. You only need to configure RFAConv. Note the yaml files in YOLOv5 and YOLOv8, as well as the RFAConv provided. If you have any further questions, please let us know.

CV-ZhangXin commented 7 months ago

The RFAConv module is found in model.py in the root directory. In addition, the corresponding yaml file can be found in the Detection file. You only need to focus on the usual process of configuring YOLOv8 and YOLOv5. If there are subsequent problems, please let us know. We thank you again for your letter.

nguyenduylinhqbu commented 7 months ago

Dear Mr. @CV-ZhangXin, Thank you for your reply. Can you clarify where I can change the code (Which files) in YOLOv5 and YOLOv8 to apply the RFAConv? Best regards.

CV-ZhangXin commented 7 months ago

Dear Mr. @nguyenduylinhqbu First, add RFAConv to models/common.py in YOLOv5, then register RFAConv in models/yolo.py, and finally configure RFAConv in models/xx.yaml. We've published the yaml file in the repository, so you only need to introduce RFAConv in models/common.py and models/yolo.py. These are the basic steps to configure YOLOv5. The configuration for YOLOv8 is similar and these can be found online. If you don't succeed in configuring it in the subsequent process, please contact us again. Best regards.

nguyenduylinhqbu commented 7 months ago

Dear Mr. @CV-ZhangXin, It's successful now. Thank you for your guidance. Best regards.

mxd221 commented 2 months ago

尊敬的先生,首先,在 YOLOv5 中将 RFAConv 添加到 models/common.py,然后在 models/yolo.py 中注册 RFAConv,最后在 models/xx.yaml 中配置 RFAConv。我们已经在仓库中发布了 yaml 文件,因此您只需要在 models/common.py 和 models/yolo.py 中引入 RFAConv。这些是配置 YOLOv5 的基本步骤。YOLOv8 的配置与此类似,可以在网上找到。如果您在后续过程中没有成功配置它,请再次与我们联系。 此致敬意。

RFAConv成功配置了,但是配置完RFCAConv训练时出现了RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 4 but got size 5 for tensor number 1 in the list.报错,请问怎样解决呢