Tweaks!
Browse files- app.py +5 -4
- sample1.jpeg +0 -0
- sample2.jpeg +0 -0
app.py
CHANGED
@@ -122,10 +122,10 @@ def run_chm(source_image, target_image, selected_points, number_src_points , chm
|
|
122 |
ax[1].set_yticks([])
|
123 |
|
124 |
for TL in range(49):
|
125 |
-
ax[0].text(x=src_points_converted[TL][0], y=src_points_converted[TL][1], s=str(TL), fontdict=dict(color='red', size=
|
126 |
|
127 |
for TL in range(49):
|
128 |
-
ax[1].text(x=tgt_points_converted[TL][0], y=tgt_points_converted[TL][1], s=f'{str(TL)}', fontdict=dict(color='orange', size=
|
129 |
|
130 |
plt.tight_layout()
|
131 |
fig.suptitle('CHM Correspondences\nUsing $\it{pas\_psi.pt}$ Weights ', fontsize=16)
|
@@ -143,7 +143,7 @@ def generate_correspondences(sousrce_image, target_image, min_x=1, max_x=100, mi
|
|
143 |
|
144 |
# GRADIO APP
|
145 |
title = "Correspondence Matching with Convolutional Hough Matching Networks "
|
146 |
-
description = "Performs keypoint transform from a 7x7 gird
|
147 |
article = "<p style='text-align: center'><a href='https://github.com/juhongm999/chm' target='_blank'>Original Github Repo</a></p>"
|
148 |
|
149 |
iface = gr.Interface(fn=generate_correspondences,
|
@@ -154,5 +154,6 @@ iface = gr.Interface(fn=generate_correspondences,
|
|
154 |
gr.inputs.Slider(minimum=1, maximum=240, step=1, default=15, label='Min Y'),
|
155 |
gr.inputs.Slider(minimum=1, maximum=240, step=1, default=215, label='Max Y')], outputs="plot", enable_queue=True, title=title,
|
156 |
description=description,
|
157 |
-
article=article,
|
|
|
158 |
iface.launch()
|
|
|
122 |
ax[1].set_yticks([])
|
123 |
|
124 |
for TL in range(49):
|
125 |
+
ax[0].text(x=src_points_converted[TL][0], y=src_points_converted[TL][1], s=str(TL), fontdict=dict(color='red', size=11))
|
126 |
|
127 |
for TL in range(49):
|
128 |
+
ax[1].text(x=tgt_points_converted[TL][0], y=tgt_points_converted[TL][1], s=f'{str(TL)}', fontdict=dict(color='orange', size=11))
|
129 |
|
130 |
plt.tight_layout()
|
131 |
fig.suptitle('CHM Correspondences\nUsing $\it{pas\_psi.pt}$ Weights ', fontsize=16)
|
|
|
143 |
|
144 |
# GRADIO APP
|
145 |
title = "Correspondence Matching with Convolutional Hough Matching Networks "
|
146 |
+
description = "Performs keypoint transform from a 7x7 gird on the source image to the target image. Use the sliders to adjust the grid."
|
147 |
article = "<p style='text-align: center'><a href='https://github.com/juhongm999/chm' target='_blank'>Original Github Repo</a></p>"
|
148 |
|
149 |
iface = gr.Interface(fn=generate_correspondences,
|
|
|
154 |
gr.inputs.Slider(minimum=1, maximum=240, step=1, default=15, label='Min Y'),
|
155 |
gr.inputs.Slider(minimum=1, maximum=240, step=1, default=215, label='Max Y')], outputs="plot", enable_queue=True, title=title,
|
156 |
description=description,
|
157 |
+
article=article,
|
158 |
+
examples=[['sample1.jpeg', 'sample2.jpeg', 15, 215, 15, 215]])
|
159 |
iface.launch()
|
sample1.jpeg
ADDED
![]() |
sample2.jpeg
ADDED
![]() |