Use script directory as base path for portability
This commit is contained in:
@ -113,11 +113,14 @@ def get_or_create_logo_name(cursor: sqlite3.Cursor, name: str) -> int:
|
||||
|
||||
|
||||
def main():
|
||||
# Paths
|
||||
dataset_dir = Path("/data/dev.python/logo_test/LogoDet-3K")
|
||||
reference_dir = Path("/data/dev.python/logo_test/reference_logos")
|
||||
test_images_dir = Path("/data/dev.python/logo_test/test_images")
|
||||
db_path = Path("/data/dev.python/logo_test/test_data_mapping.db")
|
||||
# Use script directory as base path for portability
|
||||
base_dir = Path(__file__).parent.resolve()
|
||||
|
||||
# Paths relative to script location
|
||||
dataset_dir = base_dir / "LogoDet-3K"
|
||||
reference_dir = base_dir / "reference_logos"
|
||||
test_images_dir = base_dir / "test_images"
|
||||
db_path = base_dir / "test_data_mapping.db"
|
||||
|
||||
# Ensure output directories exist
|
||||
reference_dir.mkdir(exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user