Skip to content
New issue

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

Training our own data #439

Closed
normansiboro opened this issue Nov 22, 2017 · 2 comments
Closed

Training our own data #439

normansiboro opened this issue Nov 22, 2017 · 2 comments

Comments

@normansiboro
Copy link

normansiboro commented Nov 22, 2017

I got this error when I was training my data set. I already followed every step

Enter training ...

cfg/tiny-yolo-voc-1c.cfg parsing train/Annotations
Parsing for ['macncheese']
Traceback (most recent call last):
File "flow", line 6, in
cliHandler(sys.argv)
File "D:\MDPSystemSupport\OJT II\Python Project\Tensorflow\darkflow\darkflow\cli.py", line 29, in cliHandler
print('Enter training ...'); tfnet.train()
File "D:\MDPSystemSupport\OJT II\Python Project\Tensorflow\darkflow\darkflow\net\flow.py", line 39, in train
for i, (x_batch, datum) in enumerate(batches):
File "D:\MDPSystemSupport\OJT II\Python Project\Tensorflow\darkflow\darkflow\net\yolo\data.py", line 97, in shuffle
data = self.parse()
File "D:\MDPSystemSupport\OJT II\Python Project\Tensorflow\darkflow\darkflow\net\yolo\data.py", line 18, in parse
dumps = pascal_voc_clean_xml(ann, meta['labels'], exclusive)
File "D:\MDPSystemSupport\OJT II\Python Project\Tensorflow\darkflow\darkflow\utils\pascal_voc_clean_xml.py", line 22, in pascal_voc_clean_xml
annotations = glob.glob(str(annotations)+'*.xml')
File "C:\Python35\lib\glob.py", line 20, in glob
return list(iglob(pathname, recursive=recursive))
File "C:\Python35\lib\glob.py", line 54, in _iglob
yield from glob1(dirname, basename)
File "C:\Python35\lib\glob.py", line 90, in glob1
return fnmatch.filter(names, pattern)
File "C:\Python35\lib\fnmatch.py", line 52, in filter
match = _compile_pattern(pat)
File "C:\Python35\lib\fnmatch.py", line 46, in _compile_pattern
return re.compile(res).match
File "C:\Python35\lib\re.py", line 224, in compile
return _compile(pattern, flags)
File "C:\Python35\lib\re.py", line 293, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Python35\lib\sre_compile.py", line 536, in compile
p = sre_parse.parse(p, flags)
File "C:\Python35\lib\sre_parse.py", line 829, in parse
p = _parse_sub(source, pattern, 0)
File "C:\Python35\lib\sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
File "C:\Python35\lib\sre_parse.py", line 575, in _parse
raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range i-a at position 179

I use https://github.com/tzutalin/labelImg to label my images
I want to train my data only for one class

@t-fernandez
Copy link

Did you get this issue resolved? Im having the same problem?

@normansiboro
Copy link
Author

normansiboro commented Dec 4, 2017

I just changed the line annotations = glob.glob(str(annotations)+'*.xml') to annotations = glob.glob('*.xml') in the darkflow\utils\pascal_voc_clean_xml.py file as mention here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants