Traceback (most recent call last):WARNING: Dataset not found, nonexistent paths:

简介: 这篇文章描述了在使用YOLOv5进行训练时遇到的"Dataset not found"错误,分析了可能的原因,包括网络连接问题和数据集路径配置错误,并提供了相应的解决方法,如检查网络设置和确认数据集文件的存放位置。

WARNING: Dataset not found, nonexistent paths:
[‘C:\Users\29810\Desktop\coco128\images\train2017’] Downloading
https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip
… Traceback (most recent call last): File
“C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
1350, in do_open
encode_chunked=req.has_header(‘Transfer-encoding’)) File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line 1281,
in request
self._send_request(method, url, body, headers, encode_chunked) File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line
1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked) File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line 1276,
in endheaders
self._send_output(message_body, encode_chunked=encode_chunked) File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line
1036, in _send_output
self.send(msg) File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line 976,
in send
self.connect() File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line 1443,
in connect
super().connect() File “C:\Users\29810\anaconda3\envs\pytorch\lib\http\client.py”, line 948,
in connect
(self.host,self.port), self.timeout, self.source_address) File “C:\Users\29810\anaconda3\envs\pytorch\lib\socket.py”, line 728, in
create_connection
raise err File “C:\Users\29810\anaconda3\envs\pytorch\lib\socket.py”, line 716, in
create_connection
sock.connect(sa) TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File
“C:/Users/29810/Desktop/yolov5-5.0/train.py”, line 575, in
train(hyp, opt, device, tb_writer) File “C:/Users/29810/Desktop/yolov5-5.0/train.py”, line 97, in train
check_dataset(data_dict) # check File “C:\Users\29810\Desktop\yolov5-5.0\utils\general.py”, line 167, in
check_dataset
torch.hub.download_url_to_file(s, f) File “C:\Users\29810\anaconda3\envs\pytorch\lib\site-packages\torch\hub.py”,
line 419, in download_url_to_file
u = urlopen(req) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
222, in urlopen
return opener.open(url, data, timeout) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
525, in open
response = self._open(req, data) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
543, in _open
‘_open’, req) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
503, in _call_chain
result = func(*args) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
1393, in https_open
context=self._context, check_hostname=self._check_hostname) File “C:\Users\29810\anaconda3\envs\pytorch\lib\urllib\request.py”, line
1352, in do_open
raise URLError(err) urllib.error.URLError:

Process finished with exit code 1

我在查找了许多之后发现很多事情都是玄学解法我觉得不应该,所以,我想发的我出来。
这个是,1我没有科学的去上网
2、没有对应yaml,的训练集

解决方法:查看一下你设置的训练集的位置对不对,直接打开在github上下载的yolov项目,看看相对位置内是否存在,那个训练集
在这里插入图片描述
比如这个就去平级位置,看看coco128是否放在同级位置

相关文章
成功解决ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle Environment objects
成功解决ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle Environment objects
成功解决ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle Environment objects
|
4月前
|
Linux Windows Python
ForkingPickler(file, protocol).dump(obj) TypeError: can‘t pickle Environment objects
ForkingPickler(file, protocol).dump(obj) TypeError: can‘t pickle Environment objects
87 0
|
TensorFlow 算法框架/工具 Python
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
|
机器学习/深度学习 Windows
raise RuntimeError(‘Error(s) in loading state_dict for {}:\n\t{}‘.format( RuntimeError: Error(s)..报错
即load_state_dict(fsd,strict=False) 属性strict;当strict=True,要求预训练练权重层数的键值与新构建的模型中的权重层数名称完全吻合;
1463 0
|
机器学习/深度学习 数据采集
ValueError: Found input variables with inconsistent numbers of samples: [140, 1120] 怎么解决?
这个错误通常发生在机器学习模型的训练中,它表示输入数据的样本数量不一致。在你的情况下,你的输入数据中有两个变量,一个变量的样本数量为140,另一个变量的样本数量为1120,因此这个错误就出现了。 为了解决这个问题,你需要确保所有输入变量的样本数量是相同的。你可以通过以下几种方式来解决这个问题: 检查数据:检查数据是否正确加载,可能会导致数据样本数量不一致。 数据清洗:检查是否有重复的样本或者缺失的样本,如果有则需要对数据进行清洗。 数据对齐:如果你使用了多个数据源,那么你需要对它们进行对齐以确保它们的样本数量一致。 数据重采样:如果数据中有不均衡的样本数量,你可以考虑使用数据重采样方
816 0
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
|
计算机视觉
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
|
数据格式
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling
188 0
ValueError: This model has not yet been built. Build the model first by calling `build()` or calling