hlydecker commited on
Commit
2c0f2db
1 Parent(s): 921eee0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,7 +2,7 @@
2
  building-segmentation
3
  Proof of concept showing effectiveness of a fine tuned instance segmentation model for deteting buildings.
4
  """
5
- import os
6
  os.system("pip install 'git+https://github.com/facebookresearch/detectron2.git'")
7
  from transformers import DetrFeatureExtractor, DetrForSegmentation
8
  from PIL import Image
@@ -20,7 +20,6 @@ from detectron2.engine import DefaultPredictor
20
  from detectron2.config import get_cfg
21
  from detectron2.utils.visualizer import Visualizer
22
  from detectron2.data import MetadataCatalog, DatasetCatalog
23
- from PIL import Image
24
 
25
  cfg = get_cfg()
26
  cfg.MODEL.DEVICE='cpu'
 
2
  building-segmentation
3
  Proof of concept showing effectiveness of a fine tuned instance segmentation model for deteting buildings.
4
  """
5
+ import os, json, cv2, random
6
  os.system("pip install 'git+https://github.com/facebookresearch/detectron2.git'")
7
  from transformers import DetrFeatureExtractor, DetrForSegmentation
8
  from PIL import Image
 
20
  from detectron2.config import get_cfg
21
  from detectron2.utils.visualizer import Visualizer
22
  from detectron2.data import MetadataCatalog, DatasetCatalog
 
23
 
24
  cfg = get_cfg()
25
  cfg.MODEL.DEVICE='cpu'