AlibabaResearch / efficientteacher

A Supervised and Semi-Supervised Object Detection Library for YOLO Series
GNU General Public License v3.0
832 stars 151 forks source link

导出无标签图片的.txt #13

Open FYM1209 opened 1 year ago

FYM1209 commented 1 year ago

无法导出无标签图片的.txt image

BowieHsu commented 1 year ago

看起来像是那个目录下没有图片?可以ls检查一下吗? @FYM1209

FYM1209 commented 1 year ago

看起来像是那个目录下没有图片?可以ls检查一下吗? @FYM1209

image 有的

BowieHsu commented 1 year ago

老师,试试把路径两边的尖括号去掉呢

FYM1209 commented 1 year ago

老师,试试把路径两边的尖括号去掉呢

ok了

FYM1209 commented 1 year ago

老师,试试把路径两边的尖括号去掉呢 Python==3.9还是3.8

FYM1209 commented 1 year ago

image 版本按着文档要求的,但还是报这个错

BowieHsu commented 1 year ago

您好,我检查了一下scikit-learn的版本是这个,您看看您的运行环境是和这个对上的吗 截屏2023-03-05 下午8 32 58

FYM1209 commented 1 year ago

您好,我检查了一下scikit-learn的版本是这个,您看看您的运行环境是和这个对上的吗 截屏2023-03-05 下午8 32 58

这个问题已经解决了 但是在开始训练的时候,就直接结束了 image 是我的she'be设备不行么

BowieHsu commented 1 year ago

看起来像是您的显存不够?您尝试一下缩小batchsize?

lonelyzyp commented 1 year ago

看起来像是那个目录下没有图片?可以ls检查一下吗? @FYM1209 convert_yolov5_to_efficient( '/python_workspace/efficientteacher/weights/efficient-yolov5s.pt', '/python_workspace/efficientteacher/configs/ssod/custom/yolov5s_custom_ssod.yaml','/python_workspace/efficientteacher/weights/efficient-yolov5s.pt') image 你好,(Windows环境)请问在使用convert_pt_to_efficient.py把自己的pt导出为本项目可识别的pt文件时。出现了这种错误,如何解决呢

BowieHsu commented 1 year ago

@lonelyzyp 您好,像是路径填错了? 需要把代码里的path填成您放权重的绝对路径。

lonelyzyp commented 1 year ago

@lonelyzyp 您好,像是路径填错了? 需要把代码里的path填成您放权重的绝对路径。 你好在吗?我已经修改为绝对路径,convert_yolov5_to_efficient( 'G:\python_workspace\efficientteacher\weights\yolov5s.pt', 'G:\python_workspace\efficientteacher\configs\ssod\custom\yolov5s_custom_ssod.yaml','G:\python_workspace\efficientteacher\weights\efficient-yolov5s.pt') 出现这个问题,请问如何解决呢 KeyError: 'Non-existent config key: SSOD.ignore_thres_low' 之前的操作,按照1.Convert Model,修改了nc为一类 和类别,修改了5s的深度因子和宽度因子

BowieHsu commented 1 year ago

您好,需要用的yaml文件为sup文件夹哈,或者把您现在用的那个yaml文件里SSOD那一行以下的全注释掉应该就好了

lonelyzyp commented 1 year ago

您好,需要用的yaml文件为sup文件夹哈,或者把您现在用的那个yaml文件里SSOD那一行以下的全注释掉应该就好了 您好啊!我按照您的指导,修改了对应的文件夹,深宽因子和nc、names。不再出现KeyError: 'Non-existent config key: SSOD.ignore_thres_low 现在出现了一下问题,请问时什么原因呢(抱拳期待您的回复)

load weights from u-yolov5... Model summary: 268 layers, 7022326 parameters, 7022326 gradients

Traceback (most recent call last): File "G:/python_workspace/efficientteacher/scripts/mula_convertor/convert_pt_to_efficient.py", line 92, in convert_yolov5_to_efficient( 'G:\python_workspace\efficientteacher\weights\best.pt', 'G:\python_workspace\efficientteacher\configs\sup\custom\yolov5s_custom.yaml','G:\python_workspace\efficientteacher\weights\efficient-yolov5s.pt') File "G:/python_workspace/efficientteacher/scripts/mula_convertor/convert_pt_to_efficient.py", line 44, in convert_yolov5_to_efficient model.load_state_dict(new_yolov5s_weight,strict=False) File "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\nn\modules\module.py", line 1407, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for Model: size mismatch for backbone.stage5_2.cv2.conv.weight: copying a param with shape torch.Size([512, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 512, 1, 1]). size mismatch for backbone.stage5_2.cv2.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for backbone.stage5_2.cv2.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for backbone.stage5_2.cv2.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for backbone.stage5_2.cv2.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for backbone.sppf.cv2.conv.weight: copying a param with shape torch.Size([256, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 1024, 1, 1]). size mismatch for backbone.sppf.cv2.bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for backbone.sppf.cv2.bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for backbone.sppf.cv2.bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for backbone.sppf.cv2.bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).

BowieHsu commented 1 year ago

您好,能检查一下您的原生YOLOv5版本吗,看起来像是结构和6.0的不一样

lonelyzyp commented 1 year ago

您好,能检查一下您的原生YOLOv5版本吗,看起来像是结构和6.0的不一样 好的,我重新开始检查,时间久了。再请问在power shell下使用时,出现这个问题。文件夹下存在图片 image

BowieHsu commented 1 year ago

@lonelyzyp 您好,应该是使用Select-String 替换find命令,具体的使用方法您可以查查

lonelyzyp commented 1 year ago

@lonelyzyp 您好,应该是使用Select-String 替换find命令,具体的使用方法您可以查查

好的,我尝试以下,特别感谢您的答疑,夜已深早点休息,期待和您之后的交流

lonelyzyp commented 1 year ago

@BowieHsu 您好!我换用YOLOV5s-6.0训练后权重,成功转换为本项目可识别模型。下面再训练用遇到两个问题,向您请教! (1)当我使用自己备好的数据集时,使用(python train.py --cfg configs/ssod/custom/yolov5s_custom_ssod.yaml) 加载有标签数据时,不断出现OSError: [WinError 1455] 页面文件太小,无法完成操作; Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.;之后加载完成(Scanning 'data\ear3000_angel\train300labels' images and labels...300 found, 0 missing, 0 empty, 0 corrupted: 100%|);最后报错BrokenPipeError: [Errno 32] Broken pipe,无法进行下一步 image

lonelyzyp commented 1 year ago

@BowieHsu 您好!我换用YOLOV5s-6.0训练后权重,成功转换为本项目可识别模型。下面再训练用遇到两个问题,向您请教! (1)当我使用自己备好的数据集时,使用(python train.py --cfg configs/ssod/custom/yolov5s_custom_ssod.yaml) 加载有标签数据时,不断出现OSError: [WinError 1455] 页面文件太小,无法完成操作; Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.;之后加载完成(Scanning 'data\ear3000_angel\train300labels' images and labels...300 found, 0 missing, 0 empty, 0 corrupted: 100%|);最后报错BrokenPipeError: [Errno 32] Broken pipe,无法进行下一步 image 仅改动yaml如下:改为5s的因子参数 nc:1 batch_size: 4(本地设定很小),另外我没有找到num_workers控制线程,本地8核16线程CPU

lonelyzyp commented 1 year ago

@BowieHsu 您好!我换用YOLOV5s-6.0训练后权重,成功转换为本项目可识别模型。下面再训练用遇到两个问题,向您请教! (1)当我使用自己备好的数据集时,使用(python train.py --cfg configs/ssod/custom/yolov5s_custom_ssod.yaml) 加载有标签数据时,不断出现OSError: [WinError 1455] 页面文件太小,无法完成操作; Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.;之后加载完成(Scanning 'data\ear3000_angel\train300labels' images and labels...300 found, 0 missing, 0 empty, 0 corrupted: 100%|);最后报错BrokenPipeError: [Errno 32] Broken pipe,无法进行下一步 image 仅改动yaml如下:改为5s的因子参数 nc:1 batch_size: 4(本地设定很小),另外我没有找到num_workers控制线程,本地8核16线程CPU

anaconda安装在D盘,虚拟内存设置为20480MB image

lonelyzyp commented 1 year ago

@BowieHsu 当我使用(python val.py --cfg configs/sup/custom/yolov5s.yaml --weights weights/efficient-yolov5s.pt)进行val验证coco数据集,正常运行是否可以时。同样是“页面文件大小,无法完成操作”不停的跳动,最后完成了Val数据集5000张读取。然后就一直卡着不能正常进行了。 eg: OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\cudnn_cnn_infer64_8.dll" or one of its dependencies. val: Scanning 'data\coco\val2017' images and labels...5000 found, 0 missing, 48 empty, 0 corrupted: 100%|██| 5000/5000 [01:06<00:00, 75.25it/s]

Quintonkd commented 1 year ago

@BowieHsu 当我使用(python val.py --cfg configs/sup/custom/yolov5s.yaml --weights weights/efficient-yolov5s.pt)进行val验证coco数据集,正常运行是否可以时。同样是“页面文件大小,无法完成操作”不停的跳动,最后完成了Val数据集5000张读取。然后就一直卡着不能正常进行了。 eg: OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\cudnn_cnn_infer64_8.dll" or one of its dependencies. val: Scanning 'data\coco\val2017' images and labels...5000 found, 0 missing, 48 empty, 0 corrupted: 100%|██| 5000/5000 [01:06<00:00, 75.25it/s]

win10 cuda11.7 i7-6700k rtx3080 python3.7 pytorch1.13存在同样的问题

lonelyzyp commented 1 year ago

@BowieHsu 当我使用(python val.py --cfg configs/sup/custom/yolov5s.yaml --weights weights/efficient-yolov5s.pt)进行val验证coco数据集,正常运行是否可以时。同样是“页面文件大小,无法完成操作”不停的跳动,最后完成了Val数据集5000张读取。然后就一直卡着不能正常进行了。 eg: OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda\envs\yolov5_ssda2\lib\site-packages\torch\lib\cudnn_cnn_infer64_8.dll" or one of its dependencies. val: Scanning 'data\coco\val2017' images and labels...5000 found, 0 missing, 48 empty, 0 corrupted: 100%|██| 5000/5000 [01:06<00:00, 75.25it/s]

win10 cuda11.7 i7-6700k rtx3080 python3.7 pytorch1.13存在同样的问题

您好,目前我的问题也是如此,在一台128GB RAM的服务器可以run,但还有其他问题正在处理,我通过问博主和查询,原因有1:机器RAM不足,比如我的24GB RAM 2:伪标签产生量比较多。您可以参考这https://github.com/AlibabaResearch/efficientteacher/issues/18#issuecomment-1463208347 希望对您有所帮助,