Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exp-tools

Utilities for experiment visualization and result processing.

This repository currently contains one tool. More tools can be added later under the same project.

Tool 1: Experiment Crop & Zoom Tool

A small Windows desktop tool for creating qualitative comparison crops from experiment result images.

The typical input folder contains multiple aligned images from different methods, for example:

0402_002-ours.png
0402_002-base1.png
0402_002-base2.png
0402_002-base3.png
0402_002-base3.png

The tool lets you draw one shared crop box and one shared zoom box, then applies the same coordinates to every image in the folder.

Features

  • Select an image folder from the GUI.
  • Choose any image in the folder as the preview/reference image.
  • Draw a shared crop region with the left mouse button.
  • Press Enter to confirm the crop region.
  • Press Esc to cancel the current box.
  • Before confirmation, drag inside the box to move it, or drag edges/corners to resize it.
  • Batch crop all images with the same crop coordinates.
  • Draw a local zoom region on the cropped image with the right mouse button.
  • Preview all enlarged zoom regions side by side before saving.
  • Configure zoom factor, box color, and box line width.
  • Save output using a clean experiment-figure structure.

Output Structure

If the selected folder is:

path/to/experiment_images

the tool writes results to:

path/to/experiment_images/crop
├── raw
│   └── original_file_name.png
├── marked
│   └── original_file_name.png
└── zoom
    └── original_file_name.png
  • crop/raw: images cropped by the left-button box.
  • crop/marked: cropped images with the right-button zoom box drawn on top.
  • crop/zoom: enlarged right-button zoom regions, also drawn with the same box color.

Output files keep the original file names.

Controls

Source Image Mode

  1. Click 选择图片文件夹.
  2. Select a folder containing experiment result images.
  3. Choose a preview image from the dropdown.
  4. Hold the left mouse button and drag to draw the shared crop box.
  5. Adjust the box if needed:
    • Drag inside the box to move it.
    • Drag an edge or corner to resize it.
  6. Press Enter to confirm.
  7. Confirm the crop dialog.

Cropped Image Mode

After cropping, the tool automatically switches to crop/raw.

  1. Hold the right mouse button and drag to draw the local zoom box.
  2. Adjust the box if needed.
  3. Press Enter.
  4. The preview window shows one horizontal row of enlarged zoom regions for all images in crop/raw.
  5. Use the scrollbars if the preview row is wider or taller than the window.
  6. In the preview window, adjust:
    • zoom factor,
    • box line width,
    • box color.
  7. Click 确认保存 to write crop/marked and crop/zoom.

At any point before pressing Enter, press Esc to cancel the current box.

Supported Image Formats

  • .png
  • .jpg
  • .jpeg
  • .bmp
  • .webp
  • .tif
  • .tiff

Run From Source

Create the project-local conda environment under venv/:

conda env create -p ./venv -f environment.yml

If the environment already exists, update it:

conda env update -p ./venv -f environment.yml --prune

Run the tool:

conda run -p ./venv python batch_crop_zoom_tool.py

Build Windows EXE

Run the build script from the project root:

.\build_crop_zoom_tool.ps1

The script creates or updates the project-local conda environment:

venv/

Then it builds:

dist/ExperimentCropZoomTool.exe

If conda is not available in your PATH, pass the full path to conda.exe:

.\build_crop_zoom_tool.ps1 -CondaExe "C:\Users\your_name\miniconda3\Scripts\conda.exe"

or:

.\build_crop_zoom_tool.ps1 -CondaExe "C:\Users\your_name\anaconda3\Scripts\conda.exe"

Project Files

batch_crop_zoom_tool.py   # GUI application
environment.yml           # conda environment
build_crop_zoom_tool.ps1  # Windows exe build script
README.md                 # project documentation
.gitignore                # ignored generated files

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages