Comments (22)
我也是这个错误,请问您解决了吗?
from yolov4-pytorch.
补充问题
[2020-10-08 00:18:22,876]-[train.py line:147]: === Epoch:[ 0/300],step:[9980/9999],img_size:[416],total_loss:107.6754|loss_ciou:29.1679|loss_conf:38.5639|loss_cls:39.9436|lr:0.0000
[2020-10-08 00:18:30,749]-[train.py line:147]: === Epoch:[ 0/300],step:[9990/9999],img_size:[416],total_loss:107.6427|loss_ciou:29.1635|loss_conf:38.5499|loss_cls:39.9293|lr:0.0000
[2020-10-08 00:18:37,893]-[train.py line:164]:===== Validate =====
此前训练一个epoch没有报这个错误,但是结束这一epoch后提示Validate后就停止了?
from yolov4-pytorch.
[2020-10-08 15:59:54,446]-[train.py line:147]: === Epoch:[ 0/300],step:[3340/9999],img_size:[416],total_loss:152.8582|loss_ciou:32.0746|loss_conf:59.5948|loss_cls:61.1885|lr:0.0000
[2020-10-08 16:00:02,392]-[train.py line:147]: === Epoch:[ 0/300],step:[3350/9999],img_size:[416],total_loss:152.6998|loss_ciou:32.0685|loss_conf:59.5150|loss_cls:61.1160|lr:0.0000
Traceback (most recent call last):
File "train.py", line 211, in
fp_16=opt.fp_16).train()
File "train.py", line 113, in train
for i, (imgs, label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes) in enumerate(self.train_dataloader):
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/amax/lf2/YOLOv4-pytorch/utils/datasets.py", line 50, in getitem
label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes = self.__creat_label(bboxes)
File "/home/amax/lf2/YOLOv4-pytorch/utils/datasets.py", line 173, in __creat_label
label[best_detect][yind, xind, best_anchor, 0:4] = bbox_xywh
IndexError: index 52 is out of bounds for axis 1 with size 52请问这是什么错误,应该如何解决?
索引超出数组长度,你可以检查一下train_annotation.txt里是否有类别超出分类类别数
from yolov4-pytorch.
[2020-10-08 15:59:54,446]-[train.py line:147]: === Epoch:[ 0/300],step:[3340/9999],img_size:[416],total_loss:152.8582|loss_ciou:32.0746|loss_conf:59.5948|loss_cls:61.1885|lr:0.0000
[2020-10-08 16:00:02,392]-[train.py line:147]: === Epoch:[ 0/300],step:[3350/9999],img_size:[416],total_loss:152.6998|loss_ciou:32.0685|loss_conf:59.5150|loss_cls:61.1160|lr:0.0000
Traceback (most recent call last):
File "train.py", line 211, in
fp_16=opt.fp_16).train()
File "train.py", line 113, in train
for i, (imgs, label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes) in enumerate(self.train_dataloader):
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/amax/anaconda3/envs/yolov5/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/amax/lf2/YOLOv4-pytorch/utils/datasets.py", line 50, in getitem
label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes = self.__creat_label(bboxes)
File "/home/amax/lf2/YOLOv4-pytorch/utils/datasets.py", line 173, in __creat_label
label[best_detect][yind, xind, best_anchor, 0:4] = bbox_xywh
IndexError: index 52 is out of bounds for axis 1 with size 52
请问这是什么错误,应该如何解决?索引超出数组长度,你可以检查一下train_annotation.txt里是否有类别超出分类类别数
您好,经检查train_annotation.txt分类数没有超出,还是会出现上述问题,但是不是总是出现,有时候能完整训练一个epoch
from yolov4-pytorch.
我也是这个错误,请问您解决了吗?
还没有解决
from yolov4-pytorch.
我也是这个错误,请问您解决了吗?
还没有解决
可以看看config/yolov4_config.py中"DATA_TYPE"参数的设置是否为coco 或 voc
from yolov4-pytorch.
我也是这个错误,请问您解决了吗?
还没有解决
可以看看config/yolov4_config.py中"DATA_TYPE"参数的设置是否为coco 或 voc
谢谢你,我是训练自己的数据集,格式转成了VOC,DATA_TYPE设置的是Custom,现在改成VOC试试。
from yolov4-pytorch.
我也是这个错误,请问您解决了吗?
还没有解决
可以看看config/yolov4_config.py中"DATA_TYPE"参数的设置是否为coco 或 voc
还是同样的问题
from yolov4-pytorch.
IndexError: index 52 is out of bounds for axis 1 with size 26我也遇到了这个错!!!!
from yolov4-pytorch.
我也遇到了同样的问题,请问有人解决了吗?
from yolov4-pytorch.
这个问题是因为这里的xind,yind有一个越界,比如训练图像大小设为608的话,第一级anchor的stride是8,所以特征图大小为76*76。这里的xind,yind的范围应该为[0-75],而计算出来的xind,yind会出现76,导致越界
from yolov4-pytorch.
在datasets.py 文件
from yolov4-pytorch.
在datasets.py 文件
应该如何改动呢?
from yolov4-pytorch.
如果是训练自己的数据的过程中出现上述错误,请使用作者提供的第三类别,将其中的类容更改为自己需要的类别及数量(即Customer_DATA),不要自己新建一个类别,即可解决上述报错
from yolov4-pytorch.
如果是训练自己的数据的过程中出现上述错误,请使用作者提供的第三类别,将其中的类容更改为自己需要的类别及数量(即Customer_DATA),不要自己新建一个类别,即可解决上述报错
我无论是改动VOC_DATA还是使用Customer_DATA都会出现这个问题.....
from yolov4-pytorch.
facing same issue ..
If anybody has figured out please share
from yolov4-pytorch.
have you guys check if the bbox is actually out of the image?
facing same issue ..
If anybody has figured out please share
from yolov4-pytorch.
你好,我也遇到了这个问题,然后我在datasets.py进行了改动,对xind/yind的上下限进行了判断:
if int(xind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(xind) < 0: xind = 0 if int(yind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(yind) < 0: yind = 0
但是训练出来效果很差,请问有朋友解决了吗?
from yolov4-pytorch.
你好,我也遇到了这个问题,然后我在datasets.py进行了改动,对xind/yind的上下限进行了判断:
if int(xind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(xind) < 0: xind = 0 if int(yind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(yind) < 0: yind = 0
但是训练出来效果很差,请问有朋友解决了吗?
Like I said. Check your bbox. You would find out that they are out of the image. Clip them to the bound and your are good to go.
from yolov4-pytorch.
你好,我也遇到了这个问题,然后我在datasets.py进行了改动,对xind/yind的上下限进行了判断:
if int(xind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(xind) < 0: xind = 0 if int(yind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(yind) < 0: yind = 0
但是训练出来效果很差,请问有朋友解决了吗?Like I said. Check your bbox. You would find out that they are out of the image. Clip them to the bound and your are good to go.
你好,因为我使用的是清洗后的公开数据集,按照方法转化为train_annotation和test_annotation后出现了大概一百多张左右的负坐标情况,我不清楚我对bbox的私人更改是否会影响到后续的评价指标,所以我按照上述对其越界进行了判断。
from yolov4-pytorch.
你好,我也遇到了这个问题,然后我在datasets.py进行了改动,对xind/yind的上下限进行了判断:
if int(xind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(xind) < 0: xind = 0 if int(yind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(yind) < 0: yind = 0
但是训练出来效果很差,请问有朋友解决了吗?Like I said. Check your bbox. You would find out that they are out of the image. Clip them to the bound and your are good to go.
你好,因为我使用的是清洗后的公开数据集,按照方法转化为train_annotation和test_annotation后出现了大概一百多张左右的负坐标情况,我不清楚我对bbox的私人更改是否会影响到后续的评价指标,所以我按照上述对其越界进行了判断。
I don't see this as problem. Since bbox out of the image is not valid. The negative coordinate are obviously generated by some tools.
Notice that during the data augmentation, translation and cropping, we all have to clip the bbox to the bound. This is really easy, you can write a script loop through the dataset and clip them according to the
from yolov4-pytorch.
你好,我也遇到了这个问题,然后我在datasets.py进行了改动,对xind/yind的上下限进行了判断:
if int(xind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(xind) < 0: xind = 0 if int(yind) > int(train_output_size[i]-1): xind = (train_output_size[i]-1).astype(np.int32) if int(yind) < 0: yind = 0
但是训练出来效果很差,请问有朋友解决了吗?Like I said. Check your bbox. You would find out that they are out of the image. Clip them to the bound and your are good to go.
你好,因为我使用的是清洗后的公开数据集,按照方法转化为train_annotation和test_annotation后出现了大概一百多张左右的负坐标情况,我不清楚我对bbox的私人更改是否会影响到后续的评价指标,所以我按照上述对其越界进行了判断。
I don't see this as problem. Since bbox out of the image is not valid. The negative coordinate are obviously generated by some tools.
Notice that during the data augmentation, translation and cropping, we all have to clip the bbox to the bound. This is really easy, you can write a script loop through the dataset and clip them according to the image size.
from yolov4-pytorch.
Related Issues (20)
- 问题 HOT 1
- RuntimeError: shape '[256, 256, 3, 3]' is invalid for input of size 16301 HOT 3
- 如何修改训练图片大小并且使用多尺度训练策略 HOT 2
- 关于CBAM的问题 HOT 2
- ValueError: not enough values to unpack (expected 3, got 0) HOT 2
- ValueError: not enough values to unpack (expected 3, got 2) HOT 1
- 可以放入负样本嘛 HOT 1
- CUDA_VISIBLE_DEVICES=0 nohup python -u train.py --weight_path weight/yolov4.weights --gpu_id 0 > nohup.log 2>&1 & HOT 2
- 训练好的模型百度网盘提取码是多少? HOT 1
- How to train model using dataset with another resolution?
- When I set the activate='relu', I met the RuntimeError. (Solved) HOT 1
- please provide best weights after training HOT 1
- Darknet pretrained weight file link corrupted HOT 1
- YOLOv4 with CBAM HOT 1
- Evaluator.py map issue with dataset HOT 5
- Error for detection HOT 1
- Error in detection HOT 2
- 多尺度训练,NUMBER_WORKERS
- Pretrained mobilev2 not accessible
- 姐姐,使用voc_best.pt导入失败呀
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov4-pytorch.