Dataset Viewer
View in Dataset Viewer
Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code: ConfigNamesError Exception: FileNotFoundError Message: Couldn't find a dataset script at /src/services/worker/hf-internal-testing/spaghetti-video-8-frames/spaghetti-video-8-frames.py or any data file in the same directory. Couldn't find 'hf-internal-testing/spaghetti-video-8-frames' on the Hugging Face Hub either: FileNotFoundError: No (supported) data files or dataset script found in hf-internal-testing/spaghetti-video-8-frames. Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 55, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1508, in dataset_module_factory raise FileNotFoundError( FileNotFoundError: Couldn't find a dataset script at /src/services/worker/hf-internal-testing/spaghetti-video-8-frames/spaghetti-video-8-frames.py or any data file in the same directory. Couldn't find 'hf-internal-testing/spaghetti-video-8-frames' on the Hugging Face Hub either: FileNotFoundError: No (supported) data files or dataset script found in hf-internal-testing/spaghetti-video-8-frames.
Need help to make the dataset viewer work? Open a discussion for direct support.
YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/datasets-cards)
This is the code that was used to generate this video:
from decord import VideoReader, cpu
from huggingface_hub import hf_hub_download
import numpy as np
np.random.seed(0)
def sample_frame_indices(clip_len, frame_sample_rate, seg_len):
converted_len = int(clip_len * frame_sample_rate)
end_idx = np.random.randint(converted_len, seg_len)
start_idx = end_idx - converted_len
indices = np.linspace(start_idx, end_idx, num=clip_len)
indices = np.clip(indices, start_idx, end_idx - 1).astype(np.int64)
return indices
file_path = hf_hub_download(
repo_id="nielsr/video-demo", filename="eating_spaghetti.mp4", repo_type="dataset"
)
vr = VideoReader(file_path, num_threads=1, ctx=cpu(0))
# sample 8 frames
vr.seek(0)
indices = sample_frame_indices(clip_len=8, frame_sample_rate=1, seg_len=len(vr))
buffer = vr.get_batch(indices).asnumpy()
# create a list of NumPy arrays
video = [buffer[i] for i in range(buffer.shape[0])]
video_numpy = np.array(video)
with open('spaghetti_video_8_frames.npy', 'wb') as f:
np.save(f, video_numpy)
- Downloads last month
- 2