Expanding low-level samples to several high-level samples in the bob.bio framework

8 views
Skip to first unread message

Amir Mohammadi

unread,
Oct 6, 2016, 5:49:50 AM10/6/16
to bob-devel
Hi,

I want to write a high-level implementation of bob.db.replaymobile: https://gitlab.idiap.ch/bob/bob.db.replaymobile in bob.bio.face (or bob.bio.video if it is possbile).

I know how to do that but the catch is in the low-level API each sample is a video file but for using it in verification, I want to use each video as 10 samples (picking 10 frames out of approximately 300 frames in each video) so that the number of samples would increase.

Have you done something similar? Where is the best place to touch things? I was thinking handling this in the wrapper layer (BioDatabase and BioFile).

Thank you,
Amir

Pavel Korshunov

unread,
Oct 6, 2016, 6:03:23 AM10/6/16
to bob-...@googlegroups.com
Hi Amir,

You can try to see how it is done in bob.bio.video. Is this implementation of VideoBobFile (https://gitlab.idiap.ch/bob/bob.bio.video/blob/master/bob/bio/video/database/database.py) is something that you are looking for?

cheers,
-pavel


--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Pavel Korshunov
Biometric group
Idiap Research Institute
Rue Marconi 19
CH - 1920 Martigny
Switzerland

Room: 207

Amir Mohammadi

unread,
Oct 6, 2016, 9:07:02 AM10/6/16
to bob-...@googlegroups.com
Hi Pavel,

The problem with bob.bio.video is that it treats each video as a sample while I want to treat each video as say 30 samples.

Best,
Amir

On Thu, Oct 6, 2016 at 12:03 PM Pavel Korshunov <pavel.k...@idiap.ch> wrote:
Hi Amir,

You can try to see how it is done in bob.bio.video. Is this implementation of VideoBobFile (https://gitlab.idiap.ch/bob/bob.bio.video/blob/master/bob/bio/video/database/database.py) is something that you are looking for?

cheers,
-pavel

On Thu, Oct 6, 2016 at 11:49 AM, Amir Mohammadi <183....@gmail.com> wrote:
Hi,

I want to write a high-level implementation of bob.db.replaymobile: https://gitlab.idiap.ch/bob/bob.db.replaymobile in bob.bio.face (or bob.bio.video if it is possbile).

I know how to do that but the catch is in the low-level API each sample is a video file but for using it in verification, I want to use each video as 10 samples (picking 10 frames out of approximately 300 frames in each video) so that the number of samples would increase.

Have you done something similar? Where is the best place to touch things? I was thinking handling this in the wrapper layer (BioDatabase and BioFile).

Thank you,
Amir

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/

---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Dr. Pavel Korshunov
Biometric group
Idiap Research Institute
Rue Marconi 19
CH - 1920 Martigny
Switzerland

Room: 207

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/

---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.

Manuel Günther

unread,
Oct 6, 2016, 12:02:51 PM10/6/16
to bob-devel
Dear Amir,

although this might be a little bit more difficult to implement, there is definitely a way to do that. The easiest way would be to have a several ``BioFile`` objects for the same physical video file, each of them containing a different frame, a different ``file_id`` and a different ``path``. This might contain a little bit of overhead since every video would be loaded several times. Other solutions are also possible, but might be more complicated to implement.

Do you think this would be feasible?

Manuel

Amir Mohammadi

unread,
Oct 11, 2016, 11:18:02 AM10/11/16
to bob-devel
but the problem is that it is trying to open one video file several times at the same time and failing because the file is locked.

I think an easier solution would be to extract images out of these video files but I don't want to do that yet.

Any other ideas?

Thanks,
Amir


--

Manuel Günther

unread,
Oct 11, 2016, 11:58:30 AM10/11/16
to bob-devel
Amir, why are you trying to implement this functionality into bob.bio.face? I think we already have a solution for your issue in bob.bio.video. In fact, You would add a dependency from bob.bio.face to bob.io.video, which is not yet there, and I think not required/wanted.

I am not familiar with that database. Is the idea to extract different probe samples from the same video (i.e., to get several scores for one video)? If no, the FrameSelector of bob.bio.video should be completely sufficient for your problem. 
However, when you need several probes per video, a solution reading the video once, i.e., having a base object that holds the raw video file, and has functions to query frames would be desirable. However, to implement this might not be that simple, as you don't want to hold all the videos in memory at the same time. Hence, functionality to open and close videos should be provided.
Reply all
Reply to author
Forward
0 new messages