Open sharoseali opened 2 days ago
Hi @sharoseali From what I can see, it looks like you defined a bounding box for the ROI with support points inside it. As mentioned in the README file, points are not supported as standalone prompts, so the points you added are considered to belong for the same object, which explains the rectangular mask. Try either automatic segmentation as explained in the repo, or define a bounding box for each building inside the ROI. Then if needed, you can add prompt points inside the bounding box of each object defining the foreground and background. Regarding the image, could you provide more info on the source of this image? Make sure that the image is scaled between 0 and 255 to be correctly overlayed on the map. Also, this is required by SAM.
hi @AlbughdadiM Well I have tried to apply automatic segmentation again carefully. But getting the same results. It draws one big polygon on the area. Also, I tried Foreground and background pixels but got the same output. Here is the tiff file link.
For image scaling, I don't think so we have any implementation code that extracts tile from ROI and rescales it.
hi @sharoseali There are two concerns regarding the image:
I cropped part of the image and performed automatic and prompt segmentation as you can see in the following screenshots
I see did you update the code also in sam utils? OR I have used dashboard wrongly ?
only minor changes to handle data types when creating the PNG but this doesn't affect the segmentation as the GeoTiff image is directly used for that
The fourth band will be probably treated as alpha band. So this should be removed.
The size of the image is very large and it requires a lot of resources
I have checked same Tiff image using Sam Geo library. It has given very good results without cropping or changing tiff to PNG. I also created GeoJSON and map on QGIS. Its working correctly for the whole image. Normally it loose accuracy if we give very huge tile to it.
May be need some more operations to handle all size imagery in your implementation. Will try to compare the codes.
The fourth band will be probably treated as alpha band. So this should be removed.
The size of the image is very large and it requires a lot of resources
I have checked same Tiff image using Sam Geo library. It has given very good results without cropping or changing tiff to PNG. I also created GeoJSON and map on QGIS. Its working correctly for the whole image. Normally it loose accuracy if we give very huge tile to it.
May be need some more operations to handle all size imagery in your implementation. Will try to compare the codes.
The PNG is only to overlay on the map but not used for segmentation.
HI @AlbughdadiM I have opened another issue as the topic is different.
I've opened another issue since the topics are different.
Previously, I worked on SAM Geo, where we can segment buildings. In that context, SAM can easily detect buildings without requiring explicit foreground inputs. However, in this case, the output is quite different. After applying Zoom and drawing the ROI, the result is a single polygon. I also tried using the SAM L and SAM H models.
Do I need to adjust any specific settings in the code? Also tiff imagery appearance is quite bright as compared to QGIS appearance. like this :