Package: iris-image-labelling
Iris - Data labellingIrisA browser based UI for labelling image files that tracks the labels using a database, rather than using folders and pathsWhy use Iris?Label thousands of images (or possibly millions?) easily without having to use a file manager that slows down with too many files.Iris uses pagination to view subsets of your data, so the platform doesn't slow down with large quantities of images.Keep track of all your labels using a database.Iris stores the labels for your data in an SQLite database file in a.irisdirectory that is created in the root of your data folder. This decouples labels from the directory paths, helping to avoid mistakes.Simple and easy to use drag and drop UI.Images can be labelled using simple drag and drop interactions, making it easy for anyone to use.InstallationTo installiris, use the following command:$pipinstalliris-image-labellingUsageOnce installed,irisregisters as a command in your terminal that is accessible from any directory.Irispresumes your data is initially organised in a directory that has sub-directories for every category of your datamaytake on.data/
    |---category_1/
        |---file_1.png
        |---file_2.png
    |---category_2/
        |---file_3.png
        |---file_4.pngThe folders are initially used to deduce what categories your data can take on. Theydo notneed to contain any data / images in them.With the following project structure set up, navigate to the parent directory ofdata/and then launchirisas follows from the terminal:$irislaunch-fdataIrislaunches by default on port 5000, from where you can go on and begin labelling your data.ArgumentDescription-fFolder to build database from-hThe host to run the server on-pThe port number to run the server onReorganise dataTo avoid any confusion between the re-labelled data, and the original categories inferred by the file paths of the images, a button labelled 'Reorganise data' is present in the toolbar.
This will re-organise the files amongst the folders according to the new labels.TagsImages can also take on tags, which are initially inferred based on the sub-directories. That is any directory below the top level directory. For example:data/
    tag_1/
        another_tag/
            file_1.png
            file_2.png
            file_3.png
    tag_2/
        file_4.png
        file_5.png
        file_6.pngThese tags show up in the browser based UI after hovering over theTaglabel.Programmatic APIOnceirishas been launched inside a directory and the.irisfolder has been
setup, you can use the Python API to get the labels and make any more changes
programmatically.Getting the list of filesThe complete list of files can be returned using the following snippet. Thefolderargument to theQueryclass is the relative path to the folder where your images are stored.fromiris.api.filesimportQueryq=Query(folder="../images/")df=q.get_all_files()Example output:idpathfilenamecategorytags270images/heti/clf/ignore/2Sph8IbCgnU.png2Sph8IbCgnU.pngheti[clf, ignore]271images/heti/clf/ignore/1aiDVT31RRE.png1aiDVT31RRE.pngheti[clf, ignore]272images/heti/clf/ignore/4GLI-k4wmFg.png4GLI-k4wmFg.pngheti[clf, ignore]273images/heti/clf/ignore/-wuFyjSeLec.png-wuFyjSeLec.pngmeji[clf, ignore]Modifying a file's attributesYou can modify any or all of the attributes of a file using the following snippet.fromiris.api.filesimportQueryq=Query(folder="../images/")q.update_file(270,{"category":"new_category"})The second argument,file_kwargs, is a dictionary whose keys should correspond to one of the columns in the DataFrame. If the key provided does not exist, it will be ignored.To doAbility to change tags using drag and drop interfaceAdd new categories using browser UIWrite unit tests for JS frontendWrite unit tests for Python backend