annayding commited on
Commit
47342ef
1 Parent(s): 29d9490

move to gpu

Browse files
Files changed (1) hide show
  1. owl_core.py +2 -2
owl_core.py CHANGED
@@ -46,8 +46,8 @@ def owl_full_video(
46
  threshold: float,
47
  fps_processed: int = 1,
48
  scaling_factor: float = 0.5,
49
- processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16-ensemble"),
50
- model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16-ensemble"),
51
  device: str = 'cuda',
52
  batch_size: int = 6,
53
  ):
 
46
  threshold: float,
47
  fps_processed: int = 1,
48
  scaling_factor: float = 0.5,
49
+ processor = Owlv2Processor.from_pretrained("google/owlv2-base-patch16-ensemble").to('cuda'),
50
+ model = Owlv2ForObjectDetection.from_pretrained("google/owlv2-base-patch16-ensemble").to('cuda'),
51
  device: str = 'cuda',
52
  batch_size: int = 6,
53
  ):