Commit 318e60e3 authored by E144069X's avatar E144069X

raise more informative error when not finding annotation of a video

parent 312ebc16
......@@ -438,10 +438,15 @@ def getGT(vidName,dataset):
datasetList = dataset.split("+")
datasetOfTheVideo = None
for dataset in datasetList:
if os.path.exists("../data/{}/annotations/{}_phases.csv".format(dataset,vidName)):
datasetOfTheVideo = dataset
if datasetOfTheVideo is None:
raise ValueError("Cannot find the annotation of the video {}".format(vidName))
if not os.path.exists("../data/{}/annotations/{}_targ.csv".format(datasetOfTheVideo,vidName)):
phases = np.genfromtxt("../data/{}/annotations/{}_phases.csv".format(datasetOfTheVideo,vidName),dtype=str,delimiter=",")
......
Markdown is supported
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