Dear Slicer community,
I have a few minor questions and one big question on MONAI Label as I try to train from scratch.
So let me start by stating the big question first.
Because I do not know the target_spacing and spatial_size, I tried using the --conf heuristic_planner true command as mentioned in this forum.
monailabel start_server --app /sample-apps/histology --studies /datasets/Task11_BR/imagesTr --conf models deepedit --conf heuristic_planner true --port 8000 --host 127.0.0.1
When I use the command, it gives me the following error message.
[2022-07-19 19:44:29,031] [11632] [MainThread] [INFO] (monailabel.utils.others.planner:35) - Reading datastore metadata for heuristic plannerâŚ
0%| | 0/10 [00:00<?, ?it/s]
[2022-07-19 19:44:29,812] [11632] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):
File âC:\ProgramData\Anaconda3\lib\site-packages\starlette\routing.pyâ, line 635, in lifespan
async with self.lifespan_context(app):
File âC:\ProgramData\Anaconda3\lib\site-packages\starlette\routing.pyâ, line 530, in aenter
await self._router.startup()
File âC:\ProgramData\Anaconda3\lib\site-packages\starlette\routing.pyâ, line 612, in startup
await handler()
File âUSERSITE\MONAILabel\monailabel\app.pyâ, line 103, in startup_event
instance = app_instance()
File âUSERSITE\MONAILabel\monailabel\interfaces\utils\app.pyâ, line 51, in app_instance
app = c(app_dir=app_dir, studies=studies, conf=conf)
File âUSERSITE\MONAILabel\sample-apps\histology\main.pyâ, line 89, in init
super().init(
File âUSERSITE\MONAILabel\monailabel\interfaces\app.pyâ, line 90, in init
self._datastore: Datastore = self.init_datastore()
File âUSERSITE\MONAILabel\sample-apps\histology\main.pyâ, line 100, in init_datastore
self.planner.run(datastore)
File âUSERSITE\MONAILabel\monailabel\utils\others\planner.pyâ, line 58, in run
if mtdt[âpixdimâ][4] > 0:
KeyError: âpixdimâ[2022-07-19 19:44:29,813] [11632] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.
The histology mentioned above is the copy of the radiology app I created to change labels.
The server works fine without the heuristic planer, and I could not figure out why this might be.
How can I figure out the target_spacing and spatial_size?
Is there any other way?
And here are my minor curiosities.
- The data I used were in *.nrrd format. At first, I saved the volumes as Seg##.nrrd and the segmentations as Seg##.seg.nrrd. In return, it gave me the following message. [2022-07-19 14:23:36,675] [13136] [MainThread] [WARNING] (monailabel.datastore.local:583) - IGNORE:: No matching image exists for âSeg01.segâ to add [Seg01.seg.nrrd] I figured this could be due to the .seg part of the naming, so I changed the volume file names to include .seg, just like the segmentation files. Am I allowed to do this? Will this cause any problems during the training process?
- Also, when I copied the radiology folder to make the histology folder, the server did not start right when I deleted the segmentation_spleen subclass. I was just curious why this may happen.
- Lastly, the changes I made, such as labels and use_pretrained_model false, were not reflected until I made a separate histology folder. Is there any reason behind this?