- If you already have downloaded python3 before, you do not have to download it again
- If you do not have python3 installed, go to the link below and download python3 https://www.python.org/downloads/
- Type the following in your
terminal
pip3 install opencv-python argparse
If you are dealing with dicom files, you need to convert the files into PNG format. Please refer to https://github.com/yehyunsuh/DICOM-to-PNG.
Dicom
├─ png
└─ landmark_annotator.py
- Type the following in your
terminal
cd <<path to Landmark-Annotator Folder>>
python3 landmark_annotator.py
Dicom
├─ <<name of the png folder>>
└─ landmark_annotator.py
- Type the following in your
terminal
cd <<path to Landmark-Annotator Folder>>
python3 landmark_annotator.py --path <<name of the png folder>>
For example, if your folder name is human_data
,
cd <<path to Landmark-Annotator Folder>>
python3 landmark_annotator.py --path human_data
-
left click
: every time you do a click, there will be a red dot generated in the image and coordinates of the red dot will be extracted -
b
: when you annotate the wrong point, pressb
and the dot will be erased -
n
: when you are done with one image, pressn
and you can move on to the next image -
q
: when you are done with annotating, pressq
and program will be terminated -
After executing the file, you will have a txt file that has
current date + current time + folder name.txt
checkpoint
: your checkpoint will be created incheckpoint
folder in the name of yourpath
- Even if you restart the program, if you have already done an annoation, this program will skip the image
- If you want to re-annotate an image that you have already annotated without using the
p
fuction, just erase the name of the image in thecheckpoint/<<name of path>>.txt
file
p
: when you want to go to previous image, pressp
and you can move to the previous image.- If you go back to a specific image and re-annotate and move to the next images, the previous annotation will be overlapped with the new annotation
- If you do not do any annotations, it will just skip the image without overlapping any annotations
Most of the initial stage code has used example from https://gaussian37.github.io/vision-opencv-coordinate_extraction/.