Commit 41088423 authored by lucas_miranda's avatar lucas_miranda
Browse files

Fixed a bug when loading files other than .h5

parent d7c98303
Pipeline #87325 passed with stage
in 17 minutes and 6 seconds
......@@ -64,12 +64,16 @@ class project:
):
self.path = path
self.video_path = self.path + "/Videos/"
self.table_path = self.path + "/Tables/"
self.table_format = table_format
self.video_path = os.path.join(self.path, "Videos")
self.table_path = os.path.join(self.path, "Tables")
self.table_format = table_format
if self.table_format == "autodetect":
self.table_format = os.listdir(os.path.join(self.path, "Tables"))[0][-3:]
ex = os.listdir(self.table_path)[0]
if ".h5" in ex:
self.table_format = ".h5"
elif ".csv" in ex:
self.table_format = ".csv"
self.videos = sorted(
[
......@@ -82,7 +86,7 @@ class project:
[
tab
for tab in deepof.utils.os.listdir(self.table_path)
if tab.endswith(table_format)
if tab.endswith(self.table_format)
]
)
self.animal_ids = animal_ids
......
Supports Markdown
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