mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 10:26:36 +00:00
66987f4d95
convert from bbox oriented and pascal xml fixes
23 lines
584 B
Python
23 lines
584 B
Python
import yaml
|
|
|
|
config_file = 'config.yaml'
|
|
|
|
|
|
class Config:
|
|
|
|
def __init__(self):
|
|
with open(config_file, 'r') as f:
|
|
c = yaml.safe_load(f)
|
|
self.checkpoint = c['checkpoint']
|
|
self.images_dir = c['images_dir']
|
|
self.labels_dir = c['labels_dir']
|
|
f.close()
|
|
|
|
def write(self):
|
|
with open(config_file, 'w') as f:
|
|
d = dict(checkpoint=self.checkpoint,
|
|
images_dir=self.images_dir,
|
|
labels_dir=self.labels_dir)
|
|
yaml.safe_dump(d, f)
|
|
f.close()
|