mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 21:56:36 +00:00
Refactor configuration and update test structure for improved clarity
- Updated `.gitignore` to remove committed test fixture data exclusions. - Increased batch size in `config.test.yaml` from 4 to 128 for training. - Simplified directory structure in `config.yaml` by removing unnecessary data paths. - Adjusted paths in `augmentation.py`, `dataset-visualiser.py`, and `exports.py` to align with the new configuration structure. - Enhanced `annotation_queue_handler.py` to utilize the updated configuration for directory management. - Added CSV logging of test results in `conftest.py` for better test reporting. These changes streamline the configuration management and enhance the testing framework, ensuring better organization and clarity in the project.
This commit is contained in:
@@ -20,16 +20,16 @@ def _prepare_form_dataset(
|
||||
constants_patch(tmp_path)
|
||||
import train
|
||||
|
||||
proc_img = Path(c_mod.config.processed_images_dir)
|
||||
proc_lbl = Path(c_mod.config.processed_labels_dir)
|
||||
proc_img.mkdir(parents=True, exist_ok=True)
|
||||
proc_lbl.mkdir(parents=True, exist_ok=True)
|
||||
data_img = Path(c_mod.config.images_dir)
|
||||
data_lbl = Path(c_mod.config.labels_dir)
|
||||
data_img.mkdir(parents=True, exist_ok=True)
|
||||
data_lbl.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
imgs = sorted(fixture_images_dir.glob("*.jpg"))[:count]
|
||||
for p in imgs:
|
||||
stem = p.stem
|
||||
shutil.copy2(fixture_images_dir / f"{stem}.jpg", proc_img / f"{stem}.jpg")
|
||||
dst = proc_lbl / f"{stem}.txt"
|
||||
shutil.copy2(fixture_images_dir / f"{stem}.jpg", data_img / f"{stem}.jpg")
|
||||
dst = data_lbl / f"{stem}.txt"
|
||||
shutil.copy2(fixture_labels_dir / f"{stem}.txt", dst)
|
||||
if stem in corrupt_stems:
|
||||
dst.write_text("0 1.5 0.5 0.1 0.1\n", encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user