Spaces:
Sleeping
Sleeping
app: fix rescaling (no longer resize image)
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def inference(image):
|
|
| 41 |
|
| 42 |
height = image.height
|
| 43 |
|
| 44 |
-
img = np.array(image
|
| 45 |
outputs = predictor(img)
|
| 46 |
|
| 47 |
v = Visualizer(img, my_metadata, scale=1.2)
|
|
@@ -50,7 +50,7 @@ def inference(image):
|
|
| 50 |
return out.get_image()
|
| 51 |
|
| 52 |
title = "DBMDZ Detectron2 Model Demo"
|
| 53 |
-
description = "This demo introduces an interactive playground for our trained Detectron2 model. <br>The model was trained on manually annotated segments from digitized books to detect Illustration or Illumination segments on a given page.
|
| 54 |
article = '<p>Detectron model is available from our repository <a href="">here</a> on the Hugging Face Model Hub.</p>'
|
| 55 |
|
| 56 |
gr.Interface(
|
|
|
|
| 41 |
|
| 42 |
height = image.height
|
| 43 |
|
| 44 |
+
img = np.array(image)
|
| 45 |
outputs = predictor(img)
|
| 46 |
|
| 47 |
v = Visualizer(img, my_metadata, scale=1.2)
|
|
|
|
| 50 |
return out.get_image()
|
| 51 |
|
| 52 |
title = "DBMDZ Detectron2 Model Demo"
|
| 53 |
+
description = "This demo introduces an interactive playground for our trained Detectron2 model. <br>The model was trained on manually annotated segments from digitized books to detect Illustration or Illumination segments on a given page. <br>Minimum score for classification is set to 80%."
|
| 54 |
article = '<p>Detectron model is available from our repository <a href="">here</a> on the Hugging Face Model Hub.</p>'
|
| 55 |
|
| 56 |
gr.Interface(
|