English | 简体中文
There are some tool scriptings in EISeg in path of EISeg/tool
.
After completing image anotation by EISeg,by applying eiseg2paddlex.py
in tool
file, yoou can quickly convert data to PaddleX format for training. Execute the following command:
python eiseg2paddlex.py -d save_folder_path -o image_folder_path [-l label_folder_path] [-m mode -s split_rate]
save_folder_path
: path to save PaddleX format data.image_folder_path
: path of data to be converted.label_folder_path
: path of the label, optional, default is "image_folder_path/label".mode
:Type of dataset, optional, default is “seg”, if this dataset is detection dataset, please use “det”.split_rate
: The devision ratio of training set and validation set, optional, default is 0.9.
The semantic segmentation label is converted to the instance segmentation label (the original label is in range [0,255], and the result is a single-channel image that uses a palette to color. Through the semantic2instance.py
, the semantic segmentation data marked by EISeg can be converted into instance segmentation data. Use the following method:
python semantic2instance.py -o label_path -d save_path
Parameters:
label_path
: path to semantic label, required.save_path
: path to instance label, required.
Due to the huge amount of video data calculation, in order to prevent insufficient video memory, it is recommended to segment the video into 100 frames and label it again. You can find this script in EISeg/tool/cut_video.py
.
3D medical annotation is based on video annotation algorithm. Therefore, before medical image annotation, medical image needs to be converted to mp4
format and then labeled. You can find this script in EISeg/tool/medical2video.py
.
EISeg will generate a labelme
folder under the label
folder after the label is saved, which contains json files and labels. txt
files with the same format as labelme. At this time, if you want to convert json files into coco files with the same format as labelme, you can execute the following command:
python labelme-json2labelme-coco.py label_path save_path --labels txt_path.
# E.g.
# python labelme-json2labelme-coco.py mydata/label/labelme/ mydata/label/labelme/output --labels mydata/label/labelme/labels.txt
Parameters:
label_path
: path to json format of label, required.save_path
: path to save coco format data, required.txt_path
: path to labels.txt, required.
After conversion, it will be displayed in save_ Path
generates three files, namely annotations. json
, JPEGImages
and Visualization
, in the same format as labelme.