-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http error: 404 #2
Comments
Hi @romainGuiet , thank you for trying it! The URL needs to be the complete endpoint URL including |
That's great it works for your RGB data! 👍 |
Hi If it's something else, then there's a strong chance I understand you're using base64 in the end with PNG. One way to get a useful byte array to encode is to convert to ImageJ TIFF bytes, e.g. public static byte[] getImageBytes(ImageServer<BufferedImage> server, RegionRequest request) throws IOException {
if (server.isRGB()) {
// Do whatever you usually do (PNG should be ok)
var img = server.readRegion(request);
return // ImageIO code to PNG
}
var imp = IJTools.convertToImagePlus(server, request).getImage();
return new FileSaver(imp).serialize();
} where Alternatively, if you really want an RGB version (applying whatever settings are used in the viewer), then you can create a |
Thank you @petebankhead for your kind reply and nice suggestion. Because all pre-trained models provided in the original SAM repository require an input image with three channels, we need to somehow convert a multi-channel image to a three-channel image in either Java or Python. https://github.com/facebookresearch/segment-anything/blob/6fdee8f2727f4506cfbbe553e23b895e27956588/segment_anything/build_sam.py#L67 I think using RenderedImageServer is easy to achieve it. If you have a good approach to converting a multi-channel raw image into a three-channel image, please let me know. |
If using SAM as an 'annotation assistant', then I think For training StarDist/CellPose, then passing the raw pixels could be useful - e.g. if you're able to train a single-channel StarDist model (like the DSB2018 model from StarDist's original creators). In that case, you might use |
Thanks @petebankhead , both totally make sense. I will use RenderedImageServer for the SAM module. |
@romainGuiet please try qupath-extension-sam-0.2.0.jar. @petebankhead RenderedImageServer works as I expected, thank you again for your help! |
Hi @ksugar ,
thank you for making this tool available !
The installation went smoothly but after starting the app:
and setting the server url :
After enabling SAM ViT-H, I created my first rectangle and got an error
I tested RGB transmission image and fluorescence image, with the 3 different models...
Thank you for your help,
Cheers,
Romain
The text was updated successfully, but these errors were encountered: