Upload folder using huggingface_hub
Browse files- README.md +1 -1
- app.py +1 -8
- requirements.txt +1 -1
- space.py +1 -8
- src/README.md +1 -8
- src/demo/app.py +1 -8
- src/demo/space.py +1 -8
README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
---
|
3 |
tags: [gradio-custom-component,gradio-template-Image,bounding box,annotator,annotate,boxes]
|
4 |
title: gradio_image_annotation V0.0.7
|
5 |
-
colorFrom:
|
6 |
colorTo: green
|
7 |
sdk: docker
|
8 |
pinned: false
|
|
|
2 |
---
|
3 |
tags: [gradio-custom-component,gradio-template-Image,bounding box,annotator,annotate,boxes]
|
4 |
title: gradio_image_annotation V0.0.7
|
5 |
+
colorFrom: yellow
|
6 |
colorTo: green
|
7 |
sdk: docker
|
8 |
pinned: false
|
app.py
CHANGED
@@ -35,20 +35,13 @@ with gr.Blocks() as demo:
|
|
35 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
36 |
label_list=["Person", "Vehicle"],
|
37 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
38 |
-
|
39 |
-
handle_size=6,
|
40 |
-
box_thickness=0,
|
41 |
-
box_selected_thickness=1,
|
42 |
)
|
43 |
button_get = gr.Button("Get bounding boxes")
|
44 |
json_boxes = gr.JSON()
|
45 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
46 |
with gr.Tab("Crop"):
|
47 |
with gr.Row():
|
48 |
-
annotator_crop = image_annotator(example, image_type="numpy"
|
49 |
-
handle_size=6,
|
50 |
-
box_thickness=1,
|
51 |
-
box_selected_thickness=1,)
|
52 |
image_crop = gr.Image()
|
53 |
button_crop = gr.Button("Crop")
|
54 |
button_crop.click(crop, annotator_crop, image_crop)
|
|
|
35 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
36 |
label_list=["Person", "Vehicle"],
|
37 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
|
|
|
|
|
|
|
|
38 |
)
|
39 |
button_get = gr.Button("Get bounding boxes")
|
40 |
json_boxes = gr.JSON()
|
41 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
42 |
with gr.Tab("Crop"):
|
43 |
with gr.Row():
|
44 |
+
annotator_crop = image_annotator(example, image_type="numpy")
|
|
|
|
|
|
|
45 |
image_crop = gr.Image()
|
46 |
button_crop = gr.Button("Crop")
|
47 |
button_crop.click(crop, annotator_crop, image_crop)
|
requirements.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
gradio_image_annotation
|
|
|
1 |
+
gradio_image_annotation==0.0.7
|
space.py
CHANGED
@@ -75,20 +75,13 @@ with gr.Blocks() as demo:
|
|
75 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
76 |
label_list=["Person", "Vehicle"],
|
77 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
78 |
-
|
79 |
-
handle_size=6,
|
80 |
-
box_thickness=0,
|
81 |
-
box_selected_thickness=1,
|
82 |
)
|
83 |
button_get = gr.Button("Get bounding boxes")
|
84 |
json_boxes = gr.JSON()
|
85 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
86 |
with gr.Tab("Crop"):
|
87 |
with gr.Row():
|
88 |
-
annotator_crop = image_annotator(example, image_type="numpy"
|
89 |
-
handle_size=6,
|
90 |
-
box_thickness=1,
|
91 |
-
box_selected_thickness=1,)
|
92 |
image_crop = gr.Image()
|
93 |
button_crop = gr.Button("Crop")
|
94 |
button_crop.click(crop, annotator_crop, image_crop)
|
|
|
75 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
76 |
label_list=["Person", "Vehicle"],
|
77 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
|
|
|
|
|
|
|
|
78 |
)
|
79 |
button_get = gr.Button("Get bounding boxes")
|
80 |
json_boxes = gr.JSON()
|
81 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
82 |
with gr.Tab("Crop"):
|
83 |
with gr.Row():
|
84 |
+
annotator_crop = image_annotator(example, image_type="numpy")
|
|
|
|
|
|
|
85 |
image_crop = gr.Image()
|
86 |
button_crop = gr.Button("Crop")
|
87 |
button_crop.click(crop, annotator_crop, image_crop)
|
src/README.md
CHANGED
@@ -50,20 +50,13 @@ with gr.Blocks() as demo:
|
|
50 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
51 |
label_list=["Person", "Vehicle"],
|
52 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
53 |
-
|
54 |
-
handle_size=6,
|
55 |
-
box_thickness=0,
|
56 |
-
box_selected_thickness=1,
|
57 |
)
|
58 |
button_get = gr.Button("Get bounding boxes")
|
59 |
json_boxes = gr.JSON()
|
60 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
61 |
with gr.Tab("Crop"):
|
62 |
with gr.Row():
|
63 |
-
annotator_crop = image_annotator(example, image_type="numpy"
|
64 |
-
handle_size=6,
|
65 |
-
box_thickness=1,
|
66 |
-
box_selected_thickness=1,)
|
67 |
image_crop = gr.Image()
|
68 |
button_crop = gr.Button("Crop")
|
69 |
button_crop.click(crop, annotator_crop, image_crop)
|
|
|
50 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
51 |
label_list=["Person", "Vehicle"],
|
52 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
|
|
|
|
|
|
|
|
53 |
)
|
54 |
button_get = gr.Button("Get bounding boxes")
|
55 |
json_boxes = gr.JSON()
|
56 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
57 |
with gr.Tab("Crop"):
|
58 |
with gr.Row():
|
59 |
+
annotator_crop = image_annotator(example, image_type="numpy")
|
|
|
|
|
|
|
60 |
image_crop = gr.Image()
|
61 |
button_crop = gr.Button("Crop")
|
62 |
button_crop.click(crop, annotator_crop, image_crop)
|
src/demo/app.py
CHANGED
@@ -35,20 +35,13 @@ with gr.Blocks() as demo:
|
|
35 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
36 |
label_list=["Person", "Vehicle"],
|
37 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
38 |
-
|
39 |
-
handle_size=6,
|
40 |
-
box_thickness=0,
|
41 |
-
box_selected_thickness=1,
|
42 |
)
|
43 |
button_get = gr.Button("Get bounding boxes")
|
44 |
json_boxes = gr.JSON()
|
45 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
46 |
with gr.Tab("Crop"):
|
47 |
with gr.Row():
|
48 |
-
annotator_crop = image_annotator(example, image_type="numpy"
|
49 |
-
handle_size=6,
|
50 |
-
box_thickness=1,
|
51 |
-
box_selected_thickness=1,)
|
52 |
image_crop = gr.Image()
|
53 |
button_crop = gr.Button("Crop")
|
54 |
button_crop.click(crop, annotator_crop, image_crop)
|
|
|
35 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
36 |
label_list=["Person", "Vehicle"],
|
37 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
|
|
|
|
|
|
|
|
38 |
)
|
39 |
button_get = gr.Button("Get bounding boxes")
|
40 |
json_boxes = gr.JSON()
|
41 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
42 |
with gr.Tab("Crop"):
|
43 |
with gr.Row():
|
44 |
+
annotator_crop = image_annotator(example, image_type="numpy")
|
|
|
|
|
|
|
45 |
image_crop = gr.Image()
|
46 |
button_crop = gr.Button("Crop")
|
47 |
button_crop.click(crop, annotator_crop, image_crop)
|
src/demo/space.py
CHANGED
@@ -75,20 +75,13 @@ with gr.Blocks() as demo:
|
|
75 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
76 |
label_list=["Person", "Vehicle"],
|
77 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
78 |
-
|
79 |
-
handle_size=6,
|
80 |
-
box_thickness=0,
|
81 |
-
box_selected_thickness=1,
|
82 |
)
|
83 |
button_get = gr.Button("Get bounding boxes")
|
84 |
json_boxes = gr.JSON()
|
85 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
86 |
with gr.Tab("Crop"):
|
87 |
with gr.Row():
|
88 |
-
annotator_crop = image_annotator(example, image_type="numpy"
|
89 |
-
handle_size=6,
|
90 |
-
box_thickness=1,
|
91 |
-
box_selected_thickness=1,)
|
92 |
image_crop = gr.Image()
|
93 |
button_crop = gr.Button("Crop")
|
94 |
button_crop.click(crop, annotator_crop, image_crop)
|
|
|
75 |
{"image": "https://gradio-builds.s3.amazonaws.com/demo-files/base.png"},
|
76 |
label_list=["Person", "Vehicle"],
|
77 |
label_colors=[(0, 255, 0), (255, 0, 0)],
|
|
|
|
|
|
|
|
|
78 |
)
|
79 |
button_get = gr.Button("Get bounding boxes")
|
80 |
json_boxes = gr.JSON()
|
81 |
button_get.click(get_boxes_json, annotator, json_boxes)
|
82 |
with gr.Tab("Crop"):
|
83 |
with gr.Row():
|
84 |
+
annotator_crop = image_annotator(example, image_type="numpy")
|
|
|
|
|
|
|
85 |
image_crop = gr.Image()
|
86 |
button_crop = gr.Button("Crop")
|
87 |
button_crop.click(crop, annotator_crop, image_crop)
|