Steps for Multi-label 2D Segmentation in Endoscopy App #1296
Replies: 6 comments 11 replies
-
https://github.com/Project-MONAI/MONAILabel/blob/main/monailabel/datastore/cvat.py#L52 |
Beta Was this translation helpful? Give feedback.
-
you can put labels in file and possible use --conf cvat_labels tooltracking.. u should be train from scratch.. i didn't get where you are currently stuck. you should try using directly main.py from endoscopy to train your model from scratch.. which shall be more easy. Since it's a monaibundle.. you can use the bundle directly to train a model. |
Beta Was this translation helpful? Give feedback.
-
Will reply to your questions shortly with example/solution.. meanwhile can you please let the MONAI team know the usecase that you are trying. Some background/context. This will help to prioritize and support things better. |
Beta Was this translation helpful? Give feedback.
-
For the label file.. I suggest you change things here.. you can define your own --conf saying And then use the same load your json file and pass it to cvat datastore. You can read the file.json and pass filename = self.conf.get("cvat_labels_file")
with open(filename, "r") as fp:
labels = json.load(fp)
def init_datastore(self) -> Datastore:
if settings.MONAI_LABEL_DATASTORE_URL and settings.MONAI_LABEL_DATASTORE.lower() == "cvat":
logger.info(f"Using CVAT: {self.studies}")
return CVATDatastore(labels=labels, ...,)
return super().init_datastore() |
Beta Was this translation helpful? Give feedback.
-
@tangy5 can help you a bit here.. |
Beta Was this translation helpful? Give feedback.
-
HI @bilalcodehub ,
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to customise the built-in endoscopy app for a multi-labeling 2D segmentation in 'monailabel'. I want to capture everything I needed or did for this customisation with the hope that someone (newbie like me) might find it useful, plus to get community support which is key to keep me get going with this task.
The first step was to define the data source containing images from surgical videos. I was able to achieve this by mapping the host folder with
monailabel
docker using the following command:The
-v
switch maps the host folder/home/big-deal/Documents/mlworks/datasets
with docker volume/opt/monai/datasets
to keep the work persistent when the docker is closed and make life much easier. Then I accessed host folder from themonailabel
server using the following command:It worked like a charm.
The next step is to define custom labels for fourteen surgical instruments. I added the line:
self.lables = {'tool-1':1,'tool-b':2, 'tool-c':3,...}
, toapps/endoscopy/lib/configs/tooltracking.py
file and started the server using the following command:The server runs and starts pushing tasks to the CVAT docker. However, I still can't see my custom labels. Check the screenshot below:
CVAT is still showing the
Tool
,InBody
, andOutBody
for the task. Is that the right place to make the changes? Do I have to add labels to CVAT to make it happen?Beta Was this translation helpful? Give feedback.
All reactions