Semi Automatic Image Annotation Toolbox with RetinaNet, SSD and YOLO as the suggesting algorithm. We can select from the three algorithms as the suggesting algorithm. Filters can be applied to images to create distorting images which will help in the training of the model. Also the training process is incoperated in the application. You can train a Retinanet model for custom objects in one click.
-
Clone this repository.
-
Create a virtual environment with anaconda packages installed.
conda create --name virtual_env anaconda
-
In the repository, execute
pip install -r requirements.txt
. -
Download the pretrained weights and save it in /snapshots.
b) SSD weights
c) YOLO weights
After all the dependencies are installed go into the repository and run the main.py scripts by using the flowing command in the anaconda prompt or open the main.py in spyder ide and run the script(Recommended)
python main.py
Make sure that the weights are installed and are saved in the /snapshots folder. The names of the weights used in the application are given in the /snapshots/instruction.md file. Change the names of the weight to match the names given there. If everything goes right an application window will open which will look something like this:
Let’s walk you through the GUI:
- Open – Open a single image.
- Open Dir – Open a directory containing images.
- Next--> - Next image from the directory.
- <-- Previous – Previous image from the directory
- Save – Saves the images location in annotation file. However, the image location is also saved when we click the Next or Previous buttons also.
- Show Suggestions - Shows the objects detected on the images.
- Select Model – Can select from 3 Models i.e Retinanet or COCO, SSD and YOLO. Note that the COCO model is trained on 80 classes and is fairly fast in detecting objects, the YOLO class is also trained on similar classes but is slower than the tree models. SSD model on the other hand is only trained on 21 classes and is the fastest among these three
- Select Filters – Can select up to 5 filters. This will to create different variants of the same images which will help in the training process.
- + - this will open a window to add parameters to the selected filters.
- Reset image – Reset the image to the original image.
- List of objects – List the detected objects with their coordinates.
- Delete – Delete the selected class from the list of objects.
- Clear All – Clears all the detected boxes from the images and classes from the List of Objects.
- Classes – Input label where you can type new classes and click ‘+’ sign to add it to the list..
- + -> Adds the class.
- - -> Deletes the class.
The labels and the file path are save in the annotations folder which then can be used to train a model on custom objects. The training process only supports the retinanet algorithm for now but soon will be updated to support the SSD and YOLO algorithms as well.
Once you will click the train model button a window screen will pop up which will have some inputs to be filled.
- Backbone : The model can be trained on three of the backbones namely resnet50, resnet101 and resnet150.
- Epochs : Number of epochs.
- Steps – Steps to train.
- Annotation file
- Classes file
- Weights of the pretrained model.In out case the retinanet weights.
python main.py
- Windows 10
- Linux (Ubuntu 18.04.3 LTS)