feat: extract opengait_studio monorepo module
Move demo implementation into opengait_studio, retire Sports2D runtime integration, and align packaging with root-level monorepo dependency management.
This commit is contained in:
@@ -28,11 +28,11 @@ from data.transform import get_transform
|
||||
from data.collate_fn import CollateFn
|
||||
from data.dataset import DataSet
|
||||
import data.sampler as Samplers
|
||||
from utils import Odict, mkdir, ddp_all_gather
|
||||
from utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from opengait.utils import Odict, mkdir, ddp_all_gather
|
||||
from opengait.utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from evaluation import evaluator as eval_functions
|
||||
from utils import NoOp
|
||||
from utils import get_msg_mgr
|
||||
from opengait.utils import NoOp
|
||||
from opengait.utils import get_msg_mgr
|
||||
|
||||
__all__ = ['BaseModel']
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
from . import losses
|
||||
from utils import is_dict, get_attr_from, get_valid_args, is_tensor, get_ddp_module
|
||||
from utils import Odict
|
||||
from utils import get_msg_mgr
|
||||
from opengait.utils import is_dict, get_attr_from, get_valid_args, is_tensor, get_ddp_module
|
||||
from opengait.utils import Odict
|
||||
from opengait.utils import get_msg_mgr
|
||||
|
||||
|
||||
class LossAggregator(nn.Module):
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from ctypes import ArgumentError
|
||||
import torch.nn as nn
|
||||
import torch
|
||||
from utils import Odict
|
||||
from opengait.utils import Odict
|
||||
import functools
|
||||
from utils import ddp_all_gather
|
||||
from opengait.utils import ddp_all_gather
|
||||
|
||||
|
||||
def gather_and_scale_wrapper(func):
|
||||
|
||||
@@ -132,7 +132,7 @@ class Post_ResNet9(ResNet):
|
||||
return x
|
||||
|
||||
|
||||
from utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from opengait.utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from ... import backbones
|
||||
class Baseline(nn.Module):
|
||||
def __init__(self, model_cfg):
|
||||
|
||||
@@ -4,7 +4,7 @@ from ..base_model import BaseModel
|
||||
from ..modules import SetBlockWrapper, HorizontalPoolingPyramid, PackSequenceWrapper, SeparateFCs, SeparateBNNecks, conv1x1, conv3x3, FlowFunc
|
||||
import torch.optim as optim
|
||||
from einops import rearrange
|
||||
from utils import get_valid_args
|
||||
from opengait.utils import get_valid_args
|
||||
import warnings
|
||||
import random
|
||||
from torchvision.utils import flow_to_image
|
||||
|
||||
@@ -161,7 +161,7 @@ class Post_ResNet9(ResNet):
|
||||
return x
|
||||
|
||||
|
||||
from utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from opengait.utils import get_valid_args, is_list, is_dict, np2var, ts2np, list2var, get_attr_from
|
||||
from ... import backbones
|
||||
class GaitBaseFusion_denoise(nn.Module):
|
||||
def __init__(self, model_cfg):
|
||||
|
||||
@@ -6,7 +6,7 @@ from ..base_model import BaseModel
|
||||
from .gaitgl import GaitGL
|
||||
from ..modules import GaitAlign
|
||||
from torchvision.transforms import Resize
|
||||
from utils import get_valid_args, get_attr_from, is_list_or_tuple
|
||||
from opengait.utils import get_valid_args, get_attr_from, is_list_or_tuple
|
||||
import os.path as osp
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import torch
|
||||
import torch.nn as nn
|
||||
from ..base_model import BaseModel
|
||||
from ..modules import SetBlockWrapper, HorizontalPoolingPyramid, PackSequenceWrapper, SeparateFCs
|
||||
from utils import clones
|
||||
from opengait.utils import clones
|
||||
|
||||
|
||||
class BasicConv1d(nn.Module):
|
||||
|
||||
@@ -7,7 +7,7 @@ import torch.nn.functional as F
|
||||
from ..base_model import BaseModel
|
||||
from ..modules import PackSequenceWrapper, HorizontalPoolingPyramid, SetBlockWrapper, ParallelBN1d, SeparateFCs
|
||||
|
||||
from utils import np2var, list2var, get_valid_args, ddp_all_gather
|
||||
from opengait.utils import np2var, list2var, get_valid_args, ddp_all_gather
|
||||
from data.transform import get_transform
|
||||
from einops import rearrange
|
||||
|
||||
@@ -143,7 +143,7 @@ class GaitSSB_Pretrain(BaseModel):
|
||||
|
||||
import torch.optim as optim
|
||||
import numpy as np
|
||||
from utils import get_valid_args, list2var
|
||||
from opengait.utils import get_valid_args, list2var
|
||||
|
||||
class no_grad(torch.no_grad):
|
||||
def __init__(self, enable=True):
|
||||
|
||||
@@ -782,7 +782,7 @@ from ..modules import BasicBlock2D, BasicBlockP3D
|
||||
import torch.optim as optim
|
||||
import os.path as osp
|
||||
from collections import OrderedDict
|
||||
from utils import get_valid_args, get_attr_from
|
||||
from opengait.utils import get_valid_args, get_attr_from
|
||||
|
||||
class SwinGait(BaseModel):
|
||||
def __init__(self, cfgs, training):
|
||||
|
||||
@@ -2,7 +2,7 @@ import torch
|
||||
import numpy as np
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from utils import clones, is_list_or_tuple
|
||||
from opengait.utils import clones, is_list_or_tuple
|
||||
from torchvision.ops import RoIAlign
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user