All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The
Cropper
class now accepts aresize
arg, to determine whether to resize the image after cropping it or not. - Similarly for the CLI, it can now be called with a
--no-resize
flag
- The order of CLI args when calling
autocrop --help
changed to place flags first - Start using type hints across the codebase
- The
initial-setup
step in Makefile now also installs development packages. - The
black
formatting package now gets installed withrequirements-dev.txt
- Deprecate Python 3.6
- Modify the
opencv-python
dependency over toopencv-python-headless
, which doesn't have all the GUI baggage. Easier to download and package.
- Created the
examples
directory and moved the example notebook to it.
- Deprecate Python 3.5
- Deprecate OpenCV 3
- User can now specify what file extension to save cropped files at the CLI
- Update Pillow dependency in order to limit possible security issues
- Updates to the developer setup tools and documentation
- Updates to the example notebook
- CLI now copies file by default
- Cropper class now available from Python API.
- Local multi-version testing for Python now available with
tox
. - Extra regressions tests to defend against image warp and cropping outside the regions of interest.
- Support for Python 3.8
- Specify encoding in
setup.py
, which was causing some errors on Windows.
- Support for padding argument — this is now solely handled by the
face_percent
parameter, and enforces the aspect ratio betweenwidth
andheight
. - Support for Python 2.7
- Autocrop now prints the filename of images where face detection failed
- Internal refactoring and more tests
- Add
-r
,--reject
flag to specify directory where the images that autocrop couldn't find a face in are directed to. - Instead of having the target files copied then cropped, they are instead cropped and saved to their respective target folder.
- Added support for padding (
padLeft
, etc.) in the CLI.
- Fixed warp on crop for
-w
and-h
values
- Add
-o
,--output
flag to specify directory where cropped images are to be dumped.- Error out if output folder set to current directory, i.e.
-o .
- If directory doesn't exist yet, create it.
- If no face can be found in an image in batch, it is still copied over to
-o
folder. - If no output folder is added, ask for confirmation ([Y]/n), and destructively crop images in-place.
- Error out if output folder set to current directory, i.e.
- Use
-i
,--input
flags as synonyms for-p
or--path
: symmetrical in meaning to "output".- Is now standard nomenclature in documentation.
--input
or--path
flag is now optional.- Standard behaviour without input folder is to non-recursively process all images in immediate folder, i.e.
-p .
as currently implemented.
- Standard behaviour without input folder is to non-recursively process all images in immediate folder, i.e.
- Removed all mentions of the hard-coded 'bkp' and 'crop' folders
- Calling autocrop without specifying an input path, i.e.
autocrop
does not look for the 'images' folder anymore.