Bounding box detection
PyTorch
Ontocord.AI commited on
Commit
4a75742
1 Parent(s): 8c2dd5d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -10
README.md CHANGED
@@ -2,20 +2,18 @@
2
  license: apache-2.0
3
  ---
4
  ```
5
- from frcnn.frcnn_ids import *
6
- from frcnn.visualizing_image import SingleImageViz
7
- from frcnn.processing_image import *
8
- from frcnn.modeling_frcnn import *
9
- from frcnn.utils import *
10
-
11
 
 
 
 
 
12
  max_detections = 36
13
  frcnn_config = json.load(open("frcnn/config.jsonl"))
14
  frcnn_config = Config(frcnn_config)
15
- frcnn = GeneralizedRCNN(frcnn_config).half().cuda()
16
- image_preprocessor = Preprocess(frcnn_config).half().cuda()
17
-
18
- img_url = 'image2.png'
19
  raw_image = Image.open(img_url).convert('RGB')
20
  frcnn_output = decode_image(asarray(raw_image), frcnn, image_preprocessor, max_detections=max_detections)
21
 
 
2
  license: apache-2.0
3
  ---
4
  ```
 
 
 
 
 
 
5
 
6
+ from frcnn.visualizing_image import SingleImageViz
7
+ from frcnn.processing_image import Preprocess
8
+ from frcnn.modeling_frcnn import GeneralizedRCNN
9
+ from frcnn.utils import Config
10
  max_detections = 36
11
  frcnn_config = json.load(open("frcnn/config.jsonl"))
12
  frcnn_config = Config(frcnn_config)
13
+ image_preprocessor= Preprocess(frcnn_config).half().cuda()
14
+ box_segmentation_model= GeneralizedRCNN.from_pretrained("unc-nlp/frcnn-vg-finetuned", frcnn_config).half().cuda()
15
+
16
+ img_url = 'image.png'
17
  raw_image = Image.open(img_url).convert('RGB')
18
  frcnn_output = decode_image(asarray(raw_image), frcnn, image_preprocessor, max_detections=max_detections)
19