Skip to content

Commit

Permalink
Update predictor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RRobert92 committed Dec 28, 2024
1 parent 21053cd commit 5ca443b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tardis_em/utils/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __init__(
if isinstance(self.dir, str):
if isdir(join(self.dir, "amira")):
self.amira_check = True
self.dir_amira = join(dir_s, "amira")
self.dir_amira = join(self.dir, "amira")

# Searching for available images for prediction
self.available_format = (
Expand Down Expand Up @@ -1115,9 +1115,12 @@ def get_file_list(self):
if f.endswith(self.available_format)
and not f.endswith(self.omit_format)
]

if self.dir.endswith((".mrc", ".rec", ".map", ".tif", ".tiff", ".am")):
self.dir = getcwd()
out_ = [
i
for i in self.dir.split("/")
if not i.endswith((".mrc", ".rec", ".map", ".tif", ".tiff", ".am"))
]
self.dir = join("/".join(out_))

# Update Dir paths
self.output = join(self.dir, "temp", "Predictions")
Expand Down Expand Up @@ -1639,9 +1642,7 @@ def __call__(self, save_progres=False):
:rtype: tuple or list
"""
self.get_file_list()
print(self.predict_list)
sys.exit()


semantic_output, instance_output, instance_filter_output = [], [], []
for id_, i in enumerate(self.predict_list):
"""CNN Pre-Processing"""
Expand Down

0 comments on commit 5ca443b

Please sign in to comment.