add checkpoints and config system

convert from bbox oriented and pascal xml
fixes
This commit is contained in:
Alex Bezdieniezhnykh
2024-06-18 21:32:15 +03:00
parent b7b8b8fd27
commit 66987f4d95
6 changed files with 182 additions and 59 deletions
+22
View File
@@ -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()