Origin Picture | Detected Picture |
---|---|
The repo is a bird-keypoints-detection based on Detectron 2. I use labelme
as the tool to annotate pictures, which generates json
files. Then, translate the json
files to coco
dataset by labelme2coco.py
. Therefore, we can register the dataset to Detectron 2 and train the model.
Just clone the repo.
Moreover, if you want the annotated dataset or pre-trained model, you can download them in release.
Follow the official Tutorials : https://detectron2.readthedocs.io/en/latest/tutorials/install.html
pip3 install labelme cv2 tqdm argparse
At this part, I will introduce the function of main code files. For how to use the code, you can read the comment on the head of these code files.
Visualize COCO format data.
Transform the labelme annotation format to the coco format (suit for any case).
Transform the labelme annotation format to the coco format (only suit for this repo).
Train models.
Demonstrate the result of input (pics or videos).
Output the infomation of the detection results, including boxes bounder, scores, classes, keypoints (if existed).
Visualize the Loss - Iter curve by reading the log file generated by Detectron 2. Here is an example:
Enhance annotation datas, such as scaling, adding noise and so on.
- Detectron 2 from Facebookresearch.
- Wah C., Branson S., Welinder P., Perona P., Belongie S. “The Caltech-UCSD Birds-200-2011 Dataset.” Computation & Neural Systems Technical Report, CNS-TR-2011-001.