Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Oct 15, 2024
1 parent 6e0edf0 commit 1cd244e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def create_single_class_dataset(path="../data/sm3"): # from utils import *; cre
os.system(f"mkdir {path}_1cls")


def flatten_recursive_folders(path="../../Downloads/data/sm4/"): # from utils import *; flatten_recursive_folders()
def flatten_recursive_folders(path="../../Downloads/data/sm4/"): # from utils import *; flatten_recursive_folders()
"""Flattens nested folders in 'path/images' and 'path/json' into single 'images_flat' and 'json_flat'
directories.
"""
Expand Down Expand Up @@ -162,7 +162,7 @@ def flatten_recursive_folders(path="../../Downloads/data/sm4/"): # from utils

os.system(f"cp '{json}' '{json_new}'")
os.system(f"cp '{image}' '{image_new}'")
# cv2.imwrite(str(image_new), cv2.imread(str(image)))
# cv2.imwrite(str(image_new), cv2.imread(str(image)))

print(f"Flattening complete: {n:g} jsons and images")

Expand Down

0 comments on commit 1cd244e

Please # to comment.