Skip to content
Snippets Groups Projects
Commit fde2934f authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[database] removed unnecessary stuff while loading data

parent 0468a0fa
No related branches found
No related tags found
1 merge request!77CASIA-SURF database
Pipeline #26369 passed
...@@ -66,23 +66,11 @@ class CasiaSurfPadFile(VideoPadFile): ...@@ -66,23 +66,11 @@ class CasiaSurfPadFile(VideoPadFile):
Returns Returns
------- -------
dict: dict:
"video" data (i.e. one frame) for multiple streams stored in the dictionary. image data for multiple streams stored in the dictionary.
The structure of the dictionary: ``data={"stream1_name" : FrameContainer1, "stream2_name" : ...}`` The structure of the dictionary: ``data={"stream1_name" : numpy array, "stream2_name" : numpy array}``
Names of the streams are defined in ``self.stream_type``. Names of the streams are defined in ``self.stream_type``.
""" """
return self.s.load(directory, extension, modality=self.stream_type)
# get the dict of numpy array
data = self.s.load(directory, extension, modality=self.stream_type)
# convert that to dict of FrameContainer
data_to_return = {}
for k in data.keys():
frame_container = FrameContainer()
for idx, item in enumerate(data[k]):
frame_container.add(idx, item) # add frame to FrameContainer
data_to_return[k] = frame_container
return data_to_return
class CasiaSurfPadDatabase(PadDatabase): class CasiaSurfPadDatabase(PadDatabase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment