Open patel-zeel opened 13 hours ago
This is possible through the ipyleaflet Geoman Draw Control. https://ipyleaflet.readthedocs.io/en/latest/controls/geoman_draw_control.html
import geemap
from ipyleaflet import Map, GeomanDrawControl
m = geemap.Map(center=(50, 354), zoom=5, draw_ctrl=False)
draw_control = GeomanDrawControl()
draw_control.polyline = {
"pathOptions": {
"color": "#6bc2e5",
"weight": 8,
"opacity": 1.0
}
}
draw_control.polygon = {
"pathOptions": {
"fillColor": "#6be5c3",
"color": "#6be5c3",
"fillOpacity": 1.0
}
}
draw_control.circlemarker = {
"pathOptions": {
"fillColor": "#efed69",
"color": "#efed69",
"fillOpacity": 0.62
}
}
draw_control.rectangle = {
"pathOptions": {
"fillColor": "#fca45d",
"color": "#fca45d",
"fillOpacity": 1.0
}
}
m.add(draw_control)
m
This is precisely what I thought with P1. Thank you, Prof. @giswqs! For P2, how to load previously saved features and edit their geometry?
I am not sure it if supports loading existing vector data. You need to study their source code to see if it is feasible. https://www.geoman.io/docs/modes/draw-mode#customize-style https://github.com/jupyter-widgets/ipyleaflet/blob/master/python/ipyleaflet/ipyleaflet/leaflet.py#L2294
Sure, Prof. @giswqs. I'll try to figure it out and if it works, will share here for everyone.
Description
Motivation
Oriented bounding box (OBB) detection applications are increasing, especially in communities working on aerial/satellite imagery. Top computer vision conferences such as CVPR and ICCV have numerous papers proposing new methods to detect OBBs every year. OpenMMLab has a library
mmrotate
just for OBB detection. Few paperswithcode threads track the state-of-the-art in OBB detection [thread1, thread2].Proposals
P1:
geemap
drawing tools allow drawing a rectangle as well as a polygon. An OBB is something between the two. It needs 4 coordinates like a quadrilateral (Polygon) to represent itself correctly, but it has to be rectangular. Imagery labeling tools such as label-studio and Microsoft's satellite imagery labeling tool allow drawing a rectangle and then allow to rotate it. I thinkgeemap
has the necessary building blocks to make this happen and will immensely benefit the growing OBB community. Specifically, programmatic control ofgeemap
makes it a very attractive tool for OBB labeling.P2: If
geemap
allows loading existing Polygons, not as a layer but an editable feature, it can be very useful to adjust wrongly predicted bounding boxes. Changing the class value is currently possible inleafmap
via a solution proposed here.