This is an implementation of Personal Belongings Detection and Recognition Module in AIR Project. The module has two main parts, object detector and instance classifier. The object detector is based on faster-rcnn.pytorch, the attention module came from CBAM and BAM, and the instance classifier consists of one fc layer.
-
Clone this repository.
git clone https://github.com/ai4r/AIR-ObjectDetection.pytorch cd AIR-ObjectDetection.pytorch pip install -r requirements.txt
-
create a model folder
mkdir models/InstModel
-
download and install the font file
wget http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip unzip NanumFont_TTF_ALL.zip -d NanumFont rm -f NanumFont_TTF_ALL.zip mv NanumFont /usr/share/fonts/ fc-cache -f -v
-
Download the model files and move to models folder.
- Run the demo code.
python demo_detector.py
- The program will load images from the test_input_image folder, then save results images to the test_output_image folder.
- Run the demo code.
python demo.py
- Press key 'r' and type two information, category_name and instance_name.
- Show the object instance until predefined number of images are captured.
- Run the demo code.
python demo.py
- Press key 'd' and see the result.
See LICENSE.md