The task is to detect hammers, scissors, guns and knives in pseudo-colored x-ray baggage images for airport security application. This is a multi-class Object Detection task and can be performed using a single AI model.
Dataset:
The dataset contains 406 X-Ray images that contain 1045 target objects of 4 types (scissors, hammers, guns and knives). All target objects are annotated using LabelMe format. Sample annotated images are shown below.
.jpg)
Data Loading & Annotation:
You have 2 options:
- Download the data annotated with LabelMe format. Load the imageset and the annotations that you downloaded using ReliVision. Import the imageset using “Import Data” and the annotation file per image folder using the “Import Annotated Dataset” (with the LabelMe annotation format option). Your annotated dataset will be available in the gallery.
- Load the raw imageset and annotate the data yourself in any industry standard format you like using the ReliUI’s intuitive annotation functions. Download the image folder only. Follow the ReliVision Knowledge Hub User Guide (ReliUI: Data Curation) to define the labels (which are “hammer”, “scissors”, “gun” or “knife”), to annotate the objects (using rectangle or polygon annotation tool as the task is object detection) and to save them in an appropriate industry standard format (for which LabelMe is a good option). A sample annotation of an X-Ray image with a gun (red contour) and scissors (pink contour) is shown below.
.jpg)
X-Ray Object Detection Model Training:
Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Training an AI Block) to train your AI model for X-Ray object detection. The main steps, detailed in the User Guide, include
- Model type selection: Object Detection
- Annotated dataset selection
- Automated or manual train/test split which essentially spares some data for training validation purposes.
- Hyper parameter setting: We have chosen the following in this use case:
- Epochs: 1000
- X-Y Resolution: 640
- Learning Rate: 0.01 (default)
- Momentum: 0.937 (default)
- Weight Decay: 0.005 (default)
Training and Validation loss and IOU curves as a function of epochs:
.jpg)
Use the pipeline editor to build your pipeline by dragging and dropping the AI/Basic blocks. You will need to select an input data source (your raw image set) and a detection AI Block connected in series as depicted below. Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Pipeline Editor).
.jpg)
Simply run your pipeline using the execute button at the top. You can review your results using the ReliUI data annotation interface. Your pipeline’s outputs will be saved as a separate set of annotations for each image it is run on. Visit the ReliVision Knowledge Hub User Guide (ReliTrainer: Pipeline Editor / AI Pipeline) for more details.
Sample detection output in case of gun and scissors:
.jpg)
Sample detection output in case of knife and hammer: