Skip to content

Commit

Permalink
Progress output improved
Browse files Browse the repository at this point in the history
  • Loading branch information
PandapowrTR authored May 13, 2024
1 parent 7509e5f commit 0f762b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Data/Dominate/DominateLabeledImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ def deleteSimilarDetections(
"""
all_ = len(os.listdir(dataPath))
c = 0

def precessOutput():
nonlocal c
print(f"Checking similar detections {(c/all_)*100:.2f}% \r", end="")
c += 1


def processFile(args):
(
file,
Expand All @@ -214,7 +221,6 @@ def processFile(args):
deletedFiles,
files,
) = args
print(f"Checking similar detections {(c/all_)*100:.2f}% \r", end="")
if (
file.lower().endswith((".png", ".jpeg", ".jpg"))
and file not in deletedFiles
Expand All @@ -239,8 +245,6 @@ def processFile(args):
futures.append(future)

concurrent.futures.wait(futures)
nonlocal c
c += 1

def processLabel(l, img, args):
(
Expand Down

0 comments on commit 0f762b9

Please sign in to comment.