Project-MONAI / MONAILabel

MONAI Label is an intelligent open source image labeling and learning tool.
https://docs.monai.io/projects/label
Apache License 2.0
565 stars 185 forks source link

MONAILabel Inference Requests for specific image IDs. #1649

Open kenbutcher opened 3 months ago

kenbutcher commented 3 months ago

Is your feature request related to a problem? Please describe. We are continuing to develop the workflow between Xnat and MONAILabel.

Could we please add the ability to trigger inference requests from xnat for a specific image id. We need to call a batch inference with specific image ids.

AHarouni commented 3 months ago

This should be straight forward just change the BatchInferTask to check on the image_ids in the request and use them if they exist, other wise do the current behavior

### BatchInferTask class
    def __call__(self, request, datastore: Datastore, infer: Callable):
        image_ids = request.get("image_ids", "")
        if image_ids:
            request["multi_gpu"] = False
            request["result_extension"] = ".nii.gz"  ### should limit this for xnat workflow only
        else:
            image_ids = sorted(self.get_images(request, datastore))
DrAkshaykumar commented 4 days ago

@AHarouni Want to request this feature too. Thank you in advance :)