Commit 689c2089 authored by Sikhin VC's avatar Sikhin VC

added file copy logic

parent ec5f3d4f
...@@ -34,13 +34,14 @@ class ModelOptimization: ...@@ -34,13 +34,14 @@ class ModelOptimization:
current_directory = os.getcwd() current_directory = os.getcwd()
logger.info(f"Current directory is : {current_directory}")
build_path = os.path.join(current_directory, "yolov5", "build")
os.mkdir(build_path)
weight_name_with_extension = os.path.basename(self.weight_path) weight_name_with_extension = os.path.basename(self.weight_path)
weight_name, extension = os.path.splitext(weight_name_with_extension) weight_name, extension = os.path.splitext(weight_name_with_extension)
src = f"{current_directory}/yolov5/build/" src = f"{current_directory}/yolov5/build/"
shutil.copy(self.weight_path, src) shutil.copy(self.weight_path, src)
logger.info(f"Current directory is : {current_directory}")
build_path = os.path.join(current_directory, "yolov5", "build")
os.mkdir(build_path)
logger.info(f"Created build folder") logger.info(f"Created build folder")
os.chdir('yolov5/build') os.chdir('yolov5/build')
logger.info("Running CMake command") logger.info("Running CMake command")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment