Update
This commit is contained in:
parent
6ec04a4cca
commit
e3547abf75
|
@ -1,5 +1,3 @@
|
|||
from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
|
@ -8,7 +6,7 @@ class Args:
|
|||
def get_args_string(self) -> str:
|
||||
string = ''
|
||||
for key, value in self.__dict__.items():
|
||||
if not isinstance(value, Configuration.Train.OtherHyps) and value is not None:
|
||||
if not isinstance(value, Configuration.Train.OtherHyps) and value is not None:
|
||||
if key == 'img-size':
|
||||
string += f' --{key} {value.split(" ")[0]} {value.split(" ")[1]}'
|
||||
elif type(value) == bool:
|
||||
|
@ -23,6 +21,7 @@ class Args:
|
|||
|
||||
return string
|
||||
|
||||
|
||||
class Configuration:
|
||||
class Train(Args):
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ def move_training_results_to_experiments_dir(config):
|
|||
|
||||
|
||||
#for test purposes only
|
||||
shutil.copy2('/home/tomekb/yolov3/experiments/1/best.pt', training_results_dir_path)
|
||||
|
||||
return weights_path, experiment_names_path, training_results_dir_path
|
||||
|
||||
|
@ -76,6 +75,7 @@ def call_detection_script(config, weights_path, names_path, dir):
|
|||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,shell=True)
|
||||
for line in io.TextIOWrapper(process.stdout, encoding="utf-8"): # print output of process to console
|
||||
print(line)
|
||||
|
||||
return detect_output_dir
|
||||
|
||||
|
||||
|
@ -91,7 +91,6 @@ def call_generate_confussion_matrix(detect_output_dir, config, names_path, train
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
config = Configuration()
|
||||
|
||||
train_cmd = call_training_script(config)
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
/home/tomekb/miniconda3/envs/conda3.7/bin/python -u /home/tomekb/yolov3/our_scripts/run_yolov3_process.py \
|
||||
--epochs 50 \
|
||||
--batch-size 8 \
|
||||
--cfg /cfg/yolov3-spp-18cls.cfg \
|
||||
--data ./data/widok01-11.data \
|
||||
--multi-scale \
|
||||
--img-size 512 896 \
|
||||
`# --cache-images` \
|
||||
--adam \
|
||||
--device 0 \
|
||||
`# poniżej parametry do detect.py` \
|
||||
--source /home/michall/yolov3/data/widok01-11_test_labels.txt \
|
||||
--test-img-size 1024 \
|
||||
--conf-thres 0.3 \
|
||||
--iou-thres 0.6 \
|
||||
--save-txt \
|
||||
`# poniżej parametry do generate-confussion-matrix.js` \
|
||||
--labels-dir ./data/widok01-11_labels
|
||||
|
Loading…
Reference in New Issue