DALI: VideoReader Loading Data Incorrectly
Running my own defined pipeline as well as the Video Data Loading Tuorial, I am unable to load my videos as expected. I know these videos aren’t corrupt, as I’m able to view them on a media player.
Here is a minimal example (assuming imported libraries):
class VideoPipe(Pipeline):
def __init__(self, batch_size, num_threads, device_id, data, shuffle):
super().__init__(batch_size, num_threads, device_id, seed=16)
self.input = ops.VideoReader(device="gpu", file_list=data, sequence_length=8, random_shuffle=shuffle, initial_fill=11)
def define_graph(self):
output, labels = self.input(name="Reader")
return output, labels
pipe = VideoPipe(batch_size=2, num_threads=2, device_id=0, data='video_files.csv', shuffle=False)
pipe.build()
sequences_out, labels = pipe.run()
sequences_out = sequences_out.as_cpu().as_array()
labels = labels.as_cpu().as_array()
plt.imshow(sequences_out[0][0])
This results in the following:
video_files.csv
is defined as such:
$ head video_files.csv
/home/ubuntu/data/train_sample_videos/bmehkyanbj.mp4 1
/home/ubuntu/data/train_sample_videos/eqnoqyfquo.mp4 0
/home/ubuntu/data/train_sample_videos/dnyvfblxpm.mp4 1
...
I’m attaching an example of the first file for reference. This is on Cuda 10.1, Python 3.6.10, DALIv0.18.0 (also tried the nightly builds). Am I doing anything wrong? Please let me know if you need any more information!
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 20 (12 by maintainers)
I think I have reproduced it. I will keep you posted.
@syb0rg - YCbCr looks good, I will check if anything can go wrong with conversion to RGB and get back to you.