Spaces:
Running
Running
Abhishek Gola
commited on
Commit
·
30d469c
1
Parent(s):
f70c427
Updated app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,9 @@ model_path = hf_hub_download(repo_id="opencv/edge_detection_dexined", filename="
|
|
| 10 |
model = Dexined(modelPath=model_path)
|
| 11 |
|
| 12 |
def detect_edges(input_image):
|
|
|
|
| 13 |
result = model.infer(input_image)
|
|
|
|
| 14 |
return result
|
| 15 |
|
| 16 |
# Gradio UI
|
|
|
|
| 10 |
model = Dexined(modelPath=model_path)
|
| 11 |
|
| 12 |
def detect_edges(input_image):
|
| 13 |
+
input_image = cv.cvtColor(input_image, cv.COLOR_RGB2BGR)
|
| 14 |
result = model.infer(input_image)
|
| 15 |
+
result = cv.cvtColor(result, cv.COLOR_BGR2RGB)
|
| 16 |
return result
|
| 17 |
|
| 18 |
# Gradio UI
|