This project aims to detect weapon from Xray images. The whole pipeline is built on AWS sagemaker. For more information, please refer to https://aws.amazon.com/sagemaker/
- cv2 >= 3.0.0
- socketio == 4.0.0
- mxnet == 1.2.1
- numpy >= 1.14.6
For this project. I used LabelBox for annotating images. URL: https://labelbox.com/. There is some scripts inside this repo to help converting different annotation format to json format, which is used for training at sagemaker later.
All relevant training process can be found at https://github.com/awslabs/amazon-sagemaker-examples/blob/master/introduction_to_amazon_algorithms/object_detection_pascalvoc_coco/object_detection_image_json_format.ipynb Note: A sample json annotation format file (and it's corresponded image) is uploaded to this repo for reference.
The model can be deploy in 2 ways.
-
Deploy using sagemaker endpoint configuration. See how it does: https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html -Run
python streamer_with_cloud_model.py
to run main program. -
Deploy locally. The object detection model is trained using mxnet and some of the layers needs to be removed before entering deployment mode. See https://discuss.mxnet.io/t/deploy-sagemaker-trained-model-locally/1934 and https://github.com/zhreshold/mxnet-ssd#convert-model-to-deploy-mode for more details. -Run
python streamer.py
to run main program.
My model links (Processed and ready to deploy): https://drive.google.com/open?id=1nHDzkYPQ4Kfkwbv8RZ_Zz5_1IszOcQvp Reference : https://docs.aws.amazon.com/sagemaker/latest/dg/object-detection-api-config.html