We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作者您好,当我运行到这句代码时self.annopath = os.path.join(VOC_test_root, 'VOC2007', 'Annotations', '{:s}.xml'),recs[imagename] = self.parse_record(annopath.format(imagename))总是报错找不到.xml文件,显示路径有错误,不知道您有没有遇到类似的问题。`
self.annopath = os.path.join(VOC_test_root, 'VOC2007', 'Annotations', '{:s}.xml')
recs[imagename] = self.parse_record(annopath.format(imagename))
The text was updated successfully, but these errors were encountered:
import os import cv2 import json import math import pickle import numpy as np import xml.etree.ElementTree as ET VOC_test_root = './data/voc' apath = os.path.join(VOC_test_root, 'VOC2007', 'Annotations') annopath = os.path.join(VOC_test_root, 'VOC2007', 'Annotations','{:s}.xml') print(annopath.format('123456')) print(apath)
运行这段代码发现使用format会丢失路径,结果如下 123456.xml ./data/voc\VOC2007\Annotations 正常的结果应该是./data/voc\VOC2007\Annotations\123456.xml
Sorry, something went wrong.
Thank you for your interest in my project.
From your descriptions above, IMO, maybe this part {:s}.xml didn't work.
{:s}.xml
You can modify it to: f"{your_variable}.xml"
f"{your_variable}.xml"
No branches or pull requests
作者您好,当我运行到这句代码时
self.annopath = os.path.join(VOC_test_root, 'VOC2007', 'Annotations', '{:s}.xml')
,recs[imagename] = self.parse_record(annopath.format(imagename))
总是报错找不到.xml文件,显示路径有错误,不知道您有没有遇到类似的问题。`The text was updated successfully, but these errors were encountered: