dlib/tools/imglab
Adrià Arrufat 9a30c6d48f
Add JXL support (#2917)
* WIP: preparation for JPEG XL support

* jxl: add loading support

* update jxl abstract

* add support for saving jxl (lossless not working)

* everything works except setting lossless explicitly

* remove unused header

* fix wrong quality logic

* remove debugging statements

* fix lossless encoding

* improve support for grayscale images

* use JXL instead of JPEGXL everywhere

* oops do not make libjxl a requirement

* update years

* silence some warnings

* simplify loader fast path logic

* allow python to save jxl and webp

* update error message with supported formats

* Allow setting image quality in Python

The setting is ignored where it does not make sense.

* round quality in JPEG saver

* improve error message in CMake

* add jxl support to imglab

* add Davis's suggestion

Co-authored-by: Davis E. King <davis685@gmail.com>

* Apply suggestions from code review

Co-authored-by: Davis E. King <davis685@gmail.com>

* make sure grayscale is 8 bit

* update abstract: JPEG XL can store grayscale images

* add more methods to query basic info from JXL

* documentation formatting

* Apply Davis' suggestions

---------

Co-authored-by: Davis E. King <davis685@gmail.com>
2024-03-04 07:56:31 -05:00
..
src Add JXL support (#2917) 2024-03-04 07:56:31 -05:00
CMakeLists.txt Make C++14 and CMake 3.8.0 the new minimum required versions 2022-07-31 17:45:18 -04:00
README.txt Fix imglab readme typo in cd path (#400) 2017-01-16 11:47:06 -05:00
convert_imglab_paths_to_relative Added some scripts that help with imglab XML file management. 2016-07-30 18:33:50 -04:00
copy_imglab_dataset Made this script more robust 2016-09-12 20:00:37 -04:00

README.txt

imglab is a simple graphical tool for annotating images with object bounding
boxes and optionally their part locations.  Generally, you use it when you want
to train an object detector (e.g. a face detector) since it allows you to
easily create the needed training dataset.   

You can compile imglab with the following commands:
    cd dlib/tools/imglab
    mkdir build
    cd build
    cmake ..
    cmake --build . --config Release
Note that you may need to install CMake (www.cmake.org) for this to work.  On a
unix system you can also install imglab into /usr/local/bin by running 
    sudo make install  
This will make running it more convenient.

Next, to use it, lets assume you have a folder of images called /tmp/images.
These images should contain examples of the objects you want to learn to
detect.  You will use the imglab tool to label these objects.  Do this by
typing the following command:
    ./imglab -c mydataset.xml /tmp/images
This will create a file called mydataset.xml which simply lists the images in
/tmp/images.  To add bounding boxes to the objects you run:
    ./imglab mydataset.xml
and a window will appear showing all the images.  You can use the up and down
arrow keys to cycle though the images and the mouse to label objects.  In
particular, holding the shift key, left clicking, and dragging the mouse will
allow you to draw boxes around the objects you wish to detect.  

Once you finish labeling objects go to the file menu, click save, and then
close the program. This will save the object boxes back to mydataset.xml.  You
can verify this by opening the tool again with:
    ./imglab mydataset.xml
and observing that the boxes are present.


imglab can do a few additional things.  To see these run:
    imglab -h 
and also read the instructions in the About->Help menu.