LPX55 commited on
Commit
c2f71eb
·
verified ·
1 Parent(s): a05b771

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -152,8 +152,8 @@ with gr.Blocks() as demo:
152
  tracking_points = gr.State([])
153
  trackings_input_label = gr.State([])
154
  with gr.Column():
155
- gr.Markdown("# SAM2 Image Predictor (CPU Version)")
156
- gr.Markdown("This version runs entirely on CPU")
157
  with gr.Row():
158
  with gr.Column():
159
  input_image = gr.Image(label="input image", interactive=False, type="filepath", visible=False)
@@ -163,11 +163,11 @@ with gr.Blocks() as demo:
163
  clear_points_btn = gr.Button("Clear Points")
164
  checkpoint = gr.Dropdown(label="Checkpoint", choices=["tiny", "small", "base-plus", "large"], value="base-plus")
165
  with gr.Row():
166
- expand_contract_px = gr.Slider(minimum=0, maximum=50, value=0, label="Expand/Contract (pixels)")
167
- expand = gr.Radio(["Expand", "Contract"], value="Expand", label="Action")
168
  with gr.Row():
169
  feathering_enabled = gr.Checkbox(value=False, label="Enable Feathering")
170
- feather_size = gr.Slider(minimum=1, maximum=50, value=10, label="Feathering Size", visible=False)
171
  submit_btn = gr.Button("Submit")
172
  with gr.Column():
173
  output_result = gr.Image()
 
152
  tracking_points = gr.State([])
153
  trackings_input_label = gr.State([])
154
  with gr.Column():
155
+ gr.Markdown("# Point-Seg Masking by SAM2.1 Image Predictor (CPU Optimized)")
156
+
157
  with gr.Row():
158
  with gr.Column():
159
  input_image = gr.Image(label="input image", interactive=False, type="filepath", visible=False)
 
163
  clear_points_btn = gr.Button("Clear Points")
164
  checkpoint = gr.Dropdown(label="Checkpoint", choices=["tiny", "small", "base-plus", "large"], value="base-plus")
165
  with gr.Row():
166
+ expand_contract_px = gr.Slider(minimum=0, maximum=50, value=0, step=1, label="Expand / Contract Amount (px)")
167
+ expand = gr.Radio(["Expand", "Contract"], value="Expand", label="Refine Mask")
168
  with gr.Row():
169
  feathering_enabled = gr.Checkbox(value=False, label="Enable Feathering")
170
+ feather_size = gr.Slider(minimum=1, maximum=50, value=10, step=1, label="Feathering Size", visible=False)
171
  submit_btn = gr.Button("Submit")
172
  with gr.Column():
173
  output_result = gr.Image()