Watch 3 Star 4 Fork 2

东南大学-王雁刚 / CVPR2020-OOHPythonApache-2.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This is the repository of the implemantation of cvpr 2020. spread retract

Clone or download
demo.py 974 Bytes
Copy Edit Web IDE Raw Blame History
boycehbz authored 2020-05-26 15:28 . demo image
import torch
import os
from cmd_parser import parse_config
from modules import init, ImageLoader, ModelLoader
from process import demo
def main(**args):
# global settings
dtype = torch.float32
batchsize = args.pop('batchsize')
workers = args.pop('worker')
device = torch.device(index=args.pop('gpu_index'),type='cuda')
viz = args.pop('viz')
# init project settings
out_dir, logger, smpl, generator, occlusions = init(dtype=dtype, **args)
# create data loader
dataset = ImageLoader(**args)
test_loader = torch.utils.data.DataLoader(
dataset,
batch_size=batchsize, shuffle=False,
num_workers=workers, pin_memory=True
)
# load model
model = ModelLoader(device=device, output=out_dir, smpl=smpl, generator=generator, **args)
# testing mode
demo(model, test_loader, viz=viz, device=device)
logger.close()
if __name__ == "__main__":
args = parse_config()
main(**args)

Comment ( 0 )

Sign in for post a comment

Python
1
https://gitee.com/seuvcl/CVPR2020-OOH.git
git@gitee.com:seuvcl/CVPR2020-OOH.git
seuvcl
CVPR2020-OOH
CVPR2020-OOH
master

Search