Dataset Viewer (First 5GB)
Auto-converted to Parquet
pose-dwpose.npz
dict
json
dict
mp4
unknown
pose-mediapipe.pose
unknown
__key__
stringlengths
1
4
__url__
stringclasses
5 values
{"confidences":[[[0.9760064482688904,1.0,0.9939709305763245,1.087093472480774,0.9810596108436584,1.0(...TRUNCATED)
{"duration_sec":1.758621,"fps":29.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","na(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAm6Om1kYXQAAAGzABAHAAABthBgkMJsn9xUFmOXT+NRt/G238b(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0582154989242554,1.0,1.043821930885315,1.0815386772155762,0.9145272970199585,1.0(...TRUNCATED)
{"duration_sec":2.82,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlABqfEW1kYXQAAAGzABAHAAABthAwWMVNskF+PtvkbbfI+2+Rvt/(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
10
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0465205907821655,1.0,1.0501631498336792,1.051130771636963,0.9216429591178894,1.0(...TRUNCATED)
{"duration_sec":2.68,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAPssptZGF0AAcUmAAAAlUGBf//UdxF6b3m2Ui3lizYINk(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
100
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.050309658050537,1.0,1.0437495708465576,1.077257513999939,0.9480156898498535,1.01(...TRUNCATED)
{"duration_sec":4.14,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlACt7sG1kYXQAAAGzABAHAAABthAwWUMD3JBQRBDG223HXbjRtt8(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1000
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0194149017333984,1.0,1.0270971059799194,1.008429765701294,1.0171412229537964,1.0(...TRUNCATED)
{"duration_sec":2.758621,"fps":29.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","na(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlABk5rm1kYXQAAAGzABAHAAABthBgkYWG2QClG238fbfI22/jbb1(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1001
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0239825248718262,1.0,1.0219745635986328,1.0152006149291992,0.993251621723175,1.0(...TRUNCATED)
{"duration_sec":4.074,"fps":29.583333333333332,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3(...TRUNCATED)
"AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAYhd1tZGF03gIATGF2YzYwLjMxLjEwMgBCIAjBGDgAAAJ(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1002
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0418486595153809,1.0,1.0302292108535767,1.0608776807785034,0.893444299697876,1.0(...TRUNCATED)
{"duration_sec":3.32,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlACAquW1kYXQAAAGzABAHAAABthAwWMXNskF2Ntvsfbfxtt6x9ty(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1003
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0379385948181152,1.0,1.0304505825042725,1.0643585920333862,0.9021380543708801,1.(...TRUNCATED)
{"duration_sec":2.42,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlABYJPG1kYXQAAAGzABAHAAABthAwSMUtsgFmPtv4+2/j7b+Ntv4(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1004
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[1.0299394130706787,1.0,1.0544565916061401,1.0603729486465454,0.9859521985054016,1.(...TRUNCATED)
{"duration_sec":3.76,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAB4RZm1kYXQAAAGzABAHAAABthAwWMGFswqCiPP5JG238bbfxtt(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1005
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
{"confidences":[[[0.9913249611854553,1.0,1.0525476932525635,1.0810465812683105,1.0447579622268677,1.(...TRUNCATED)
{"duration_sec":3.56,"fps":50.0,"height":1080,"language":{"BCP-47":"ins-IN","ISO639-3":"ins","name":(...TRUNCATED)
"AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlACCbcW1kYXQAAAGzABAHAAABthAwSMQdsUBejbb+PNv4+2/jbb5(...TRUNCATED)
"zcxMPoAHOAQAAAUADgBQT1NFX0xBTkRNQVJLUwQAWFlaQyEAIwABAAQATk9TRQ4ATEVGVF9FWUVfSU5ORVIIAExFRlRfRVlFDgB(...TRUNCATED)
1006
"hf://datasets/bridgeconn/sign-dictionary-isl@67137fb460743fb24a2728b1335d3b391bca32e3/shard_00001-t(...TRUNCATED)
End of preview. Expand in Data Studio

Dataset Card for Sign Dictionary Dataset

This dataset contains Indian sign language videos with one gloss per video. There are 3077 seperate lex items or glosses included. The dataset is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).

Dataset Details

There is a total of 2.5 hours of sign videos.

How to use

import webdataset as wds
import numpy as np
import json
import tempfile
import os
import cv2


def main():
    buffer_size = 1024
    dataset = (
        wds.WebDataset(
            "https://huggingface.co/datasets/bridgeconn/sign-dictionary-isl/resolve/main/shard_{00001..00002}-train.tar",
            shardshuffle=False)
        .shuffle(buffer_size)
        .decode()
    )
    for sample in dataset:
        ''' Each sample contains:
             'mp4', 
             'pose-dwpose.npz', 'pose-mediapipe.pose'
             and 'json'
        '''
        # print(sample.keys())

        # JSON metadata
        json_data = sample['json']
        print(json_data['filename']) 
        print(json_data['transcripts'])
        print(json_data['glosses'])

        # main video
        mp4_data = sample['mp4']
        process_video(mp4_data)
        
        # dwpose results
        dwpose_coords = sample["pose-dwpose.npz"] 

        frame_poses = dwpose_coords['frames'].tolist()
        print(f"Frames in dwpose coords: {len(frame_poses)} poses")
        print(f"Pose coords shape: {len(frame_poses[0][0])}")
        print(f"One point looks like [x,y]: {frame_poses[0][0][0]}")

        # mediapipe results in .pose format
        pose_format_data = sample["pose-mediapipe.pose"]
        process_poseformat(pose_format_data)

        break


def process_poseformat(pose_format_data):
    from pose_format import Pose
    temp_file = None
    try:
        with tempfile.NamedTemporaryFile(suffix=".pose", delete=False) as tmp:
            tmp.write(pose_format_data)
            temp_file = tmp.name

        data_buffer = open(temp_file, "rb").read()
        pose = Pose.read(data_buffer)

        print(f"Mediapipe results from pose-format: {pose.body.data.shape}")
    except Exception as e:
        print(f"Error processing pose-format: {e}")
    finally:
        if temp_file and os.path.exists(temp_file):
            os.remove(temp_file) # Clean up the temporary file


def process_video(mp4_data):
    print(f"Video bytes length: {len(mp4_data)} bytes")

    temp_file = None
    try:
        # Processing video from temporary file
        with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmp:
            tmp.write(mp4_data)
            temp_file = tmp.name

        cap = cv2.VideoCapture(temp_file)

        if not cap.isOpened():
            raise IOError(f"Could not open video file: {temp_file}")

        # Example: Get video metadata
        frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
        fps = cap.get(cv2.CAP_PROP_FPS)
        width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
        height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

        print(f"Video Info: {frame_count} frames, {fps:.2f} FPS, {width}x{height}")

        # Example: Read and display the first frame (or process as needed)
        ret, frame = cap.read()
        if ret:
            print(f"First frame shape: {frame.shape}, dtype: {frame.dtype}")
            # You can then use this frame for further processing, e.g.,
            frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
            import matplotlib.pyplot as plt
            plt.imshow(frame_rgb)
            plt.title(f"Sample First Frame")
            plt.show()
        else:
            print("Could not read first frame.")

        cap.release()

    except Exception as e:
        print(f"Error processing external MP4: {e}")
    finally:
        if temp_file and os.path.exists(temp_file):
            os.remove(temp_file) # Clean up the temporary file


if __name__ == '__main__':
    main()

license: cc-by-sa-4.0

Downloads last month
37