The original version from WillieMaddox is available here. The purpose of this version is to provide a simpler solution to drop into any VOC project and provide documentation for new users. Coco functionality has been ignored as I did not require it.
For use with darknet download the 2007-2012 datasets, however this library does work with any VOC dataset.
wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar
wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar
wget https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar
tar xf VOCtrainval_11-May-2012.tar
tar xf VOCtrainval_06-Nov-2007.tar
tar xf VOCtest_06-Nov-2007.tar
Manually donwload each tar file and use winrar,winzip or 7zip to extract the files into a single location.
Instance the class in your python project:
import AnchorLibrary.Anchors as AnchorLibrary
vocLocation = "X:\\Downloads\\training\\VOCdevkit"
getAnchors = AnchorLibrary.Anchor(vocLocation)