Forum

Author Topic: Segmentation  (Read 1053 times)

jrh87

  • Newbie
  • *
  • Posts: 14
    • View Profile
Segmentation
« on: March 18, 2025, 06:48:26 PM »
Is there any way to apply auto-segmentation on a 3D model? For example, I am taking drone pictures of a building, but other buildings in the background appear in the scene and I would like to have a method to automatically segment only the building of interest and remove the rest. Alternatively, can Metashape only generate the 3D model of the area at the front and do not generate it for the background (e.g. some sort of masking).

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Segmentation
« Reply #1 on: March 19, 2025, 04:12:35 PM »
Hi jrh87,

As far as i know, an auto-segmentation is not (yet) available.
One possible solution to your problem would be to generate your 3D-Model as you normally would and then set a boundary around the object you want your 3D-Model of.
In the export-dialog of the 3D-Model you can set the model to "clip to boundary shapes". That way you only export the wanted 3D-Model and nothing in the background.

A boundary can (to my knowledge) only be created on a DEM or Orthomosaic, so you would have to calculate those as well.

Set a boundary:
1) draw a polygon around the area you want to have a 3D-Model of in your DEM or Orthomosaic by using the polygon/polyline tool (image 1).
2) select navigation (the arrow-symbol in the toolbar) and select the just drawn polygon.
3) right click and "Set Boundary Type" --> "Outer Boundary", your Polygon should now turn into a hashed line (image 2).
4) right click on your 3D-Model and follow the export-dialogue. There you will have the opportunity to select "Clip to boundary shapes (image 3).

The exported 3D-Model will be clipped to your boundary and nothing outside said boundary will be visible in the final model.

Does this answer your question?
Good luck and all the best!
« Last Edit: March 19, 2025, 04:14:20 PM by Duringar »

olihar

  • Sr. Member
  • ****
  • Posts: 322
    • View Profile
Re: Segmentation
« Reply #2 on: March 19, 2025, 04:27:33 PM »

Of course you can use the Bounding Box and or Clipping mask.

jrh87

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Segmentation
« Reply #3 on: March 19, 2025, 04:46:10 PM »
I was looking for some automated, as in either changing the settings or having some AI segmentation models.

olihar

  • Sr. Member
  • ****
  • Posts: 322
    • View Profile
Re: Segmentation
« Reply #4 on: March 19, 2025, 05:10:38 PM »

Why AI, AI is just an overused word noone understands.

What do you want the AI to do, make automatic bounding box for you?

jrh87

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Segmentation
« Reply #5 on: March 20, 2025, 03:53:44 AM »
Yes, given a 3D model containing different buildings, I need some automated way to extract each building separately. Note that the buildings may overlap with each other, so they are mostly different by height, textures, etc.

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Segmentation
« Reply #6 on: March 20, 2025, 10:29:30 AM »
Yes, given a 3D model containing different buildings, I need some automated way to extract each building separately. Note that the buildings may overlap with each other, so they are mostly different by height, textures, etc.

I do not think this is possible as of now. The available solutions to your problem have been named already.

olihar

  • Sr. Member
  • ****
  • Posts: 322
    • View Profile
Re: Segmentation
« Reply #7 on: March 20, 2025, 03:37:25 PM »

You can train AI on the orthographic data to make cutting boxes around the buildings.