Comments (1)
Hi @Tomsen1410,
Can you provide a standalone and selfcontained repro? Something like this works for me:
docker run --rm -ti --gpus 'all,"capabilities=compute,utility,video"' ubuntu:22.04
apt update && apt install -y vim wget python3-pip
pip install --extra-index-url https://pypi.nvidia.com/ --upgrade nvidia-dali-cuda120 torch numpy
wget https://github.com/NVIDIA/DALI_extra/raw/main/db/video/sintel/sintel_trailer-720p.mp4
python3 test.py
import nvidia.dali.fn as fn
from nvidia.dali import pipeline_def
from nvidia.dali.plugin.pytorch import DALIRaggedIterator, LastBatchPolicy
files = ["sintel_trailer-720p.mp4"]
batch_size = 3
device = "gpu"
device_id = 0
n_threads = 4
@pipeline_def
def read_decode_pipe(filenames, device="cpu"):
video = fn.readers.video(
sequence_length=3, filenames=filenames, pad_sequences=True, device=device
)
source_info = fn.get_property(video, key="source_info")
return video, source_info
pipe = read_decode_pipe(
files,
batch_size=batch_size,
device=device,
device_id=device_id,
num_threads=n_threads,
)
pipe.build()
it = DALIRaggedIterator(
pipe,
output_map=["snippets", "paths"],
output_types=[DALIRaggedIterator.SPARSE_LIST_TAG, DALIRaggedIterator.SPARSE_LIST_TAG],
auto_reset=False,
last_batch_policy=LastBatchPolicy.PARTIAL,
)
for data in it:
snippets = data[0]["snippets"]
bytes_paths = data[0]["paths"] # <--- might not yet be filled with data
str_paths = [path.cpu().numpy().tobytes().decode() for path in bytes_paths]
print(str_paths)
from dali.
Related Issues (20)
- Extracting properties from a list of DataNodes HOT 5
- A100 hardware decoder HOT 1
- Extract motion vectors HOT 7
- Segmentation fault when using 'mixed' HOT 5
- Bbox Pruning Too Aggressive? HOT 5
- Indexing video with binary mask HOT 1
- 16 bit gray scale Image read error HOT 1
- COCO Reader pixelwise_masks Emtpy Output HOT 7
- Dali on Jetson: nvidia.dali.fn.readers.video_resize is missing HOT 4
- Numpy reader test (GDS) HOT 4
- How to add a scalar value to the loader? HOT 1
- Can DALI be integrated into HuggingFace Trainer? HOT 9
- Bug in creating `TensorGPU` when `stream` key is `None` in CUDA array interface HOT 2
- Configure max image size HOT 3
- Webdataset reader behavior with many sources HOT 1
- ModuleNotFoundError: No module named 'nvidia.dali.python_function_plugin' HOT 3
- Speed up Dino with DALI HOT 3
- error using webdataset
- webdataset cannot stop cycling at end of epoch HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dali.