Closed jlvahldiek closed 2 years ago
Thanks, @jlvahldiek What do you mean by importing the label? Are you trying to load the label using Slicer? Could you please expand more on this? Also, from the error you showed (FileNotFoundError: [Errno 2] No such file or directory: '/workspace/data/./patient_0001.nii.gz'), I can see the label isn't stored in /workspace/data/labels/final/
You are mixing the types.. image is dcm.. label is niii
Thanks, @diazandr3s and @SachidanandAlle
I was just wondering if the file path that is passed to file_checksum() in _add_non_existing_label() on line 586 in monailabel/datastore/local.py is probably constructed incorrectly.
This path should point to a label file and not to an image. I suggest to change _datastore.image_path() to _datastore.label_path() in the os.path.join statement on line 586.
Please feel free to raise a PR.. at the end... its all open source
Just raised PR #557. Could be closed. Thank you.
Describe the bug Pre-existing labels will not be imported if the file extension differs from the file extension of the corresponding image.
To Reproduce Steps to reproduce the behavior:
monailabel start_server --app app --studies /data
[2021-12-10 08:55:32,763] [436] [MainThread] [ERROR] (uvicorn.error:35) - Application startup failed. Exiting.
"checksum": file_checksum(os.path.join(self._datastore.label_path(), name)),`
python -c 'import monai; monai.config.print_debug_info()'
================================ Printing MONAI config...
MONAI version: 0.8.0+4.g8a1454a7 Numpy version: 1.21.2 Pytorch version: 1.10.0a0+0aef44c MONAI flags: HAS_EXT = True, USE_COMPILED = False MONAI rev id: 8a1454a75de71ee50099d0302ce5146c900cee09
Optional dependencies: Pytorch Ignite version: 0.4.6 Nibabel version: 3.2.1 scikit-image version: 0.18.3 Pillow version: 8.4.0 Tensorboard version: 2.6.0 gdown version: 4.2.0 TorchVision version: 0.11.0a0 tqdm version: 4.62.3 lmdb version: 1.2.1 psutil version: 5.8.0 pandas version: 1.3.4 einops version: 0.3.2 transformers version: 4.12.5 mlflow version: 1.21.0
For details about installing the optional dependencies, please visit: https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
================================ Printing system config...
System: Linux Linux version: Ubuntu 20.04.3 LTS Platform: Linux-5.10.76-linuxkit-x86_64-with-glibc2.10 Processor: x86_64 Machine: x86_64 Python version: 3.8.12 Process name: python Command: ['python', '-c', 'import monai; monai.config.print_debug_info()'] Open files: [] Num physical CPUs: 2 Num logical CPUs: 2 Num usable CPUs: 2 CPU usage (%): [7.3, 25.3] CPU freq. (MHz): 3200 Load avg. in last 1, 5, 15 mins (%): [14.5, 30.0, 34.0] Disk usage (%): 46.1 Avg. sensor temp. (Celsius): UNKNOWN for given OS Total physical memory (GB): 1.9 Available memory (GB): 1.1 Used memory (GB): 0.4
================================ Printing GPU config...
Num GPUs: 0 Has CUDA: False cuDNN enabled: True cuDNN version: 8204