Liangyu commited on
Commit
832c24a
β€’
1 Parent(s): c7f0cc1

install detectron2

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -12,11 +12,15 @@ if os.getenv('SYSTEM') == 'spaces':
12
  import mim
13
 
14
  mim.uninstall('mmcv-full', confirm_yes=True)
15
- mim.install('mmcv-full==1.5.2', is_yes=True)
 
 
16
 
17
  subprocess.call('pip uninstall -y opencv-python'.split())
18
  subprocess.call('pip uninstall -y opencv-python-headless'.split())
19
  subprocess.call('pip install opencv-python-headless==4.5.5.64'.split())
 
 
20
 
21
  import cv2
22
  import gradio as gr
 
12
  import mim
13
 
14
  mim.uninstall('mmcv-full', confirm_yes=True)
15
+ mim.install('mmcv-full==1.4.3', is_yes=True)
16
+ mim.uninstall('mmdet', confirm_yes=True)
17
+ mim.install('mmdet==2.20.0', is_yes=True)
18
 
19
  subprocess.call('pip uninstall -y opencv-python'.split())
20
  subprocess.call('pip uninstall -y opencv-python-headless'.split())
21
  subprocess.call('pip install opencv-python-headless==4.5.5.64'.split())
22
+ subprocess.call('conda install -c conda-forge pycocotools'.split())
23
+ subprocess.call('pip install detectron2==0.5 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html'.split())
24
 
25
  import cv2
26
  import gradio as gr