repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/datasets.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.323755 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
import os
import json
from torchvision import datasets, transforms
from torchvision.datasets.folder import ImageFolder, default_loader
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from timm.data import create_transform
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/engine.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.345390 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
"""
Train and eval functions used in main.py
"""
import math
import sys
from typing import Iterable, Optional
import torch
from timm.data import Mixup
from timm.utils import accuracy, ModelEma
from losses import DistillationLoss
import utils
def t... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/losses.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.705670 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
"""
Implements the knowledge distillation loss
"""
import torch
from torch.nn import functional as F
class DistillationLoss(torch.nn.Module):
"""
This module wraps a standard criterion and adds an extra knowledge distillation loss by
taki... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.707104 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
import argparse
import datetime
import numpy as np
import time
import torch
import torch.backends.cudnn as cudnn
import json
from pathlib import Path
from timm.data import Mixup
from timm.models import create_model
from timm.loss import LabelSmoothin... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/get_flops.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.708652 | import argparse
import torch
from timm.models import create_model
import pvt
import pvt_v2
try:
from mmcv.cnn import get_model_complexity_info
from mmcv.cnn.utils.flops_counter import get_model_complexity_info, flops_to_string, params_to_string
except ImportError:
raise ImportError('Please upgrade mmcv to ... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/mcloader/data_prefetcher.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.710186 | import torch
class DataPrefetcher:
def __init__(self, loader):
self.loader = iter(loader)
self.stream = torch.cuda.Stream()
self.preload()
def preload(self):
try:
self.next_input, self.next_target = next(self.loader)
except StopIteration:
self.n... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/mcloader/classification.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:54.711167 | import torch
from torch.utils.data import Dataset
from .imagenet import ImageNet
class ClassificationDataset(Dataset):
"""Dataset for classification.
"""
def __init__(self, split='train', pipeline=None):
if split == 'train':
self.data_source = ImageNet(root='data/imagenet/train',
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/hubconf.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.134308 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
from models import *
dependencies = ["torch", "torchvision", "timm"]
|
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/mcloader/imagenet.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.444987 | from .image_list import ImageList
class ImageNet(ImageList):
def __init__(self, root, list_file, memcached, mclient_path):
super(ImageNet, self).__init__(
root, list_file, memcached, mclient_path)
|
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/mcloader/mcloader.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.453396 | import io
from PIL import Image
try:
import mc
except ImportError as E:
pass
def pil_loader(img_str):
buff = io.BytesIO(img_str)
return Image.open(buff)
class McLoader(object):
def __init__(self, mclient_path):
assert mclient_path is not None, \
"Please specify 'data_mclient... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/mcloader/image_list.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.457752 | import os
from PIL import Image
from .mcloader import McLoader
class ImageList(object):
def __init__(self, root, list_file, memcached=False, mclient_path=None):
with open(list_file, 'r') as f:
lines = f.readlines()
self.has_labels = len(lines[0].split()) == 2
if self.has_labe... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/pvt_v2.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.575723 | import torch
import torch.nn as nn
import torch.nn.functional as F
from functools import partial
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
from timm.models.registry import register_model
from timm.models.vision_transformer import _cfg
import math
class Mlp(nn.Module):
def __init__(self, i... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/samplers.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.587834 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
import torch
import torch.distributed as dist
import math
class RASampler(torch.utils.data.Sampler):
"""Sampler that restricts data loading to a subset of the dataset for distributed,
with repeated augmentation.
It ensures that different ... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/analyze_results.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.589455 | import argparse
import os.path as osp
import mmcv
import numpy as np
from mmcv import Config, DictAction
from mmdet.core.evaluation import eval_map
from mmdet.core.visualization import imshow_gt_det_bboxes
from mmdet.datasets import build_dataset, get_loading_pipeline
def bbox_map_eval(det_result, annotation):
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.593423 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
"""
Misc functions, including distributed helpers.
Mostly copy-paste from torchvision references.
"""
import io
import os
import time
from collections import defaultdict, deque
import datetime
import torch
import torch.distributed as dist
import mmcv... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/run_with_submitit.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.608526 | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
"""
A script to run multinode training with submitit.
"""
import argparse
import os
import os.path as osp
import uuid
from pathlib import Path
import main as classification
import submitit
def parse_args():
classification_parser = classification... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | classification/pvt.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.609534 | import torch
import torch.nn as nn
import torch.nn.functional as F
from functools import partial
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
from timm.models.registry import register_model
from timm.models.vision_transformer import _cfg
__all__ = [
'pvt_tiny', 'pvt_small', 'pvt_medium', 'pvt... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/benchmark.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:55.722454 | import argparse
import time
import torch
from mmcv import Config, DictAction
from mmcv.cnn import fuse_conv_bn
from mmcv.parallel import MMDataParallel
from mmcv.runner import load_checkpoint, wrap_fp16_model
from mmdet.datasets import (build_dataloader, build_dataset,
replace_ImageToTenso... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/cityscapes_instance.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.125633 | # dataset settings
dataset_type = 'CityscapesDataset'
data_root = 'data/cityscapes/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
dict(
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/coco_instance_semantic.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.253551 | # dataset settings
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/cityscapes_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.254597 | # dataset settings
dataset_type = 'CityscapesDataset'
data_root = 'data/cityscapes/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(
type='Resize'... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/coco_instance.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.257608 | # dataset settings
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
dict(type='Resize', img... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/lvis_v1_instance.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.258528 | # dataset settings
_base_ = 'coco_instance.py'
dataset_type = 'LVISV1Dataset'
data_root = 'data/lvis_v1/'
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(
_delete_=True,
type='ClassBalancedDataset',
oversample_thr=1e-3,
dataset=dict(
type=dataset_typ... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/coco_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.259532 | # dataset settings
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(type='Resize', img_scale=(1333, 80... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/voc0712.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.260762 | # dataset settings
dataset_type = 'VOCDataset'
data_root = 'data/VOCdevkit/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(type='Resize', img_scale=(1000... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/deepfashion.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.261736 | # dataset settings
dataset_type = 'DeepFashionDataset'
data_root = 'data/DeepFashion/In-shop/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
d... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/lvis_v0.5_instance.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.262725 | # dataset settings
_base_ = 'coco_instance.py'
dataset_type = 'LVISV05Dataset'
data_root = 'data/lvis_v0.5/'
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(
_delete_=True,
type='ClassBalancedDataset',
oversample_thr=1e-3,
dataset=dict(
type=dataset_... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/datasets/wider_face.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:56.545842 | # dataset settings
dataset_type = 'WIDERFaceDataset'
data_root = 'data/WIDERFace/'
img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[1, 1, 1], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True),
dict(
type='PhotoMetric... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/faster_rcnn_r50_caffe_c4.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.278342 | # model settings
norm_cfg = dict(type='BN', requires_grad=False)
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=3,
strides=(1, 2, 2),
dilations=(1, 1, 1),
out_indices=(2,... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/fast_rcnn_r50_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.280121 | # model settings
model = dict(
type='FastRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/cascade_mask_rcnn_pvtv2_b2_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.280626 | # model settings
model = dict(
type='CascadeRCNN',
backbone=dict(
type='pvt_v2_b2',
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[64, 128, 320, 512],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/cascade_rcnn_r50_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.281871 | # model settings
model = dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/faster_rcnn_r50_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.282356 | # model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/cascade_mask_rcnn_r50_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.282811 | # model settings
model = dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/faster_rcnn_r50_caffe_dc5.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.283453 | # model settings
norm_cfg = dict(type='BN', requires_grad=False)
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
strides=(1, 2, 2, 1),
dilations=(1, 1, 1, 2),
out_indic... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/default_runtime.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.283911 | checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = No... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/mask_rcnn_r50_caffe_c4.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.306647 | # model settings
norm_cfg = dict(type='BN', requires_grad=False)
model = dict(
type='MaskRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=3,
strides=(1, 2, 2),
dilations=(1, 1, 1),
out_indices=(2, )... |
whai362/PVT | https://github.com/whai362/PVT | null | null | null | null | 1,893 | null | null | apache-2.0 | null | null | null | null | null | null | null | detection/configs/_base_/models/mask_rcnn_r50_fpn.py | null | null | null | null | null | null | Python | 2026-05-04T02:49:57.511049 | # model settings
model = dict(
type='MaskRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/dataset_extract_kitti.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.281811 | import os
import numpy as np
import os.path as osp
from PIL import Image
from tqdm import tqdm
import csv
import cv2
import json
import glob
import shutil
from natsort import natsorted
from eval_utils import even_or_odd
from eval_utils import gen_json, get_sorted_files, copy_crop_files
def extract_kitti(
root,
... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/dataset_extract_sintel.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.296320 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# # Data loading based on https://github.com/NVIDIA/flownet2-pytorch
import os
import numpy as np
import os.path as osp
f... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/dataset_extract_bonn.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.298463 | import os
import numpy as np
import os.path as osp
from PIL import Image
from tqdm import tqdm
import cv2
import csv
import json
import glob
import shutil
from natsort import natsorted
from eval_utils import gen_json, get_sorted_files, even_or_odd, copy_crop_files
def extract_bonn(
root,
depth_root,
saved... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/eval_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.299889 | import os
import numpy as np
import os.path as osp
import json
import glob
import cv2
import shutil
from PIL import Image
from natsort import natsorted
def even_or_odd(num):
if num % 2 == 0:
return num
else:
return num - 1
def gen_json(root_path, dataset, start_id, end_id, step, save_path=Non... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/dataset_extract_scannet.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.301853 | import os
import numpy as np
import os.path as osp
from PIL import Image
from tqdm import tqdm
import csv
import cv2
import json
import glob
from natsort import natsorted
import shutil
from eval_utils import gen_json, gen_json_scannet_tae, get_sorted_files, copy_crop_files
def extract_scannet(
root,
sample... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/eval/eval_tae.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.306013 | import numpy as np
import cv2
import matplotlib.pyplot as plt
import json
import argparse
from scipy.ndimage import map_coordinates
from tqdm import tqdm
import os
import gc
import time
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def compute_errors_torch(gt, pred):
abs_rel =... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/dataset_extract/dataset_extract_nyuv2.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.313030 | import os
import numpy as np
import os.path as osp
from PIL import Image
from tqdm import tqdm
import csv
import cv2
import json
import glob
from natsort import natsorted
import shutil
from eval_utils import gen_json, get_sorted_files, copy_crop_files
def extract_nyuv2(
root,
sample_len=-1,
datatset_name=... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | app.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.314897 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/eval/eval.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:00.346056 |
import numpy as np
import cv2
import matplotlib.pyplot as plt
import json
import argparse
from scipy.ndimage import map_coordinates
from tqdm import tqdm
import os
import gc
import torch
from metric import *
import metric
device = 'cuda'
eval_metrics = [
"abs_relative_difference",
"rmse_linear",
"delta1... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | loss/loss.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.127288 | import torch
import torch.nn as nn
import numpy as np
def reduction_batch_based(image_loss, M):
# average of all valid pixels of the batch
# avoid division by 0 (if sum(M) = sum(sum(mask)) = 0: sum(image_loss) = 0)
divisor = torch.sum(M)
if divisor == 0:
return torch.sum(image_loss) * 0.0
... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | run_streaming.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.128608 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law o... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | run.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.151747 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law o... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/infer/infer.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.166160 | import argparse
import os
import cv2
import json
import torch
from tqdm import tqdm
import numpy as np
from video_depth_anything.video_depth import VideoDepthAnything
from utils.dc_utils import read_video_frames
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--infer_path', ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | benchmark/eval/metric.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.229121 | import torch
def abs_relative_difference(output, target, valid_mask=None):
actual_output = output
actual_target = target
abs_relative_diff = torch.abs(actual_output - actual_target) / actual_target
if valid_mask is not None:
abs_relative_diff[~valid_mask] = 0
n = valid_mask.sum((-1, -2)... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/drop_path.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.771462 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/master/vision_transformer.py
# https://github.com/rwigh... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/layer_scale.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.793757 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# Modified from: https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/vision_transformer.py#L103-L11... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/attention.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.795347 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/master/vision_transformer.py
# https://github.com/rwigh... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/block.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.796294 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/master/vision_transformer.py
# https://github.com/rwigh... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/mlp.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.811182 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/master/vision_transformer.py
# https://github.com/rwigh... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | utils/util.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.903485 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | loss/test_loss.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:01.988679 | import torch
from loss import VideoDepthLoss
B = 2
T = 32
H = 518
W = 518
prediction = torch.randn(B, T, H, W).cuda()
target = torch.randn(B, T, H, W).cuda()
mask = torch.ones(B, T, H, W).bool().cuda()
loss = VideoDepthLoss()
val = loss(prediction, target, mask)
print(f'loss: {val}')
|
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.004596 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the Apache License, Version 2.0
# found in the LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/main/vision_transformer.py
# https://github.com/rwightman/... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | utils/dc_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.025465 | # This file is originally from DepthCrafter/depthcrafter/utils.py at main · Tencent/DepthCrafter
# SPDX-License-Identifier: MIT License license
#
# This file may have been modified by ByteDance Ltd. and/or its affiliates on [date of modification]
# Original file is released under [ MIT License license], with the full l... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.028561 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .mlp import Mlp
from .patch_embed import PatchEmbed
from .swiglu_ffn import SwiGLUFFN, SwiGLUFFNFused
from .block im... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/patch_embed.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.335609 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# References:
# https://github.com/facebookresearch/dino/blob/master/vision_transformer.py
# https://github.com/rwigh... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dpt_temporal.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.354449 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dinov2_layers/swiglu_ffn.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.359738 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from typing import Callable, Optional
from torch import Tensor, nn
import torch.nn.functional as F
class SwiGLUFFN(nn.... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/dpt.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.375651 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/motion_module/attention.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.379372 | # Copyright 2022 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/motion_module/motion_module.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.433000 | # This file is originally from AnimateDiff/animatediff/models/motion_module.py at main · guoyww/AnimateDiff
# SPDX-License-Identifier: Apache-2.0 license
#
# This file may have been modified by ByteDance Ltd. and/or its affiliates on [date of modification]
# Original file was released under [ Apache-2.0 license], with ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/util/blocks.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.538165 | import torch.nn as nn
def _make_scratch(in_shape, out_shape, groups=1, expand=False):
scratch = nn.Module()
out_shape1 = out_shape
out_shape2 = out_shape
out_shape3 = out_shape
if len(in_shape) >= 4:
out_shape4 = out_shape
if expand:
out_shape1 = out_shape
out_shape2 ... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/util/transform.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.550932 | import numpy as np
import cv2
class Resize(object):
"""Resize sample to given size (width, height).
"""
def __init__(
self,
width,
height,
resize_target=True,
keep_aspect_ratio=False,
ensure_multiple_of=1,
resize_method="lower_bound",
image_... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/video_depth.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.571473 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law o... |
DepthAnything/Video-Depth-Anything | https://github.com/DepthAnything/Video-Depth-Anything | null | null | null | null | 1,890 | null | null | apache-2.0 | null | null | null | null | null | null | null | video_depth_anything/video_depth_stream.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:02.601226 | # Copyright (2025) Bytedance Ltd. and/or its affiliates
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | docs/examples/generate_wan_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.641171 | import argparse
import csv
import os
import random
import pandas as pd
import torch
# --- Fixed Architectural Constants (Internal Only) ---
# channel number of video lantent
FIXED_C = 16
# sequence length of text
FIXED_L_TEXT = 512
# embedding dimension of text
FIXED_D_TEXT = 4096
# dimension of clip feature (video... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | docs/conf.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.707608 | import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
# -- Project information -----------------------------------------------------
version_file = "../veomni/__init__.py"
with open(version_file, encoding="utf-8") as f:
try:
version_line = next(line for line in f if line.startswith(... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/moe_ckpt_merge/moe_merge.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.708943 | import os
import shutil
import warnings
from argparse import ArgumentParser
from dataclasses import dataclass
from glob import glob
from typing import Generator, List, Tuple
import torch
from safetensors.torch import safe_open
from tqdm import tqdm
from transformers import AutoConfig
from veomni.models import save_mo... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/deepseek_v3/fp8_cast_bf16.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.742150 | # adapted from https://huggingface.co/deepseek-ai/DeepSeek-V3/blob/main/inference/fp8_cast_bf16.py
import json
import os
from argparse import ArgumentParser
from glob import glob
import torch
from kernel import weight_dequant
from safetensors.torch import load_file
from tqdm import tqdm
from veomni.models import save... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/ci/check_doc_task_paths.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.743225 | #!/usr/bin/env python3
"""Verify that task script paths referenced in docs shell blocks exist on disk."""
from __future__ import annotations
import argparse
import re
import sys
from pathlib import Path
# Fenced code blocks used for copy-paste training commands
SHELL_FENCE = re.compile(r"```(?:shell|bash|sh)\s*\n(.... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/deepseek_v3/kernel.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.825584 | # copied from https://huggingface.co/deepseek-ai/DeepSeek-V3/blob/main/inference/kernel.py
from typing import Tuple
import torch
import triton
import triton.language as tl
from triton import Config
@triton.jit
def act_quant_kernel(x_ptr, y_ptr, s_ptr, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(axis=0)
of... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/download_hf_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:07.832608 | import argparse
import os
from huggingface_hub import snapshot_download
"""
python3 scripts/download_hf_model.py --repo_id deepseek-ai/Janus-1.3B --local_dir Janus-1.3B
"""
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--repo_id", type=str, default="deepseek-ai/Janus-1.3... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/multimodal/convert_data/tom-and-jerry.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.242575 | # pip install soundfile, librosa
import argparse
import math
import os
from datasets import Dataset
from veomni.data.multimodal.video_utils import (
load_video_bytes_from_path,
)
def load_dataset(dataset_path: str):
captions_file = os.path.join(dataset_path, "captions.txt")
videos_file = os.path.join(da... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/profile/merge_chrome_trace.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.284384 | import argparse
import glob
import gzip
import json
import os
from typing import List
def merge_traces_direct(input_patterns: List[str], output: str):
"""
Directly merge PyTorch trace files without timeline alignment.
Each rank will maintain its original timestamps.
"""
merged = {"schemaVersion": ... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/trim_safetensor_layers.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.290095 | """
This script trims hidden layer number for a given safetensor dir
so that we can test weight loading against large models like deepseek conveniently
Example usage:
python scripts/trim_safetensor_layers.py \
--model_dir /mnt/hdfs/tianle.zhong/models/unsloth-deepseek-v3.1-bf16-merged \
--out_dir /mnt/hdfs/tianle... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/verify_torch29_conv3d_issue.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.327738 | # Copied from https://github.com/pytorch/pytorch/issues/166643#issue-3571291598
# Check it to see if using the suggested cudnn version with torch 2.9 has fixed the conv3d memory issue
#
# Test results (torch 2.9.1+cu129) on A100:
#
# With nvidia-cudnn-cu12==9.15.1.9 (forced version):
# Peak memory before: 1.2622 GB
#... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/deprecated_task/train_qwen_vl.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.389827 | import json
import os
import time
from dataclasses import asdict, dataclass, field
from typing import Any, Dict, List, Optional
import torch
import torch.distributed as dist
import wandb
from torch.utils.checkpoint import set_checkpoint_debug_enabled
from tqdm import trange
from veomni.arguments import DataArguments,... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/deprecated_task/train_flux.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.407863 | import os
import time
from dataclasses import dataclass, field
from typing import Any, Dict, List, Literal, Optional
import torch
import torch.distributed as dist
import wandb
from tqdm import trange
from transformers import (
AutoConfig,
CLIPTokenizer,
T5TokenizerFast,
)
from veomni.arguments import Data... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/deprecated_task/train_torch.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.432778 | import json
import os
import time
from dataclasses import asdict
from datetime import timedelta
from typing import Any, Dict, List
import torch
import torch.distributed as dist
import wandb
from torch.utils.checkpoint import set_checkpoint_debug_enabled
from tqdm import trange
from veomni.arguments import VeOmniArgum... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/infer/infer_omni_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.820745 | import json
import os
from dataclasses import asdict, dataclass, field
import requests
import torch
from PIL import Image
from veomni.arguments import InferArguments, parse_args
from veomni.data import build_multimodal_chat_template
from veomni.data.multimodal.multimodal_transform import mask_input_ids
from veomni.mo... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/deprecated_task/train_wan.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.822714 | import os
import time
from dataclasses import dataclass, field
from typing import Any, Dict, List
import torch
import torch.distributed as dist
import torch.nn.functional as F
import wandb
from tqdm import trange
from veomni.arguments import (
DataArguments,
ModelArguments,
TrainingArguments,
parse_ar... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/infer/infer_text.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.926304 | import json
import readline # noqa: F401
from dataclasses import asdict, dataclass, field
import torch
from transformers import AutoTokenizer, TextStreamer
from veomni.arguments import InferArguments, parse_args
from veomni.models import build_foundation_model
from veomni.utils import helper
logger = helper.create... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/infer/infer_qwen2_vl.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.945567 | import json
from dataclasses import asdict, dataclass, field
import requests
from PIL import Image
from veomni.arguments import InferArguments, parse_args
from veomni.models import build_foundation_model, build_processor
from veomni.utils import helper
from veomni.utils.device import get_device_type
logger = helper... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/omni/train_omni_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:08.968274 | import json
import os
import time
from collections import defaultdict
from dataclasses import asdict, dataclass, field
from functools import partial
from typing import Any, Dict, List, Optional
import torch
import wandb
from torch import distributed as dist
from tqdm import trange
from veomni.arguments import DataArg... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_text.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.029760 | from veomni.arguments import parse_args
from veomni.trainer.text_trainer import TextTrainer, VeOmniArguments
if __name__ == "__main__":
args = parse_args(VeOmniArguments)
trainer = TextTrainer(args)
trainer.train()
|
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_dit.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.031056 | from veomni.arguments import parse_args
from veomni.trainer.dit_trainer import DiTTrainer, VeOmniDiTArguments
if __name__ == "__main__":
args = parse_args(VeOmniDiTArguments)
trainer = DiTTrainer(args)
trainer.train()
|
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_text_rl.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.387299 | from veomni.arguments import parse_args
from veomni.trainer.base_rl_trainer import BaseRLTrainer
from veomni.trainer.text_trainer import TextTrainer, VeOmniArguments
class TextRLTrainer(TextTrainer):
base: BaseRLTrainer
def __init__(self, args: VeOmniArguments) -> None:
# BaseRLTrainer.__init__ is NO... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_text_dpo.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.425586 | from veomni.arguments import parse_args
from veomni.trainer.text_dpo_trainer import TextDPOTrainer, VeOmniDPOArguments
if __name__ == "__main__":
args = parse_args(VeOmniDPOArguments)
trainer = TextDPOTrainer(args)
trainer.train()
|
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_vlm.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.517654 | from veomni.arguments import parse_args
from veomni.trainer.vlm_trainer import VeOmniVLMArguments, VLMTrainer
if __name__ == "__main__":
args = parse_args(VeOmniVLMArguments)
trainer = VLMTrainer(args)
trainer.train()
|
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tasks/train_vlm_rl.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.518710 | from veomni.arguments import parse_args
from veomni.trainer.base_rl_trainer import BaseRLTrainer
from veomni.trainer.vlm_trainer import VeOmniVLMArguments, VLMTrainer
class VLMRLTrainer(VLMTrainer):
base: BaseRLTrainer
def __init__(self, args: VeOmniVLMArguments):
# BaseRLTrainer.__init__ is NOT call... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | tests/checkpoints/checkpoint_verification_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.623409 | #!/usr/bin/env python
# Copyright 2025 Bytedance Ltd. and/or its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/download_hf_data.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.922371 | import argparse
from huggingface_hub import snapshot_download
"""
python3 scripts/download_hf_data.py --repo_id HuggingFaceFW/fineweb --local_dir ./fineweb/ --allow_patterns sample/10BT/*
"""
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--repo_id", type=str, default="H... |
ByteDance-Seed/VeOmni | https://github.com/ByteDance-Seed/VeOmni | null | null | null | null | 1,889 | null | null | apache-2.0 | null | null | null | null | null | null | null | scripts/moe_ckpt_merge/moe_split.py | null | null | null | null | null | null | Python | 2026-05-04T02:50:09.927479 | """
Reverse process of moe_merge.py - splits merged MoE expert weights back to individual experts.
This script takes a HF checkpoint with stacked/fused expert weights and splits them back to
the original per-expert format expected by HuggingFace safetensors.
Supported input formats:
- v4 veomni format (from moe_mer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.