Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
neoguojing committed Aug 17, 2024
1 parent 2b270da commit 803604b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
detectron/demo/examples/*
Binary file added detectron/demo/0_0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added detectron/demo/examples/coco.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added detectron/demo/examples/seg2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions detectron/demo/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def create_ui():
[os.path.join(current_directory,"examples/horse.png")],
[os.path.join(current_directory,"examples/view.jpeg")],
[os.path.join(current_directory,"examples/cat.jpg")],
[os.path.join(current_directory,"examples/coco.jpg")],
[os.path.join(current_directory,"examples/seg2.jpeg")],
],
inputs=components["image_input"],
examples_per_page=3,
examples_per_page=6,
label="图片示例"
)
with gr.Column(scale=2):
Expand Down Expand Up @@ -77,9 +79,11 @@ def create_ui():
[os.path.join(current_directory,"examples/horse.png")],
[os.path.join(current_directory,"examples/view.jpeg")],
[os.path.join(current_directory,"examples/cat.jpg")],
[os.path.join(current_directory,"examples/coco.jpg")],
[os.path.join(current_directory,"examples/seg2.jpeg")],
],
inputs=[components["yolo_image_input"]],
examples_per_page=3,
examples_per_page=6,
label="图片示例"
)
components["yolo_video_examples"] = gr.Examples(
Expand All @@ -88,7 +92,7 @@ def create_ui():
[os.path.join(current_directory,"examples/traffic.mp4")],
],
inputs=[components["yolo_video_input"]],
examples_per_page=2,
examples_per_page=4,
label="视频示例"
)

Expand Down Expand Up @@ -119,11 +123,11 @@ def create_ui():
components["face_input"] = gr.Gallery(elem_id='face-input',label='输入',columns=2,type="pil")
components["face_examples"] = gr.Examples(
examples=[
[[(os.path.join(current_directory,"examples/face1.jpeg"),"face1")]],
[[("face1",os.path.join(current_directory,"examples/face1.jpeg"))]],
[[(os.path.join(current_directory,"examples/face2.jpeg"),"face2")]],
],
inputs=[components["face_input"]],
examples_per_page=2,
examples_per_page=6,
label="图片示例"
)
with gr.Column(scale=2):
Expand Down Expand Up @@ -155,7 +159,7 @@ def create_ui():
[os.path.join(current_directory,"examples/text.jpeg")],
],
inputs=[components["ocr_input"]],
examples_per_page=2,
examples_per_page=6,
label="图片示例"
)
with gr.Column(scale=2):
Expand Down Expand Up @@ -183,9 +187,11 @@ def create_ui():
examples=[
[{'image': os.path.join(current_directory,"examples/horse.png"), 'points': []}],
[{'image': os.path.join(current_directory,"examples/view.jpeg"), 'points': []}],
[{'image': os.path.join(current_directory,"examples/coco.jpg"), 'points': []}],
[{'image': os.path.join(current_directory,"examples/seg2.jpeg"), 'points': []}],
],
inputs=[components["sam_input"]],
examples_per_page=2,
examples_per_page=6,
label="图片示例"
)
components["sam_video_examples"] = gr.Examples(
Expand Down
8 changes: 4 additions & 4 deletions requirements-docker.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
deepface==0.0.91
tf-keras==2.16.0
facenet_pytorch==2.6.0
ultralytics==8.2.28
segment_anything==1.0
facenet_pytorch
ultralytics
scikit-image==0.23.2
torch>=2.3.1
gradio==4.36.0
fvcore==0.1.5.post20221221
omegaconf==2.3.0
Expand All @@ -24,5 +24,5 @@ langchain==0.2.12
langchain_community==0.2.11
transformers==4.44.0
lapx>=0.5.2
paddleocr
paddlepaddle-gpu
easyocr
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
deepface==0.0.91
tf-keras==2.16.0
facenet_pytorch==2.6.0
torch==2.2.2
ultralytics==8.2.28
facenet_pytorch
torch>=2.3.1
ultralytics
segment_anything==1.0
scikit-image==0.23.2
gradio==4.36.0
Expand All @@ -11,7 +11,7 @@ omegaconf==2.3.0
pycocotools==2.0.7
gradio_image_prompter==0.1.0
git+https://github.com/facebookresearch/segment-anything.git

git+https://github.com/facebookresearch/segment-anything-2.git
scikit-learn==1.5.0
faiss-cpu==1.8.0
pypdf==4.2.0
Expand All @@ -25,5 +25,5 @@ langchain==0.2.12
langchain_community==0.2.11
transformers==4.44.0
lapx>=0.5.2
paddleocr
paddlepaddle-gpu
easyocr

0 comments on commit 803604b

Please sign in to comment.