-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Dear @ksugar,
I am trying to train a model with Cellsparse-api, in Qupath. I created annotations with the SAM-api, which I assigned to the Foreground and Background classes with no issues but when I want to run Cellsparce>StarDist>training I get an internal server error.
This happens on a single-plane greyscale image. I've set up SAM and cellsparse on different ports.
Below is the error I get in my console:
INFO: Started server process [28052]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:62580 - "POST /stardist/ HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\fastapi\applications.py", line 276, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
raise exc
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\fastapi\routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\cellsparse_api\main.py", line 144, in stardist
return run(
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\cellsparse_api\main.py", line 42, in run
img = normalize(decode_image(b64img), 0, 100, axis=(0, 1))
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\cellsparse_api\main.py", line 30, in decode_image
return np.array(Image.open(io.BytesIO(base64.b64decode(b64data))))
File "C:\Users\LPUoO\anaconda3\envs\cellsparse-api\lib\site-packages\PIL\Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x00000158029F9B70>
Am I making a mistake?
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels