We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InferEngine
How is data needed to be prepared for using InferEngine If my inference was something like
def read_video(video): '''Read video prepare video_metas''' pass def prepare(cfg, checkpoint): engine = build_engine(cfg.infer_engine) load_weights(engine.model, checkpoint, map_location='cpu') device = torch.cuda.current_device() engine = MMDataParallel( engine.to(device), device_ids=[torch.cuda.current_device()]) data_pipeline = Compose(cfg.data_pipeline) return engine, data_pipeline def main(): args = parse_args() cfg = Config.fromfile(args.config) engine, data_pipeline = prepare(cfg, args.checkpoint) imgs, video_metas = read_video(args.video) data = data_pipeline(imgs) # scatter here results = engine.infer(data['imgs'], video_metas) print(results)
I will likely need to change the pipeline from the default but to what
data_pipeline=[ dict(typename='LoadMetaInfo'), # probably dont need dict(typename='Time2Frame'), # probably dont need dict( typename='OverlapCropAug', num_frames=num_frames, overlap_ratio=overlap_ratio, transforms=[ dict(typename='TemporalCrop'), dict(typename='LoadFrames', to_float32=True), # probably dont need dict(typename='SpatialCenterCrop', crop_size=img_shape), dict(typename='Normalize', **img_norm_cfg), dict(typename='Pad', size=(num_frames, *img_shape)), dict(typename='DefaultFormatBundle'), dict(typename='Collect', keys=['imgs']) ]) ]
I imagine ImageToTensor is needed as a last step before Collect and loading the frame will need to be different Any clues or help is appreciated
ImageToTensor
Collect
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How is data needed to be prepared for using
InferEngine
If my inference was something like
I will likely need to change the pipeline from the default but to what
I imagine
ImageToTensor
is needed as a last step beforeCollect
and loading the frame will need to be differentAny clues or help is appreciated
The text was updated successfully, but these errors were encountered: