PiLab Labeler is an interactive annotation tool for labeling and saving masked images. It supports image zooming, panning, and brush-based drawing.
- Draw on Images: Annotate images with a brush tool.
- Zoom & Pan: Mouse wheel to zoom, right-click to pan.
- Save Annotations: Save masked images and original images with annotations.
- Undo Support: Remove previous strokes.
- Logging System: Keeps track of all actions in a log file.
- Save Multiple Versions: Saves Mask, Masked on denoised, and Masked on original images.
Ensure you have Python 3 and required dependencies installed.
pip install -r requirements.txt-
Prepare Files and Folders
• Place the pi_labeler.py file and the original and denoised folders in the same directory.
• Add matching image files to the original and denoised folders.
-
Run the Program
Run the following command to start the program:
python pi_labeler.py-
Drawing Annotations
• Use the mouse to draw on the denoised image.
• Adjust brush size and use zoom/pan features for better annotation control.
-
Save Annotations
• Press s to save the current annotated image.
• The saved files will be stored in the following folders:
• mask/: The mask image with annotations. • masked/: The annotated version of the denoised image. • masked_original/: The annotated version of the original image. -
Navigate Between Images
• Press n or > to move to the next image.
• Press p or < to move to the previous image.
-
Exit the Program
• Press q to quit the program.
• When exiting, a session end log will be automatically recorded.
| Shortcut | Action |
|---|---|
p / < |
Previous image |
n / > |
Next image |
s |
Save current image |
u |
Undo last stroke |
i |
Zoom in |
o |
Zoom out |
+ / = |
Increase brush size |
- / _ |
Decrease brush size |
q |
Quit application |
| Mouse Action | Description |
|---|---|
| Left-click & Drag | Draw on the image |
| Mouse Wheel | Zoom in/out |
| Right-click & Drag | Pan the image |
The application generates a log file (Labeler_YYYYMMDD_HHMMSS.log) to keep track of user actions. Logs include:
- Session Start/End Times
- Image Changes
- Drawing Actions (strokes, brush sizes, etc.)
- Undo Actions
- Zoom & Pan Actions
- Save Events
PiLab Labeler는 이미지에 마스킹 주석을 추가하고 저장할 수 있는 도구입니다. 확대/축소, 패닝, 브러시 기반 드로잉 기능을 지원합니다.
- 이미지 위에 그리기: 브러시 도구를 이용해 주석 추가
- 확대 및 패닝: 마우스 휠로 확대/축소, 우클릭으로 패닝
- 주석 저장: 마스킹된 이미지와 원본 이미지 저장
- 실행 취소 (Undo) 지원: 이전 획 제거 가능
- 로그 시스템: 모든 작업을 기록하여 추적 가능
- 다양한 버전 저장: Mask, Masked on denoised, Masked on original 저장
Python 3 및 필요한 라이브러리를 설치해야 합니다.
pip install -r requirements.txt-
파일 및 폴더 준비
• pi_labeler.py 파일과 original, denoised 두 개의 폴더를 같은 디렉터리 내에 위치시킵니다.
• original 폴더와 denoised 폴더에 매칭되는 이미지 파일을 넣습니다.
-
프로그램 실행 아래 명령어를 실행하여 프로그램을 시작합니다.
python pi_labeler.py-
드로잉 작업
• denoised 이미지 위에 마우스를 이용해 드로잉을 진행합니다. • 브러시 크기를 조절할 수 있으며, 확대/축소 및 패닝 기능을 활용할 수 있습니다. -
주석 저장
• s키를 눌러 작업한 이미지를 저장합니다.
• 저장된 파일들은 다음과 같은 폴더에 저장됩니다.
• mask/: 주석이 적용된 마스크 이미지 • masked/: denoised 이미지에 주석이 적용된 버전 • masked_original/: original 이미지에 동일한 주석이 적용된 버전 -
다음 이미지로 이동
• n 또는 > 키를 눌러 다음 이미지로 이동
• p 또는 < 키를 눌러 이전 이미지로 이동
-
작업 완료후 종료
• q 키를 눌러 프로그램을 종료하면 세션 종료 로그가 기록됩니다.
| 단축키 | 기능 |
|---|---|
p / < |
이전 이미지 |
n / > |
다음 이미지 |
s |
현재 이미지 저장 |
u |
마지막 획 실행 취소 |
i |
확대 |
o |
축소 |
+ / = |
브러시 크기 증가 |
- / _ |
브러시 크기 감소 |
q |
프로그램 종료 |
| 마우스 동작 | 설명 |
|---|---|
| 좌클릭 후 드래그 | 이미지 위에 그리기 |
| 마우스 휠 | 확대/축소 |
| 우클릭 후 드래그 | 이미지 패닝 |
프로그램 실행 시 Labeler_YYYYMMDD_HHMMSS.log 형식의 로그 파일이 생성되며, 다음과 같은 정보가 저장됩니다:
- 세션 시작 및 종료 시간
- 이미지 변경 내역
- 드로잉 작업 (획 개수, 브러시 크기 등)
- 실행 취소 작업
- 확대 및 패닝 동작
- 저장 이벤트