shivi commited on
Commit
04c9e40
1 Parent(s): 88983e0

Update predict.py

Browse files
Files changed (1) hide show
  1. predict.py +4 -0
predict.py CHANGED
@@ -3,6 +3,10 @@ import random
3
  import numpy as np
4
  from PIL import Image
5
  from collections import defaultdict
 
 
 
 
6
  from detectron2.data import MetadataCatalog
7
  from detectron2.utils.visualizer import ColorMode, Visualizer
8
  from color_palette import ade_palette
 
3
  import numpy as np
4
  from PIL import Image
5
  from collections import defaultdict
6
+ import os
7
+ # install detectron this way to avoid torch not available error if mentioned directly as dependency in requirements.txt
8
+ os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
9
+
10
  from detectron2.data import MetadataCatalog
11
  from detectron2.utils.visualizer import ColorMode, Visualizer
12
  from color_palette import ade_palette