MCPcopy
hub / github.com/opengeos/segment-geospatial / close

Method close

samgeo/samgeo3.py:5317–5331  ·  view source on GitHub ↗

Close the current session and free GPU resources. Call this when you're done with the current video and want to process a new one, or when you want to free up memory.

(self)

Source from the content-addressed store, hash-verified

5315 plt.show()
5316
5317 def close(self) -> None:
5318 """Close the current session and free GPU resources.
5319
5320 Call this when you're done with the current video and want to
5321 process a new one, or when you want to free up memory.
5322 """
5323 if self.session_id is not None:
5324 self.predictor.handle_request(
5325 request=dict(
5326 type="close_session",
5327 session_id=self.session_id,
5328 )
5329 )
5330 self.session_id = None
5331 print("Session closed.")
5332
5333 def shutdown(self) -> None:
5334 """Shutdown the predictor and free all GPU resources.

Callers 10

shutdownMethod · 0.95
__del__Method · 0.95
_show_single_annMethod · 0.80
show_frameMethod · 0.80
paste_tileFunction · 0.80
finish_pictureFunction · 0.80
marker_button_clickFunction · 0.80
close_btn_clickFunction · 0.80
save_masksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected