mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 22:46:35 +00:00
add checkpoints and config system
convert from bbox oriented and pascal xml fixes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user