Skip to content

Real-Time Segmentation on Video #1973

Discussion options

You must be logged in to vote

You can directly run and time the run_case_npy and see if using it gives you the same result as predict_from_files.
Among other things, run_case_npy executes cropping, normalization and resampling. As far as I know, resampling takes a lot of time, but you need to measure for your case.
One way to optimize the code is to implement the numpy operations inplace for normalization, and cropping could be reimplemented like this: https://github.com/ancestor-mithril/nnUNet/blob/7b53480b2a16dd4dd05a6e02b1797e15f456dcc7/nnunetv2/preprocessing/cropping/cropping.py#L23.

But once again, you should measure which steps take the most time in your case and try to optimize those.

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@ancestor-mithril
Comment options

@ancestor-mithril
Comment options

@rahulghosh2
Comment options

@ancestor-mithril
Comment options

Answer selected by rahulghosh2
@ish2002
Comment options

@rahulghosh2
Comment options

Comment options

You must be logged in to vote
1 reply
@rahulghosh2
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants