Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -302,11 +302,6 @@ def merge_images_in_2_folder(folder1, folder2, outdir, suffix_need_remove = None
|
|
| 302 |
result = merge_2_images(img1, img2, mode, erosion_para, dilate)
|
| 303 |
cv2.imwrite(os.path.join(outdir, filename + extensions_folder1[index]), result)
|
| 304 |
|
| 305 |
-
def process_line(img_path = './input', outdir = './output'):
|
| 306 |
-
depth_anything(img_path, os.path.join(outdir,"depth_anything"))
|
| 307 |
-
teed_imgs(img_path, os.path.join(outdir,"teed_imgs"), [1,7,2])
|
| 308 |
-
teed_imgs(os.path.join(outdir,"depth_anything"), os.path.join(outdir,"dp_teed_imgs"), [0,7,2])
|
| 309 |
-
merge_images_in_2_folder(os.path.join(outdir,"teed_imgs"), os.path.join(outdir,"dp_teed_imgs"), os.path.join(outdir,"merged_imgs"),'_depth', 1, 'multiply', [[2,0],[2,1]],[1,0])
|
| 310 |
|
| 311 |
def invert_image(image):
|
| 312 |
# 将图片从BGR转为灰度图
|
|
@@ -365,8 +360,6 @@ def process_line(img_path='./input', outdir='./output'):
|
|
| 365 |
)
|
| 366 |
|
| 367 |
|
| 368 |
-
|
| 369 |
-
|
| 370 |
if __name__ == '__main__':
|
| 371 |
# Gradio 接口代码
|
| 372 |
import gradio as gr
|
|
|
|
| 302 |
result = merge_2_images(img1, img2, mode, erosion_para, dilate)
|
| 303 |
cv2.imwrite(os.path.join(outdir, filename + extensions_folder1[index]), result)
|
| 304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
|
| 306 |
def invert_image(image):
|
| 307 |
# 将图片从BGR转为灰度图
|
|
|
|
| 360 |
)
|
| 361 |
|
| 362 |
|
|
|
|
|
|
|
| 363 |
if __name__ == '__main__':
|
| 364 |
# Gradio 接口代码
|
| 365 |
import gradio as gr
|