master 07d6987da819 cached
63 files
11.5 MB
211.6k tokens
597 symbols
1 requests
Download .txt
Showing preview only (590K chars total). Download the full file or copy to clipboard to get everything.
Repository: hukaixuan19970627/DOTA_devkit_YOLO
Branch: master
Commit: 07d6987da819
Files: 63
Total size: 11.5 MB

Directory structure:
gitextract_2jlkibz9/

├── .idea/
│   ├── .gitignore
│   ├── DOTA_devkit-master.iml
│   ├── encodings.xml
│   ├── inspectionProfiles/
│   │   ├── Project_Default.xml
│   │   └── profiles_settings.xml
│   ├── misc.xml
│   └── modules.xml
├── .polyiou.cpp.swp
├── DOTA.py
├── DOTA2COCO.py
├── DOTA_demo/
│   └── labelTxt/
│       ├── P0003.txt
│       ├── P0004.txt
│       ├── P0005.txt
│       └── P1478__1__853___962.txt
├── Draw_DOTA_YOLO.py
├── ImgSplit.py
├── ImgSplit_multi_process.py
├── README.md
├── ResultMerge.py
├── ResultMerge_example/
│   └── 1.txt
├── ResultMerge_multi_process.py
├── SplitOnlyImage.py
├── SplitOnlyImage_multi_process.py
├── YOLO_Transform.py
├── build/
│   ├── temp.linux-x86_64-3.8/
│   │   ├── polyiou.o
│   │   └── polyiou_wrap.o
│   └── temp.win-amd64-3.8/
│       └── Release/
│           └── polyiou_wrap.obj
├── demo.ipynb
├── dota-v1.5_evaluation_task1.py
├── dota-v1.5_evaluation_task2.py
├── dota_evaluation_task1.py
├── dota_evaluation_task2.py
├── dota_utils.py
├── evaluation_example/
│   ├── imgnamefile.txt
│   ├── result_classname/
│   │   ├── Task1_harbor.txt
│   │   ├── Task1_large-vehicle.txt
│   │   ├── Task1_ship.txt
│   │   └── Task1_small-vehicle.txt
│   └── row_DOTA_labels/
│       ├── P0003.txt
│       ├── P0004.txt
│       ├── P0007.txt
│       └── P0019.txt
├── example/
│   └── labelTxt/
│       ├── P0706.txt
│       ├── P0770.txt
│       └── P1088.txt
├── poly_nms_gpu/
│   ├── Makefile
│   ├── __init__.py
│   ├── nms_wrapper.py
│   ├── poly_nms.hpp
│   ├── poly_nms.pyx
│   ├── poly_nms_kernel.cu
│   ├── poly_nms_test.py
│   ├── poly_overlaps.hpp
│   ├── poly_overlaps.pyx
│   ├── poly_overlaps_kernel.cu
│   └── setup.py
├── polyiou.cpp
├── polyiou.h
├── polyiou.i
├── polyiou.py
├── polyiou_wrap.cxx
├── requirements.txt
└── setup.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml


================================================
FILE: .idea/DOTA_devkit-master.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
    </content>
    <orderEntry type="jdk" jdkName="Python 3.8 (pytorch-cpu) (3)" jdkType="Python SDK" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
  <component name="PyDocumentationSettings">
    <option name="format" value="EPYTEXT" />
    <option name="myDocStringFormat" value="Epytext" />
  </component>
</module>

================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding">
    <file url="PROJECT" charset="GB2312" />
  </component>
</project>

================================================
FILE: .idea/inspectionProfiles/Project_Default.xml
================================================
<component name="InspectionProjectProfileManager">
  <profile version="1.0">
    <option name="myName" value="Project Default" />
    <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="ignoredPackages">
        <value>
          <list size="1">
            <item index="0" class="java.lang.String" itemvalue="PyYAML" />
          </list>
        </value>
      </option>
    </inspection_tool>
  </profile>
</component>

================================================
FILE: .idea/inspectionProfiles/profiles_settings.xml
================================================
<component name="InspectionProjectProfileManager">
  <settings>
    <option name="USE_PROJECT_PROFILE" value="false" />
    <version value="1.0" />
  </settings>
</component>

================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (pytorch-cpu) (3)" project-jdk-type="Python SDK" />
  <component name="PyCharmProfessionalAdvertiser">
    <option name="shown" value="true" />
  </component>
</project>

================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/DOTA_devkit-master.iml" filepath="$PROJECT_DIR$/.idea/DOTA_devkit-master.iml" />
    </modules>
  </component>
</project>

================================================
FILE: DOTA.py
================================================
# coding=gbk

#The code is used for visulization, inspired from cocoapi
#  Licensed under the Simplified BSD License [see bsd.txt]

import os
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
from matplotlib.patches import Polygon, Circle
import numpy as np
import dota_utils as util
from collections import defaultdict
import cv2

def _isArrayLike(obj):
    if type(obj) == str:
        return False
    return hasattr(obj, '__iter__') and hasattr(obj, '__len__')

class DOTA:
    def __init__(self, basepath):
        self.basepath = basepath
        self.labelpath = os.path.join(basepath, 'labelTxt')
        self.imagepath = os.path.join(basepath, 'images')
        self.imgpaths = util.GetFileFromThisRootDir(self.labelpath)
        self.imglist = [util.custombasename(x) for x in self.imgpaths]
        self.catToImgs = defaultdict(list)
        self.ImgToAnns = defaultdict(list)
        self.createIndex()

    def createIndex(self):
        for filename in self.imgpaths:
            objects = util.parse_dota_poly(filename)
            imgid = util.custombasename(filename)
            self.ImgToAnns[imgid] = objects
            for obj in objects:
                cat = obj['name']
                self.catToImgs[cat].append(imgid)

    def getImgIds(self, catNms=[]):
        """
        :param catNms: category names  eg:catNms=['ships']
        :return: all the image ids contain the categories аͼƬid eg:['P0706', 'P
        1234', 'P2709']
        """
        catNms = catNms if _isArrayLike(catNms) else [catNms]
        if len(catNms) == 0:
            return self.imglist
        else:
            imgids = []
            for i, cat in enumerate(catNms):
                if i == 0:
                    imgids = set(self.catToImgs[cat])
                else:
                    imgids &= set(self.catToImgs[cat])
        return list(imgids)

    def loadAnns(self, catNms=[], imgId = None, difficult=None):
        """
        :param catNms: category names
        :param imgId: the img to load anns
        :return: objects
        """
        catNms = catNms if _isArrayLike(catNms) else [catNms]
        objects = self.ImgToAnns[imgId]
        if len(catNms) == 0:
            return objects
        outobjects = [obj for obj in objects if (obj['name'] in catNms)]
        return outobjects
    def showAnns(self, objects, imgId, range):
        """
        :param catNms: category names 
        :param objects: objects to show  labelsϢ
        :param imgId: img to show ʾͼƬid
        :param range: display range in the img ͼƬʾΧ
        :return:
        """
        img = self.loadImgs(imgId)[0]
        plt.imshow(img)
        plt.axis('off')

        ax = plt.gca()
        ax.set_autoscale_on(False)
        polygons = []
        color = []
        circles = []
        r = 5
        for obj in objects:
            c = (np.random.random((1, 3)) * 0.6 + 0.4).tolist()[0]
            poly = obj['poly']
            polygons.append(Polygon(poly))
            color.append(c)
            point = poly[0]
            circle = Circle((point[0], point[1]), r)
            circles.append(circle)
        p = PatchCollection(polygons, facecolors=color, linewidths=0, alpha=0.4)
        ax.add_collection(p)
        p = PatchCollection(polygons, facecolors='none', edgecolors=color, linewidths=2)
        ax.add_collection(p)
        p = PatchCollection(circles, facecolors='red')
        ax.add_collection(p)
    def loadImgs(self, imgids=[]):
        """
        :param imgids: integer ids specifying img صͼƬ eg:imgids=['P0706','P0770']
        :return: loaded img objects صͼƬ imgs=[...,...]
        """
        print('isarralike:', _isArrayLike(imgids))
        imgids = imgids if _isArrayLike(imgids) else [imgids]
        print('imgids:', imgids)
        imgs = []
        for imgid in imgids:
            filename = os.path.join(self.imagepath, imgid + '.png')
            print('filename:', filename)
            img = cv2.imread(filename)
            imgs.append(img)
        return imgs

if __name__ == '__main__':
    examplesplit = DOTA(r'./DOTA_demo')  # (r'./example')
    imgids = examplesplit.getImgIds(catNms=['small-vehicle'])  # ȡͼƬid eg:['P1088']
    img = examplesplit.loadImgs(imgids)  # ȡӦidͼƬӦsmall-vehicle
    for imgid in imgids:
        imgid = 'P0003'  #ͼƬ
        anns = examplesplit.loadAnns(imgId=imgid)  # ضӦidͼƬlabelsϢ
        '''
        anns =
        [{'name': 'ship', 
          'difficult': '1', 
          'poly': [(1054.0, 1028.0), (1063.0, 1011.0), (1111.0, 1040.0), (1112.0, 1062.0)], 
          'area': 1159.5
          },
          ...
        ]
        '''
        examplesplit.showAnns(anns, imgid, 2)  # labelsϢʾڶӦidͼƬ
        plt.show()

================================================
FILE: DOTA2COCO.py
================================================
import dota_utils as util
import os
import cv2
import json

wordname_15 = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
               'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']

def DOTA2COCO(srcpath, destfile):
    imageparent = os.path.join(srcpath, 'images')
    labelparent = os.path.join(srcpath, 'labelTxt')

    data_dict = {}
    info = {'contributor': 'captain group',
           'data_created': '2018',
           'description': 'This is 1.0 version of DOTA dataset.',
           'url': 'http://captain.whu.edu.cn/DOTAweb/',
           'version': '1.0',
           'year': 2018}
    data_dict['info'] = info
    data_dict['images'] = []
    data_dict['categories'] = []
    data_dict['annotations'] = []
    for idex, name in enumerate(wordname_15):
        single_cat = {'id': idex + 1, 'name': name, 'supercategory': name}
        data_dict['categories'].append(single_cat)

    inst_count = 1
    image_id = 1
    with open(destfile, 'w') as f_out:
        filenames = util.GetFileFromThisRootDir(labelparent)
        for file in filenames:
            basename = util.custombasename(file)
            # image_id = int(basename[1:])

            imagepath = os.path.join(imageparent, basename + '.png')
            img = cv2.imread(imagepath)
            height, width, c = img.shape

            single_image = {}
            single_image['file_name'] = basename + '.png'
            single_image['id'] = image_id
            single_image['width'] = width
            single_image['height'] = height
            data_dict['images'].append(single_image)

            # annotations
            objects = util.parse_dota_poly2(file)
            for obj in objects:
                single_obj = {}
                single_obj['area'] = obj['area']
                single_obj['category_id'] = wordname_15.index(obj['name']) + 1
                single_obj['segmentation'] = []
                single_obj['segmentation'].append(obj['poly'])
                single_obj['iscrowd'] = 0
                xmin, ymin, xmax, ymax = min(obj['poly'][0::2]), min(obj['poly'][1::2]), \
                                         max(obj['poly'][0::2]), max(obj['poly'][1::2])

                width, height = xmax - xmin, ymax - ymin
                single_obj['bbox'] = xmin, ymin, width, height
                single_obj['image_id'] = image_id
                data_dict['annotations'].append(single_obj)
                single_obj['id'] = inst_count
                inst_count = inst_count + 1
            image_id = image_id + 1
        json.dump(data_dict, f_out)
if __name__ == '__main__':
    DOTA2COCO(r'/data0/data_dj/1024_new', r'/data0/data_dj/1024_new/DOTA_trainval1024.json')


================================================
FILE: DOTA_demo/labelTxt/P0003.txt
================================================
imagesource:GoogleEarth
gsd:0.115726939386
937.0 913.0 921.0 912.0 923.0 874.0 940.0 875.0 small-vehicle 0
638.0 959.0 638.0 935.0 694.0 939.0 693.0 962.0 large-vehicle 0
545.0 494.0 548.0 518.0 489.0 519.0 488.0 493.0 large-vehicle 0
536.0 468.0 535.0 489.0 477.0 486.0 478.0 464.0 large-vehicle 0
683.0 302.0 659.0 309.0 643.0 213.0 660.0 205.0 large-vehicle 0
627.0 319.0 605.0 326.0 584.0 223.0 608.0 216.0 large-vehicle 0
594.0 323.0 573.0 328.0 556.0 234.0 575.0 229.0 large-vehicle 0
563.0 326.0 540.0 333.0 527.0 238.0 547.0 232.0 large-vehicle 0
521.0 334.0 500.0 341.0 478.0 241.0 500.0 236.0 large-vehicle 0
422.0 349.0 401.0 356.0 382.0 258.0 402.0 253.0 large-vehicle 0
396.0 358.0 375.0 366.0 356.0 269.0 374.0 263.0 large-vehicle 0
360.0 359.0 340.0 363.0 326.0 278.0 347.0 273.0 large-vehicle 0
329.0 352.0 305.0 356.0 292.0 274.0 313.0 272.0 large-vehicle 0
277.0 842.0 278.0 823.0 335.0 827.0 332.0 853.0 large-vehicle 0
573.0 519.0 579.0 494.0 638.0 498.0 637.0 523.0 large-vehicle 0
328.0 803.0 317.0 821.0 265.0 794.0 277.0 772.0 large-vehicle 0
265.0 757.0 280.0 742.0 318.0 764.0 305.0 782.0 large-vehicle 1
258.0 683.0 262.0 669.0 315.0 689.0 305.0 712.0 large-vehicle 1
280.0 638.0 293.0 619.0 338.0 643.0 328.0 663.0 large-vehicle 0
232.0 610.0 243.0 591.0 286.0 616.0 276.0 636.0 large-vehicle 0
278.0 601.0 288.0 582.0 336.0 607.0 323.0 628.0 large-vehicle 0
230.0 577.0 238.0 559.0 284.0 578.0 273.0 598.0 large-vehicle 1
315.0 507.0 303.0 525.0 213.0 475.0 226.0 455.0 large-vehicle 0
204.0 441.0 213.0 419.0 269.0 441.0 257.0 463.0 large-vehicle 0
200.0 401.0 211.0 383.0 258.0 411.0 250.0 428.0 large-vehicle 0
186.0 365.0 198.0 342.0 249.0 368.0 236.0 390.0 large-vehicle 0
558.0 523.0 563.0 546.0 501.0 554.0 501.0 529.0 large-vehicle 0
627.0 529.0 628.0 547.0 569.0 549.0 568.0 530.0 large-vehicle 0
958.0 158.0 972.0 152.0 984.0 182.0 967.0 187.0 small-vehicle 1
45.0 864.0 47.0 882.0 5.0 882.0 4.0 867.0 large-vehicle 1
1093.0 949.0 1107.0 957.0 1091.0 987.0 1077.0 981.0 small-vehicle 1
1106.0 969.0 1119.0 974.0 1102.0 1012.0 1085.0 1005.0 small-vehicle 0
1126.0 747.0 1110.0 757.0 1088.0 714.0 1105.0 706.0 large-vehicle 0
1089.0 632.0 1105.0 621.0 1126.0 656.0 1107.0 667.0 small-vehicle 1
1071.0 656.0 1058.0 664.0 1038.0 627.0 1055.0 620.0 small-vehicle 0
990.0 513.0 1004.0 504.0 1022.0 539.0 1003.0 548.0 small-vehicle 1
978.0 458.0 964.0 463.0 953.0 428.0 967.0 421.0 small-vehicle 1
4.0 979.0 3.0 964.0 43.0 961.0 44.0 979.0 small-vehicle 0
2.0 956.0 4.0 939.0 42.0 936.0 42.0 954.0 small-vehicle 0
3.0 931.0 4.0 916.0 39.0 916.0 42.0 929.0 small-vehicle 0
5.0 908.0 5.0 892.0 40.0 889.0 41.0 907.0 small-vehicle 0
6.0 842.0 38.0 842.0 37.0 857.0 3.0 859.0 large-vehicle 1
660.0 555.0 662.0 576.0 603.0 577.0 602.0 555.0 large-vehicle 0
47.0 787.0 48.0 805.0 15.0 811.0 13.0 793.0 small-vehicle 0
41.0 690.0 41.0 704.0 8.0 706.0 11.0 690.0 small-vehicle 1
41.0 640.0 44.0 656.0 12.0 656.0 11.0 640.0 small-vehicle 1
867.0 904.0 847.0 904.0 849.0 847.0 870.0 849.0 large-vehicle 0
841.0 897.0 821.0 897.0 813.0 802.0 835.0 800.0 large-vehicle 0
813.0 896.0 795.0 897.0 790.0 834.0 809.0 829.0 large-vehicle 0
763.0 817.0 782.0 814.0 781.0 906.0 760.0 904.0 large-vehicle 0
721.0 852.0 742.0 851.0 740.0 906.0 716.0 906.0 large-vehicle 1
883.0 586.0 895.0 603.0 840.0 631.0 827.0 609.0 large-vehicle 0
773.0 574.0 767.0 555.0 856.0 523.0 865.0 544.0 large-vehicle 0
630.0 586.0 629.0 607.0 532.0 604.0 534.0 580.0 large-vehicle 0
191.0 299.0 205.0 276.0 257.0 304.0 238.0 330.0 large-vehicle 0


================================================
FILE: DOTA_demo/labelTxt/P0004.txt
================================================
imagesource:GoogleEarth
gsd:0.132459767176
398.0 716.0 398.0 694.0 464.0 698.0 465.0 718.0 large-vehicle 0
513.0 542.0 514.0 524.0 613.0 529.0 613.0 548.0 large-vehicle 0
526.0 591.0 528.0 571.0 623.0 578.0 621.0 599.0 large-vehicle 1
504.0 614.0 506.0 591.0 632.0 603.0 629.0 622.0 large-vehicle 0
521.0 636.0 521.0 617.0 635.0 627.0 634.0 644.0 large-vehicle 0
518.0 656.0 523.0 639.0 638.0 646.0 635.0 669.0 large-vehicle 0
528.0 681.0 533.0 662.0 611.0 669.0 610.0 690.0 large-vehicle 0
194.0 230.0 197.0 249.0 121.0 259.0 118.0 242.0 large-vehicle 0
217.0 249.0 220.0 271.0 118.0 283.0 117.0 264.0 large-vehicle 0
205.0 272.0 208.0 293.0 118.0 303.0 113.0 284.0 large-vehicle 1
219.0 293.0 226.0 315.0 128.0 329.0 124.0 307.0 large-vehicle 0
229.0 318.0 232.0 336.0 136.0 351.0 133.0 331.0 large-vehicle 0
239.0 336.0 243.0 356.0 146.0 371.0 144.0 351.0 large-vehicle 0
244.0 359.0 247.0 378.0 152.0 393.0 148.0 374.0 large-vehicle 0
235.0 385.0 240.0 402.0 146.0 419.0 144.0 399.0 large-vehicle 1
263.0 407.0 265.0 427.0 166.0 440.0 166.0 418.0 large-vehicle 0
259.0 432.0 260.0 454.0 143.0 472.0 140.0 447.0 large-vehicle 0
371.0 589.0 389.0 591.0 381.0 684.0 360.0 681.0 large-vehicle 1
258.0 459.0 261.0 477.0 136.0 502.0 133.0 480.0 large-vehicle 0
258.0 484.0 263.0 502.0 154.0 524.0 150.0 504.0 large-vehicle 1
258.0 507.0 264.0 527.0 166.0 549.0 161.0 529.0 large-vehicle 0
258.0 534.0 264.0 553.0 151.0 582.0 148.0 561.0 large-vehicle 0
272.0 579.0 274.0 601.0 174.0 605.0 174.0 586.0 large-vehicle 0
271.0 606.0 274.0 626.0 156.0 636.0 156.0 612.0 large-vehicle 0
268.0 632.0 271.0 651.0 171.0 656.0 171.0 636.0 large-vehicle 0
495.0 567.0 498.0 546.0 621.0 553.0 622.0 573.0 large-vehicle 0
509.0 522.0 511.0 503.0 607.0 506.0 606.0 526.0 large-vehicle 0
261.0 694.0 261.0 717.0 150.0 714.0 152.0 692.0 large-vehicle 1
511.0 497.0 513.0 479.0 627.0 480.0 627.0 502.0 large-vehicle 0
273.0 92.0 291.0 88.0 305.0 177.0 286.0 180.0 large-vehicle 1
294.0 88.0 312.0 84.0 326.0 176.0 308.0 178.0 large-vehicle 1
317.0 86.0 334.0 82.0 348.0 175.0 330.0 178.0 large-vehicle 1
339.0 94.0 356.0 89.0 369.0 180.0 350.0 184.0 large-vehicle 1
359.0 87.0 377.0 84.0 389.0 176.0 373.0 180.0 large-vehicle 1
390.0 93.0 408.0 92.0 412.0 185.0 392.0 186.0 large-vehicle 1
417.0 92.0 433.0 90.0 436.0 184.0 418.0 185.0 large-vehicle 1
439.0 98.0 457.0 97.0 458.0 188.0 441.0 189.0 large-vehicle 1
460.0 94.0 477.0 94.0 479.0 186.0 462.0 186.0 large-vehicle 1
481.0 91.0 498.0 91.0 498.0 183.0 481.0 183.0 large-vehicle 1
561.0 111.0 576.0 121.0 516.0 194.0 502.0 184.0 large-vehicle 1
513.0 203.0 621.0 184.0 625.0 204.0 515.0 222.0 large-vehicle 1
508.0 228.0 618.0 211.0 621.0 228.0 511.0 247.0 large-vehicle 1
511.0 249.0 630.0 229.0 633.0 249.0 514.0 267.0 large-vehicle 1
517.0 268.0 638.0 256.0 639.0 276.0 518.0 288.0 large-vehicle 1
526.0 311.0 524.0 292.0 616.0 282.0 619.0 299.0 large-vehicle 1
506.0 336.0 505.0 316.0 618.0 304.0 621.0 324.0 large-vehicle 0
518.0 356.0 518.0 338.0 629.0 329.0 632.0 349.0 large-vehicle 1
511.0 381.0 508.0 363.0 603.0 352.0 606.0 371.0 large-vehicle 1
513.0 403.0 511.0 385.0 633.0 372.0 636.0 392.0 large-vehicle 1
511.0 428.0 511.0 409.0 638.0 402.0 641.0 424.0 large-vehicle 0
518.0 453.0 516.0 435.0 628.0 428.0 628.0 448.0 large-vehicle 1
519.0 473.0 521.0 458.0 603.0 455.0 604.0 474.0 large-vehicle 0
286.0 656.0 287.0 676.0 171.0 677.0 169.0 658.0 large-vehicle 0
274.0 738.0 274.0 760.0 154.0 757.0 157.0 736.0 large-vehicle 0
314.0 727.0 298.0 726.0 299.0 689.0 314.0 688.0 small-vehicle 1
454.0 38.0 453.0 60.0 386.0 57.0 387.0 34.0 large-vehicle 0
788.0 76.0 806.0 76.0 804.0 111.0 786.0 109.0 small-vehicle 0
812.0 159.0 824.0 162.0 822.0 193.0 809.0 196.0 small-vehicle 1
781.0 214.0 797.0 215.0 798.0 246.0 780.0 246.0 small-vehicle 0
751.0 278.0 736.0 276.0 736.0 241.0 754.0 240.0 small-vehicle 0
806.0 250.0 818.0 250.0 818.0 283.0 804.0 284.0 small-vehicle 1
745.0 591.0 726.0 589.0 729.0 550.0 746.0 549.0 small-vehicle 0
725.0 1151.0 707.0 1151.0 709.0 1118.0 726.0 1116.0 small-vehicle 0
231.0 1219.0 229.0 1242.0 178.0 1236.0 176.0 1217.0 large-vehicle 0
288.0 1269.0 288.0 1290.0 236.0 1285.0 237.0 1266.0 large-vehicle 0
218.0 1264.0 216.0 1287.0 159.0 1283.0 160.0 1262.0 large-vehicle 0
719.0 1296.0 704.0 1294.0 705.0 1257.0 721.0 1254.0 small-vehicle 0
693.0 1344.0 679.0 1344.0 681.0 1313.0 695.0 1311.0 small-vehicle 0
720.0 1353.0 706.0 1354.0 706.0 1318.0 721.0 1317.0 small-vehicle 0
741.0 1375.0 726.0 1374.0 728.0 1338.0 743.0 1339.0 small-vehicle 0
83.0 864.0 98.0 861.0 103.0 898.0 87.0 899.0 small-vehicle 0
109.0 859.0 125.0 859.0 126.0 892.0 110.0 893.0 small-vehicle 0
100.0 927.0 119.0 926.0 121.0 979.0 103.0 982.0 large-vehicle 0
56.0 942.0 69.0 939.0 73.0 974.0 58.0 977.0 small-vehicle 1
123.0 982.0 132.0 992.0 109.0 1013.0 99.0 1003.0 small-vehicle 0
45.0 356.0 32.0 356.0 33.0 323.0 46.0 322.0 small-vehicle 1
83.0 235.0 96.0 233.0 98.0 265.0 83.0 267.0 small-vehicle 1
196.0 4.0 197.0 17.0 163.0 14.0 162.0 2.0 small-vehicle 1
324.0 711.0 327.0 690.0 375.0 691.0 374.0 711.0 large-vehicle 0
551.0 25.0 546.0 43.0 508.0 36.0 513.0 17.0 small-vehicle 0
315.0 31.0 313.0 54.0 250.0 51.0 252.0 30.0 large-vehicle 0
273.0 781.0 275.0 803.0 158.0 804.0 157.0 782.0 large-vehicle 0
475.0 1289.0 476.0 1269.0 604.0 1271.0 604.0 1292.0 large-vehicle 0
275.0 806.0 276.0 828.0 157.0 830.0 157.0 809.0 large-vehicle 0
268.0 861.0 269.0 879.0 153.0 878.0 153.0 858.0 large-vehicle 0
275.0 881.0 277.0 901.0 147.0 903.0 147.0 880.0 large-vehicle 0
277.0 904.0 279.0 924.0 149.0 928.0 149.0 908.0 large-vehicle 0
278.0 926.0 280.0 946.0 150.0 951.0 151.0 933.0 large-vehicle 0
285.0 951.0 286.0 975.0 158.0 978.0 158.0 956.0 large-vehicle 0
280.0 978.0 281.0 996.0 151.0 1001.0 152.0 983.0 large-vehicle 0
277.0 1003.0 277.0 1023.0 149.0 1026.0 150.0 1006.0 large-vehicle 0
277.0 1026.0 277.0 1047.0 149.0 1049.0 151.0 1030.0 large-vehicle 0
279.0 1050.0 281.0 1069.0 152.0 1075.0 152.0 1056.0 large-vehicle 0
281.0 1073.0 286.0 1093.0 158.0 1101.0 156.0 1082.0 large-vehicle 0
285.0 1097.0 287.0 1117.0 159.0 1124.0 158.0 1105.0 large-vehicle 0
278.0 1150.0 282.0 1172.0 154.0 1181.0 152.0 1161.0 large-vehicle 0
279.0 1176.0 281.0 1197.0 155.0 1205.0 153.0 1183.0 large-vehicle 0
332.0 1348.0 310.0 1348.0 313.0 1183.0 333.0 1184.0 large-vehicle 0
460.0 954.0 458.0 933.0 624.0 921.0 626.0 942.0 large-vehicle 0
513.0 916.0 513.0 897.0 595.0 891.0 597.0 912.0 large-vehicle 0
484.0 1081.0 484.0 1063.0 613.0 1053.0 613.0 1073.0 large-vehicle 0
482.0 1106.0 482.0 1088.0 596.0 1081.0 598.0 1100.0 large-vehicle 0
434.0 1181.0 435.0 1159.0 560.0 1154.0 563.0 1174.0 large-vehicle 0
496.0 1206.0 493.0 1186.0 619.0 1175.0 623.0 1195.0 large-vehicle 0
498.0 1231.0 498.0 1211.0 625.0 1204.0 626.0 1226.0 large-vehicle 0
485.0 1259.0 484.0 1241.0 583.0 1234.0 583.0 1255.0 large-vehicle 0
233.0 94.0 254.0 89.0 271.0 181.0 248.0 186.0 large-vehicle 1


================================================
FILE: DOTA_demo/labelTxt/P0005.txt
================================================
imagesource:GoogleEarth
gsd:0.120384949364
76.0 847.0 76.0 864.0 34.0 866.0 34.0 847.0 small-vehicle 0
278.0 731.0 279.0 710.0 370.0 711.0 371.0 731.0 large-vehicle 0
278.0 786.0 279.0 766.0 373.0 768.0 372.0 789.0 large-vehicle 0
276.0 815.0 279.0 793.0 372.0 798.0 371.0 818.0 large-vehicle 0
277.0 844.0 276.0 823.0 369.0 826.0 366.0 848.0 large-vehicle 0
275.0 871.0 276.0 853.0 368.0 856.0 368.0 876.0 large-vehicle 0
268.0 901.0 271.0 881.0 353.0 886.0 353.0 907.0 large-vehicle 0
492.0 187.0 491.0 207.0 389.0 204.0 393.0 184.0 large-vehicle 0
491.0 211.0 489.0 232.0 403.0 229.0 404.0 207.0 large-vehicle 0
468.0 265.0 468.0 288.0 398.0 284.0 399.0 263.0 large-vehicle 0
468.0 292.0 469.0 313.0 400.0 314.0 402.0 293.0 large-vehicle 0
490.0 350.0 489.0 371.0 423.0 366.0 424.0 347.0 large-vehicle 0
467.0 378.0 465.0 397.0 394.0 396.0 396.0 374.0 large-vehicle 0
486.0 404.0 486.0 426.0 418.0 424.0 420.0 404.0 large-vehicle 0
488.0 435.0 487.0 456.0 418.0 449.0 421.0 430.0 large-vehicle 0
461.0 460.0 463.0 479.0 394.0 480.0 397.0 456.0 large-vehicle 0
481.0 487.0 479.0 511.0 408.0 508.0 413.0 485.0 large-vehicle 0
473.0 518.0 471.0 541.0 401.0 534.0 404.0 514.0 large-vehicle 0
460.0 546.0 460.0 567.0 400.0 566.0 402.0 544.0 large-vehicle 0
462.0 575.0 461.0 594.0 389.0 592.0 394.0 571.0 large-vehicle 0
473.0 601.0 473.0 623.0 404.0 621.0 408.0 597.0 large-vehicle 0
459.0 631.0 456.0 651.0 386.0 649.0 390.0 626.0 large-vehicle 0
474.0 657.0 475.0 677.0 412.0 679.0 414.0 656.0 large-vehicle 0
473.0 689.0 473.0 708.0 404.0 705.0 406.0 686.0 large-vehicle 0
469.0 716.0 468.0 738.0 401.0 731.0 403.0 713.0 large-vehicle 0
468.0 746.0 466.0 766.0 403.0 759.0 405.0 738.0 large-vehicle 0
470.0 771.0 471.0 790.0 411.0 789.0 411.0 769.0 large-vehicle 0
456.0 801.0 454.0 825.0 393.0 816.0 394.0 794.0 large-vehicle 0
453.0 827.0 454.0 847.0 391.0 843.0 393.0 821.0 large-vehicle 0
453.0 856.0 451.0 876.0 391.0 875.0 393.0 850.0 large-vehicle 0
463.0 884.0 464.0 901.0 403.0 905.0 404.0 884.0 large-vehicle 0
278.0 755.0 281.0 736.0 371.0 742.0 371.0 760.0 large-vehicle 0
278.0 702.0 280.0 680.0 370.0 684.0 369.0 705.0 large-vehicle 0
80.0 754.0 78.0 774.0 34.0 774.0 34.0 755.0 small-vehicle 0
279.0 672.0 282.0 651.0 373.0 654.0 372.0 676.0 large-vehicle 0
178.0 257.0 178.0 279.0 97.0 278.0 96.0 254.0 large-vehicle 0
174.0 311.0 173.0 332.0 89.0 333.0 88.0 312.0 large-vehicle 0
189.0 345.0 186.0 366.0 90.0 362.0 91.0 339.0 large-vehicle 0
189.0 457.0 189.0 478.0 95.0 474.0 97.0 454.0 large-vehicle 0
191.0 487.0 190.0 508.0 91.0 503.0 94.0 482.0 large-vehicle 0
184.0 516.0 183.0 536.0 86.0 531.0 89.0 511.0 large-vehicle 0
186.0 544.0 186.0 564.0 90.0 560.0 90.0 541.0 large-vehicle 0
186.0 573.0 184.0 592.0 88.0 590.0 92.0 569.0 large-vehicle 0
179.0 602.0 178.0 625.0 97.0 621.0 100.0 600.0 large-vehicle 0
170.0 660.0 168.0 681.0 89.0 679.0 91.0 658.0 large-vehicle 0
166.0 687.0 168.0 707.0 86.0 711.0 87.0 691.0 large-vehicle 0
165.0 718.0 162.0 736.0 81.0 732.0 83.0 713.0 large-vehicle 0
164.0 745.0 162.0 763.0 83.0 765.0 84.0 743.0 large-vehicle 0
161.0 774.0 161.0 794.0 80.0 792.0 79.0 772.0 large-vehicle 0
152.0 802.0 148.0 821.0 88.0 817.0 90.0 797.0 large-vehicle 0
146.0 831.0 146.0 849.0 84.0 851.0 85.0 831.0 large-vehicle 0
149.0 857.0 146.0 878.0 88.0 878.0 88.0 858.0 large-vehicle 0
147.0 886.0 147.0 907.0 87.0 907.0 88.0 885.0 large-vehicle 0
286.0 211.0 286.0 189.0 374.0 189.0 373.0 209.0 large-vehicle 0
284.0 243.0 285.0 221.0 375.0 225.0 374.0 246.0 large-vehicle 0
282.0 358.0 284.0 338.0 372.0 341.0 371.0 366.0 large-vehicle 0
282.0 414.0 283.0 391.0 374.0 397.0 373.0 418.0 large-vehicle 0
283.0 442.0 284.0 423.0 375.0 426.0 374.0 447.0 large-vehicle 0
284.0 475.0 284.0 453.0 374.0 456.0 374.0 474.0 large-vehicle 0
280.0 529.0 283.0 504.0 376.0 514.0 376.0 533.0 large-vehicle 0
283.0 558.0 284.0 540.0 376.0 542.0 376.0 561.0 large-vehicle 0
279.0 586.0 282.0 566.0 374.0 571.0 373.0 591.0 large-vehicle 0
276.0 618.0 276.0 595.0 368.0 599.0 368.0 619.0 large-vehicle 0
281.0 644.0 282.0 626.0 374.0 628.0 371.0 648.0 large-vehicle 0
578.0 284.0 579.0 263.0 628.0 264.0 627.0 284.0 large-vehicle 0
576.0 312.0 579.0 293.0 628.0 298.0 628.0 314.0 large-vehicle 0
576.0 338.0 578.0 319.0 626.0 323.0 626.0 339.0 large-vehicle 0
572.0 367.0 574.0 349.0 623.0 349.0 621.0 369.0 large-vehicle 0
34.0 2.0 53.0 1.0 49.0 32.0 31.0 32.0 small-vehicle 0
46.0 39.0 63.0 38.0 61.0 73.0 41.0 74.0 small-vehicle 0
166.0 86.0 166.0 106.0 121.0 107.0 120.0 85.0 small-vehicle 0
224.0 82.0 226.0 99.0 186.0 102.0 185.0 87.0 small-vehicle 0
461.0 25.0 481.0 30.0 470.0 70.0 452.0 64.0 small-vehicle 1
500.0 32.0 518.0 34.0 512.0 73.0 494.0 70.0 small-vehicle 1
517.0 32.0 535.0 34.0 531.0 75.0 513.0 74.0 small-vehicle 1
534.0 37.0 549.0 38.0 546.0 68.0 531.0 67.0 small-vehicle 1
571.0 74.0 551.0 75.0 549.0 38.0 569.0 37.0 small-vehicle 1
575.0 27.0 595.0 27.0 596.0 69.0 575.0 69.0 small-vehicle 1
620.0 32.0 638.0 33.0 638.0 65.0 620.0 65.0 small-vehicle 1
671.0 32.0 692.0 31.0 695.0 73.0 674.0 75.0 small-vehicle 1
421.0 155.0 421.0 135.0 466.0 134.0 466.0 153.0 small-vehicle 1
412.0 136.0 413.0 155.0 369.0 158.0 368.0 139.0 small-vehicle 0
322.0 142.0 322.0 161.0 282.0 162.0 282.0 143.0 small-vehicle 1
277.0 144.0 279.0 162.0 236.0 167.0 234.0 148.0 small-vehicle 1
231.0 147.0 234.0 165.0 190.0 171.0 187.0 153.0 small-vehicle 1
36.0 318.0 38.0 299.0 81.0 304.0 79.0 321.0 small-vehicle 1
40.0 342.0 41.0 326.0 80.0 326.0 81.0 342.0 small-vehicle 1
39.0 373.0 39.0 357.0 83.0 359.0 82.0 376.0 small-vehicle 1
38.0 397.0 39.0 381.0 81.0 382.0 81.0 399.0 small-vehicle 1
34.0 419.0 34.0 402.0 80.0 406.0 78.0 422.0 small-vehicle 1
36.0 443.0 36.0 426.0 80.0 426.0 79.0 444.0 small-vehicle 1
26.0 562.0 27.0 535.0 81.0 538.0 81.0 563.0 small-vehicle 1
80.0 620.0 76.0 637.0 37.0 632.0 40.0 615.0 small-vehicle 1
78.0 663.0 78.0 681.0 38.0 683.0 37.0 665.0 small-vehicle 1
77.0 582.0 76.0 600.0 38.0 601.0 38.0 582.0 small-vehicle 0
76.0 644.0 76.0 664.0 32.0 663.0 33.0 644.0 small-vehicle 0
77.0 691.0 77.0 710.0 29.0 710.0 29.0 691.0 small-vehicle 0
696.0 911.0 684.0 895.0 723.0 860.0 736.0 878.0 large-vehicle 0
694.0 879.0 682.0 860.0 719.0 828.0 731.0 844.0 large-vehicle 0
693.0 846.0 680.0 827.0 718.0 792.0 731.0 808.0 large-vehicle 0
570.0 861.0 573.0 841.0 624.0 845.0 621.0 865.0 large-vehicle 0
574.0 396.0 574.0 377.0 621.0 378.0 621.0 397.0 large-vehicle 0
576.0 426.0 578.0 406.0 626.0 408.0 626.0 426.0 large-vehicle 0
573.0 454.0 574.0 436.0 621.0 436.0 621.0 455.0 large-vehicle 0
574.0 479.0 576.0 462.0 626.0 463.0 623.0 481.0 large-vehicle 0
573.0 508.0 573.0 488.0 621.0 488.0 621.0 508.0 large-vehicle 0
573.0 538.0 573.0 519.0 621.0 518.0 622.0 536.0 large-vehicle 0
568.0 563.0 571.0 543.0 620.0 546.0 619.0 568.0 large-vehicle 0
569.0 592.0 571.0 573.0 622.0 577.0 619.0 597.0 large-vehicle 0
566.0 617.0 569.0 600.0 618.0 601.0 614.0 622.0 large-vehicle 0
574.0 649.0 576.0 628.0 625.0 628.0 624.0 649.0 large-vehicle 0
565.0 674.0 571.0 656.0 619.0 659.0 618.0 678.0 large-vehicle 0
566.0 705.0 566.0 686.0 617.0 685.0 617.0 706.0 large-vehicle 0
570.0 833.0 571.0 814.0 626.0 817.0 624.0 836.0 large-vehicle 0
568.0 890.0 569.0 869.0 621.0 874.0 617.0 894.0 large-vehicle 0
698.0 805.0 686.0 789.0 722.0 755.0 736.0 771.0 large-vehicle 0
565.0 916.0 571.0 897.0 620.0 898.0 615.0 921.0 large-vehicle 0
695.0 351.0 683.0 336.0 719.0 302.0 733.0 317.0 large-vehicle 0
701.0 418.0 686.0 402.0 722.0 367.0 736.0 383.0 large-vehicle 0
696.0 454.0 682.0 436.0 722.0 407.0 736.0 424.0 large-vehicle 0
695.0 490.0 683.0 469.0 723.0 442.0 734.0 457.0 large-vehicle 0
701.0 520.0 687.0 503.0 728.0 471.0 740.0 487.0 large-vehicle 0
701.0 556.0 684.0 540.0 726.0 508.0 740.0 523.0 large-vehicle 0
698.0 593.0 686.0 570.0 728.0 544.0 739.0 560.0 large-vehicle 0
698.0 627.0 687.0 607.0 727.0 577.0 740.0 594.0 large-vehicle 0
696.0 662.0 684.0 642.0 723.0 613.0 736.0 630.0 large-vehicle 0
704.0 695.0 689.0 677.0 728.0 645.0 741.0 662.0 large-vehicle 0
698.0 735.0 684.0 718.0 721.0 684.0 734.0 701.0 large-vehicle 0
703.0 769.0 688.0 751.0 723.0 718.0 737.0 731.0 large-vehicle 0
181.0 226.0 180.0 246.0 97.0 242.0 99.0 222.0 large-vehicle 0


================================================
FILE: DOTA_demo/labelTxt/P1478__1__853___962.txt
================================================
907.0 127.0 889.0 126.0 890.0 88.0 908.0 89.0 small-vehicle 1
1.0 187.0 1.0 187.0 1.0 219.0 1.0 219.0 small-vehicle 2
1.0 220.0 1.0 220.0 1.0 254.0 1.0 254.0 small-vehicle 2
2.0 145.0 19.0 145.0 19.0 179.0 2.0 179.0 small-vehicle 0
3.0 181.0 18.0 181.0 18.0 221.0 3.0 221.0 small-vehicle 0
2.0 222.0 18.0 222.0 18.0 257.0 2.0 257.0 small-vehicle 0
20.0 190.0 35.0 190.0 35.0 220.0 20.0 220.0 small-vehicle 0
38.0 220.0 56.0 220.0 56.0 258.0 38.0 258.0 small-vehicle 0
75.0 182.0 94.0 182.0 94.0 222.0 75.0 222.0 small-vehicle 0
74.0 223.0 92.0 223.0 92.0 257.0 74.0 257.0 small-vehicle 0
267.0 528.0 281.0 528.0 281.0 560.0 267.0 560.0 small-vehicle 0
268.0 562.0 282.0 562.0 282.0 590.0 268.0 590.0 small-vehicle 0
267.0 590.0 281.0 590.0 281.0 621.0 267.0 621.0 small-vehicle 0
248.0 588.0 262.0 588.0 262.0 622.0 248.0 622.0 small-vehicle 0
300.0 547.0 317.0 547.0 317.0 590.0 300.0 590.0 small-vehicle 0
303.0 590.0 317.0 590.0 317.0 623.0 303.0 623.0 small-vehicle 0
320.0 545.0 336.0 545.0 336.0 583.0 320.0 583.0 small-vehicle 0
321.0 583.0 336.0 583.0 336.0 622.0 321.0 622.0 small-vehicle 0
358.0 536.0 375.0 536.0 375.0 578.0 358.0 578.0 small-vehicle 0
356.0 578.0 374.0 578.0 374.0 620.0 356.0 620.0 small-vehicle 0
398.0 592.0 412.0 592.0 412.0 624.0 398.0 624.0 small-vehicle 0
413.0 592.0 427.0 592.0 427.0 624.0 413.0 624.0 small-vehicle 0
429.0 592.0 443.0 592.0 443.0 623.0 429.0 623.0 small-vehicle 0
445.0 591.0 461.0 591.0 461.0 620.0 445.0 620.0 small-vehicle 0
465.0 594.0 478.0 594.0 478.0 623.0 465.0 623.0 small-vehicle 0
496.0 594.0 509.0 594.0 509.0 620.0 496.0 620.0 small-vehicle 0
511.0 592.0 528.0 592.0 528.0 622.0 511.0 622.0 small-vehicle 0
533.0 590.0 546.0 590.0 546.0 621.0 533.0 621.0 small-vehicle 0
553.0 586.0 568.0 586.0 568.0 621.0 553.0 621.0 small-vehicle 0
157.0 592.0 171.0 592.0 171.0 622.0 157.0 622.0 small-vehicle 0
159.0 563.0 173.0 563.0 173.0 592.0 159.0 592.0 small-vehicle 0
158.0 531.0 171.0 531.0 171.0 562.0 158.0 562.0 small-vehicle 0
213.0 407.0 227.0 407.0 227.0 445.0 213.0 445.0 small-vehicle 0
773.0 142.0 788.0 142.0 788.0 182.0 773.0 182.0 small-vehicle 0
794.0 143.0 809.0 143.0 809.0 180.0 794.0 180.0 small-vehicle 0
302.0 354.0 319.0 354.0 319.0 394.0 302.0 394.0 small-vehicle 0
303.0 394.0 318.0 394.0 318.0 430.0 303.0 430.0 small-vehicle 0
302.0 432.0 319.0 432.0 319.0 468.0 302.0 468.0 small-vehicle 0
303.0 468.0 321.0 468.0 321.0 507.0 303.0 507.0 small-vehicle 0
192.0 369.0 209.0 369.0 209.0 411.0 192.0 411.0 small-vehicle 0
194.0 410.0 208.0 410.0 208.0 439.0 194.0 439.0 small-vehicle 0
212.0 445.0 229.0 445.0 229.0 484.0 212.0 484.0 small-vehicle 0
211.0 585.0 225.0 585.0 225.0 620.0 211.0 620.0 small-vehicle 0
211.0 485.0 227.0 485.0 227.0 522.0 211.0 522.0 small-vehicle 0
212.0 523.0 228.0 523.0 228.0 556.0 212.0 556.0 small-vehicle 0
193.0 441.0 210.0 441.0 210.0 479.0 193.0 479.0 small-vehicle 0
193.0 479.0 209.0 479.0 209.0 514.0 193.0 514.0 small-vehicle 0
192.0 516.0 207.0 516.0 207.0 552.0 192.0 552.0 small-vehicle 0
192.0 552.0 207.0 552.0 207.0 588.0 192.0 588.0 small-vehicle 0
191.0 589.0 206.0 589.0 206.0 622.0 191.0 622.0 small-vehicle 0
213.0 557.0 226.0 557.0 226.0 585.0 213.0 585.0 small-vehicle 0
573.0 584.0 589.0 584.0 589.0 622.0 573.0 622.0 small-vehicle 0
594.0 585.0 611.0 585.0 611.0 622.0 594.0 622.0 small-vehicle 0
617.0 584.0 633.0 584.0 633.0 622.0 617.0 622.0 small-vehicle 0
732.0 1.0 750.0 1.0 750.0 34.0 732.0 34.0 small-vehicle 0
751.0 1.0 768.0 1.0 768.0 37.0 751.0 37.0 small-vehicle 0
697.0 1.0 712.0 1.0 712.0 30.0 697.0 30.0 small-vehicle 0
715.0 1.0 730.0 1.0 730.0 35.0 715.0 35.0 small-vehicle 0
678.0 1.0 694.0 1.0 694.0 31.0 678.0 31.0 small-vehicle 0
638.0 589.0 652.0 589.0 652.0 619.0 638.0 619.0 small-vehicle 0
472.0 1.0 489.0 1.0 489.0 36.0 472.0 36.0 small-vehicle 0
656.0 586.0 672.0 586.0 672.0 617.0 656.0 617.0 small-vehicle 0
674.0 582.0 692.0 582.0 692.0 621.0 674.0 621.0 small-vehicle 0
702.0 586.0 716.0 586.0 716.0 616.0 702.0 616.0 small-vehicle 0
722.0 581.0 739.0 581.0 739.0 621.0 722.0 621.0 small-vehicle 0
742.0 583.0 759.0 583.0 759.0 618.0 742.0 618.0 small-vehicle 0
765.0 580.0 784.0 580.0 784.0 621.0 765.0 621.0 small-vehicle 0
801.0 586.0 817.0 586.0 817.0 619.0 801.0 619.0 small-vehicle 0
453.0 1.0 470.0 1.0 470.0 37.0 453.0 37.0 small-vehicle 0
491.0 1.0 507.0 1.0 507.0 34.0 491.0 34.0 small-vehicle 0
659.0 1.0 676.0 1.0 676.0 32.0 659.0 32.0 small-vehicle 0
512.0 1.0 526.0 1.0 526.0 34.0 512.0 34.0 small-vehicle 0
529.0 1.0 544.0 1.0 544.0 33.0 529.0 33.0 small-vehicle 0
548.0 1.0 563.0 1.0 563.0 30.0 548.0 30.0 small-vehicle 0
567.0 1.0 583.0 1.0 583.0 32.0 567.0 32.0 small-vehicle 0
584.0 1.0 601.0 1.0 601.0 33.0 584.0 33.0 small-vehicle 0
604.0 1.0 621.0 1.0 621.0 29.0 604.0 29.0 small-vehicle 0
623.0 1.0 637.0 1.0 637.0 29.0 623.0 29.0 small-vehicle 0
640.0 1.0 656.0 1.0 656.0 29.0 640.0 29.0 small-vehicle 0
753.0 140.0 769.0 140.0 769.0 179.0 753.0 179.0 small-vehicle 0
734.0 140.0 751.0 140.0 751.0 181.0 734.0 181.0 small-vehicle 0
714.0 140.0 732.0 140.0 732.0 180.0 714.0 180.0 small-vehicle 0
696.0 141.0 713.0 141.0 713.0 182.0 696.0 182.0 small-vehicle 0
511.0 142.0 525.0 142.0 525.0 178.0 511.0 178.0 small-vehicle 0
361.0 145.0 380.0 145.0 380.0 184.0 361.0 184.0 small-vehicle 0
380.0 144.0 395.0 144.0 395.0 181.0 380.0 181.0 small-vehicle 0
397.0 142.0 413.0 142.0 413.0 182.0 397.0 182.0 small-vehicle 0
415.0 141.0 431.0 141.0 431.0 183.0 415.0 183.0 small-vehicle 0
435.0 142.0 452.0 142.0 452.0 182.0 435.0 182.0 small-vehicle 0
455.0 142.0 470.0 142.0 470.0 179.0 455.0 179.0 small-vehicle 0
472.0 142.0 489.0 142.0 489.0 178.0 472.0 178.0 small-vehicle 0
492.0 143.0 507.0 143.0 507.0 176.0 492.0 176.0 small-vehicle 0
529.0 142.0 544.0 142.0 544.0 182.0 529.0 182.0 small-vehicle 0
195.0 142.0 211.0 142.0 211.0 181.0 195.0 181.0 small-vehicle 0
546.0 141.0 563.0 141.0 563.0 182.0 546.0 182.0 small-vehicle 0
566.0 142.0 582.0 142.0 582.0 182.0 566.0 182.0 small-vehicle 0
584.0 141.0 600.0 141.0 600.0 182.0 584.0 182.0 small-vehicle 0
603.0 142.0 618.0 142.0 618.0 182.0 603.0 182.0 small-vehicle 0
621.0 141.0 635.0 141.0 635.0 181.0 621.0 181.0 small-vehicle 0
639.0 141.0 656.0 141.0 656.0 182.0 639.0 182.0 small-vehicle 0
659.0 142.0 674.0 142.0 674.0 181.0 659.0 181.0 small-vehicle 0
675.0 142.0 693.0 142.0 693.0 184.0 675.0 184.0 small-vehicle 0
342.0 144.0 359.0 144.0 359.0 184.0 342.0 184.0 small-vehicle 0
436.0 1.0 451.0 1.0 451.0 33.0 436.0 33.0 small-vehicle 0
232.0 1.0 247.0 1.0 247.0 29.0 232.0 29.0 small-vehicle 0
158.0 1.0 173.0 1.0 173.0 31.0 158.0 31.0 small-vehicle 0
175.0 1.0 192.0 1.0 192.0 32.0 175.0 32.0 small-vehicle 0
194.0 1.0 211.0 1.0 211.0 31.0 194.0 31.0 small-vehicle 0
211.0 1.0 230.0 1.0 230.0 33.0 211.0 33.0 small-vehicle 0
249.0 1.0 266.0 1.0 266.0 31.0 249.0 31.0 small-vehicle 0
417.0 1.0 433.0 1.0 433.0 32.0 417.0 32.0 small-vehicle 0
270.0 1.0 287.0 1.0 287.0 31.0 270.0 31.0 small-vehicle 0
288.0 1.0 305.0 1.0 305.0 31.0 288.0 31.0 small-vehicle 0
307.0 1.0 323.0 1.0 323.0 28.0 307.0 28.0 small-vehicle 0
324.0 1.0 342.0 1.0 342.0 34.0 324.0 34.0 small-vehicle 0
343.0 1.0 360.0 1.0 360.0 33.0 343.0 33.0 small-vehicle 0
362.0 1.0 379.0 1.0 379.0 35.0 362.0 35.0 small-vehicle 0
382.0 1.0 396.0 1.0 396.0 34.0 382.0 34.0 small-vehicle 0
399.0 1.0 415.0 1.0 415.0 28.0 399.0 28.0 small-vehicle 0
211.0 221.0 192.0 222.0 193.0 185.0 210.0 186.0 small-vehicle 0
414.0 221.0 398.0 222.0 396.0 187.0 413.0 185.0 small-vehicle 0
250.0 222.0 232.0 221.0 230.0 187.0 248.0 187.0 small-vehicle 0
287.0 225.0 267.0 225.0 267.0 186.0 287.0 184.0 small-vehicle 0
305.0 223.0 286.0 226.0 287.0 185.0 304.0 186.0 small-vehicle 0
322.0 223.0 303.0 224.0 305.0 186.0 322.0 187.0 small-vehicle 0
340.0 222.0 320.0 223.0 321.0 187.0 340.0 185.0 small-vehicle 0
360.0 222.0 340.0 223.0 339.0 187.0 357.0 185.0 small-vehicle 0
376.0 223.0 359.0 222.0 359.0 185.0 379.0 186.0 small-vehicle 0
397.0 222.0 377.0 222.0 379.0 187.0 397.0 186.0 small-vehicle 0
432.0 222.0 416.0 221.0 414.0 185.0 433.0 187.0 small-vehicle 0
229.0 222.0 209.0 221.0 211.0 185.0 231.0 187.0 small-vehicle 0
194.0 222.0 173.0 222.0 175.0 187.0 193.0 187.0 small-vehicle 0
174.0 222.0 155.0 221.0 155.0 187.0 174.0 186.0 small-vehicle 0
812.0 3.0 795.0 4.0 794.0 1.0 812.0 1.0 small-vehicle 2
813.0 38.0 794.0 37.0 794.0 4.0 812.0 3.0 small-vehicle 0
812.0 85.0 795.0 84.0 794.0 47.0 812.0 48.0 small-vehicle 0
814.0 123.0 795.0 122.0 796.0 87.0 810.0 85.0 small-vehicle 0
732.0 222.0 715.0 223.0 715.0 184.0 733.0 183.0 small-vehicle 0
754.0 215.0 736.0 214.0 738.0 186.0 753.0 186.0 small-vehicle 0
786.0 221.0 768.0 222.0 770.0 185.0 784.0 182.0 small-vehicle 0
809.0 220.0 793.0 220.0 793.0 185.0 809.0 185.0 small-vehicle 0
713.0 315.0 695.0 315.0 696.0 280.0 711.0 281.0 small-vehicle 0
401.0 455.0 415.0 455.0 415.0 485.0 399.0 483.0 small-vehicle 0
765.0 521.0 748.0 521.0 747.0 493.0 764.0 493.0 small-vehicle 0
618.0 359.0 636.0 358.0 637.0 395.0 617.0 394.0 small-vehicle 0
619.0 402.0 636.0 402.0 637.0 439.0 618.0 438.0 small-vehicle 0
620.0 453.0 636.0 453.0 634.0 492.0 617.0 489.0 small-vehicle 0
815.0 410.0 800.0 409.0 802.0 383.0 817.0 384.0 small-vehicle 0
817.0 451.0 802.0 451.0 801.0 423.0 814.0 422.0 small-vehicle 0
817.0 495.0 804.0 492.0 803.0 470.0 817.0 471.0 small-vehicle 0
817.0 537.0 800.0 537.0 799.0 506.0 815.0 507.0 small-vehicle 0
421.0 410.0 436.0 408.0 437.0 437.0 421.0 437.0 small-vehicle 0
765.0 459.0 748.0 459.0 748.0 428.0 764.0 429.0 small-vehicle 0
444.0 375.0 459.0 374.0 455.0 410.0 440.0 409.0 small-vehicle 0
478.0 321.0 497.0 321.0 495.0 355.0 478.0 357.0 small-vehicle 0
483.0 272.0 497.0 273.0 497.0 304.0 480.0 302.0 small-vehicle 0
408.0 267.0 423.0 267.0 421.0 303.0 406.0 302.0 small-vehicle 0
382.0 264.0 397.0 264.0 394.0 293.0 381.0 293.0 small-vehicle 0
377.0 300.0 360.0 301.0 358.0 268.0 377.0 265.0 small-vehicle 0
359.0 300.0 340.0 297.0 340.0 262.0 358.0 260.0 small-vehicle 0
174.0 303.0 155.0 302.0 156.0 265.0 177.0 264.0 small-vehicle 0
765.0 491.0 748.0 489.0 748.0 463.0 765.0 462.0 small-vehicle 0
764.0 424.0 748.0 426.0 748.0 398.0 764.0 395.0 small-vehicle 0
712.0 347.0 694.0 347.0 695.0 316.0 713.0 315.0 small-vehicle 0
730.0 521.0 716.0 522.0 719.0 498.0 732.0 498.0 small-vehicle 0
713.0 384.0 696.0 385.0 696.0 352.0 712.0 352.0 small-vehicle 0
696.0 385.0 679.0 387.0 677.0 350.0 697.0 348.0 small-vehicle 0
697.0 421.0 680.0 422.0 678.0 388.0 696.0 386.0 small-vehicle 0
698.0 459.0 681.0 460.0 679.0 425.0 696.0 423.0 small-vehicle 0
715.0 456.0 700.0 459.0 698.0 424.0 713.0 427.0 small-vehicle 0
698.0 493.0 682.0 494.0 682.0 463.0 697.0 462.0 small-vehicle 0
698.0 530.0 680.0 528.0 680.0 498.0 698.0 495.0 small-vehicle 0
716.0 524.0 700.0 523.0 700.0 495.0 716.0 498.0 small-vehicle 0
731.0 495.0 716.0 495.0 717.0 467.0 731.0 467.0 small-vehicle 0
764.0 394.0 745.0 397.0 744.0 360.0 764.0 358.0 small-vehicle 0
715.0 495.0 701.0 495.0 700.0 463.0 716.0 461.0 small-vehicle 0
731.0 464.0 717.0 463.0 716.0 437.0 731.0 436.0 small-vehicle 0
732.0 438.0 716.0 437.0 715.0 407.0 732.0 407.0 small-vehicle 0
715.0 421.0 700.0 422.0 699.0 386.0 715.0 384.0 small-vehicle 0
732.0 404.0 715.0 405.0 715.0 371.0 732.0 371.0 small-vehicle 0
733.0 369.0 716.0 369.0 715.0 334.0 729.0 333.0 small-vehicle 0
733.0 331.0 715.0 330.0 715.0 296.0 732.0 294.0 small-vehicle 0
763.0 357.0 745.0 357.0 744.0 324.0 761.0 324.0 small-vehicle 0
920.0 700.0 893.0 701.0 888.0 576.0 917.0 577.0 large-vehicle 0
611.0 738.0 637.0 737.0 637.0 840.0 611.0 839.0 large-vehicle 0
459.0 630.0 484.0 630.0 482.0 734.0 456.0 732.0 large-vehicle 0
380.0 736.0 405.0 736.0 405.0 837.0 379.0 836.0 large-vehicle 0
584.0 634.0 612.0 634.0 611.0 738.0 584.0 736.0 large-vehicle 0
611.0 633.0 636.0 631.0 636.0 737.0 611.0 738.0 large-vehicle 0
638.0 638.0 662.0 640.0 663.0 737.0 636.0 738.0 large-vehicle 0
663.0 636.0 690.0 637.0 688.0 739.0 662.0 740.0 large-vehicle 0
716.0 633.0 743.0 631.0 741.0 737.0 714.0 733.0 large-vehicle 0
583.0 738.0 611.0 737.0 611.0 841.0 583.0 838.0 large-vehicle 0
636.0 739.0 663.0 738.0 663.0 840.0 637.0 839.0 large-vehicle 0
662.0 740.0 689.0 739.0 688.0 841.0 663.0 840.0 large-vehicle 0
715.0 738.0 742.0 737.0 743.0 841.0 713.0 841.0 large-vehicle 0
303.0 148.0 319.0 139.0 341.0 170.0 326.0 179.0 small-vehicle 1
174.0 141.0 192.0 144.0 190.0 176.0 174.0 177.0 small-vehicle 1
407.0 632.0 432.0 632.0 430.0 734.0 406.0 734.0 large-vehicle 0
382.0 634.0 409.0 634.0 406.0 731.0 382.0 731.0 large-vehicle 0
159.0 737.0 182.0 740.0 181.0 841.0 157.0 842.0 large-vehicle 0
132.0 737.0 160.0 737.0 156.0 842.0 133.0 841.0 large-vehicle 0
135.0 634.0 158.0 634.0 159.0 736.0 133.0 738.0 large-vehicle 0
7.0 637.0 34.0 638.0 33.0 738.0 5.0 739.0 large-vehicle 0
35.0 635.0 59.0 636.0 58.0 735.0 33.0 736.0 large-vehicle 0
59.0 634.0 83.0 636.0 83.0 737.0 58.0 738.0 large-vehicle 0
85.0 635.0 107.0 636.0 108.0 737.0 83.0 738.0 large-vehicle 0
108.0 636.0 134.0 634.0 133.0 738.0 109.0 738.0 large-vehicle 0
160.0 629.0 182.0 629.0 181.0 731.0 159.0 730.0 large-vehicle 0
186.0 637.0 208.0 638.0 207.0 735.0 185.0 736.0 large-vehicle 0
212.0 633.0 232.0 633.0 230.0 733.0 211.0 735.0 large-vehicle 0
236.0 632.0 258.0 632.0 255.0 731.0 235.0 731.0 large-vehicle 0
12.0 739.0 34.0 737.0 32.0 843.0 9.0 841.0 large-vehicle 0
35.0 737.0 58.0 737.0 56.0 843.0 35.0 841.0 large-vehicle 0
58.0 737.0 82.0 736.0 82.0 843.0 57.0 842.0 large-vehicle 0
83.0 737.0 107.0 737.0 107.0 843.0 81.0 844.0 large-vehicle 0
107.0 738.0 131.0 738.0 132.0 843.0 107.0 843.0 large-vehicle 0
115.0 9.0 115.0 1.0 150.0 1.0 150.0 8.0 small-vehicle 2
115.0 28.0 114.0 9.0 150.0 8.0 151.0 28.0 small-vehicle 0
113.0 50.0 114.0 28.0 152.0 29.0 151.0 50.0 small-vehicle 0
80.0 1.0 80.0 13.0 45.0 14.0 44.0 1.0 small-vehicle 0
2.0 12.0 2.0 1.0 39.0 1.0 39.0 12.0 small-vehicle 2
2.0 30.0 2.0 13.0 38.0 12.0 39.0 29.0 small-vehicle 0
1.0 53.0 0.0 34.0 40.0 32.0 41.0 52.0 small-vehicle 0
0.0 90.0 0.0 71.0 39.0 69.0 40.0 91.0 small-vehicle 0
78.0 92.0 77.0 111.0 42.0 109.0 40.0 93.0 small-vehicle 0
77.0 73.0 78.0 92.0 47.0 90.0 49.0 72.0 small-vehicle 0
78.0 54.0 77.0 72.0 41.0 73.0 42.0 55.0 small-vehicle 0
80.0 13.0 80.0 34.0 41.0 34.0 39.0 13.0 small-vehicle 0
747.0 70.0 726.0 72.0 728.0 35.0 747.0 37.0 small-vehicle 0
767.0 72.0 746.0 71.0 746.0 36.0 763.0 36.0 small-vehicle 0
173.0 109.0 153.0 110.0 154.0 71.0 172.0 71.0 small-vehicle 0
190.0 110.0 172.0 109.0 171.0 77.0 190.0 78.0 small-vehicle 0
208.0 109.0 191.0 108.0 191.0 75.0 207.0 75.0 small-vehicle 0
225.0 110.0 207.0 108.0 208.0 73.0 225.0 72.0 small-vehicle 0
245.0 109.0 225.0 109.0 225.0 72.0 245.0 71.0 small-vehicle 0
264.0 109.0 246.0 110.0 246.0 75.0 262.0 74.0 small-vehicle 0
283.0 109.0 266.0 109.0 264.0 71.0 282.0 72.0 small-vehicle 0
302.0 109.0 284.0 109.0 284.0 71.0 301.0 71.0 small-vehicle 0
320.0 109.0 302.0 109.0 301.0 71.0 319.0 71.0 small-vehicle 0
338.0 110.0 320.0 110.0 321.0 72.0 338.0 71.0 small-vehicle 0
357.0 110.0 339.0 111.0 338.0 69.0 355.0 71.0 small-vehicle 0
375.0 109.0 356.0 110.0 355.0 72.0 375.0 72.0 small-vehicle 0
393.0 110.0 376.0 109.0 375.0 74.0 392.0 72.0 small-vehicle 0
413.0 110.0 393.0 110.0 391.0 72.0 412.0 71.0 small-vehicle 0
431.0 110.0 413.0 109.0 412.0 70.0 429.0 70.0 small-vehicle 0
448.0 109.0 431.0 110.0 430.0 70.0 450.0 71.0 small-vehicle 0
469.0 110.0 449.0 109.0 449.0 73.0 467.0 71.0 small-vehicle 0
728.0 71.0 710.0 72.0 710.0 36.0 726.0 36.0 small-vehicle 0
709.0 71.0 692.0 71.0 691.0 34.0 710.0 35.0 small-vehicle 0
691.0 71.0 673.0 72.0 674.0 39.0 691.0 38.0 small-vehicle 0
488.0 71.0 469.0 71.0 468.0 36.0 487.0 36.0 small-vehicle 0
337.0 70.0 319.0 71.0 320.0 34.0 338.0 36.0 small-vehicle 0
355.0 70.0 337.0 70.0 338.0 36.0 355.0 35.0 small-vehicle 0
377.0 70.0 355.0 71.0 354.0 34.0 375.0 35.0 small-vehicle 0
392.0 70.0 376.0 71.0 376.0 36.0 394.0 34.0 small-vehicle 0
414.0 71.0 392.0 72.0 395.0 36.0 411.0 38.0 small-vehicle 0
430.0 71.0 411.0 71.0 412.0 33.0 429.0 33.0 small-vehicle 0
450.0 71.0 430.0 70.0 430.0 37.0 449.0 38.0 small-vehicle 0
467.0 70.0 450.0 71.0 449.0 37.0 468.0 38.0 small-vehicle 0
506.0 70.0 487.0 70.0 486.0 36.0 507.0 35.0 small-vehicle 0
671.0 70.0 653.0 71.0 654.0 36.0 673.0 35.0 small-vehicle 0
523.0 71.0 506.0 71.0 504.0 37.0 525.0 36.0 small-vehicle 0
543.0 72.0 524.0 72.0 523.0 38.0 542.0 37.0 small-vehicle 0
561.0 71.0 543.0 70.0 542.0 36.0 561.0 38.0 small-vehicle 0
580.0 71.0 562.0 72.0 560.0 31.0 579.0 32.0 small-vehicle 0
598.0 70.0 580.0 71.0 579.0 34.0 598.0 34.0 small-vehicle 0
617.0 70.0 599.0 70.0 597.0 36.0 616.0 36.0 small-vehicle 0
635.0 70.0 616.0 70.0 618.0 32.0 636.0 30.0 small-vehicle 0
654.0 71.0 636.0 70.0 636.0 35.0 652.0 35.0 small-vehicle 0
488.0 110.0 469.0 110.0 469.0 71.0 486.0 71.0 small-vehicle 0
503.0 110.0 488.0 110.0 487.0 72.0 506.0 71.0 small-vehicle 0
524.0 108.0 506.0 109.0 506.0 72.0 525.0 72.0 small-vehicle 0
543.0 111.0 524.0 109.0 524.0 72.0 543.0 71.0 small-vehicle 0
708.0 109.0 688.0 109.0 690.0 72.0 709.0 73.0 small-vehicle 0
563.0 110.0 543.0 110.0 543.0 71.0 560.0 72.0 small-vehicle 0
578.0 109.0 561.0 108.0 560.0 73.0 581.0 71.0 small-vehicle 0
597.0 107.0 578.0 109.0 580.0 73.0 599.0 72.0 small-vehicle 0
618.0 108.0 599.0 108.0 599.0 73.0 617.0 71.0 small-vehicle 0
636.0 109.0 617.0 109.0 617.0 71.0 634.0 71.0 small-vehicle 0
654.0 108.0 635.0 109.0 635.0 71.0 654.0 71.0 small-vehicle 0
674.0 109.0 655.0 109.0 653.0 71.0 671.0 71.0 small-vehicle 0
688.0 109.0 672.0 109.0 672.0 72.0 689.0 72.0 small-vehicle 0
728.0 108.0 709.0 109.0 708.0 71.0 728.0 72.0 small-vehicle 0
746.0 107.0 729.0 108.0 727.0 71.0 745.0 71.0 small-vehicle 0
765.0 106.0 745.0 108.0 744.0 71.0 768.0 72.0 small-vehicle 0
320.0 71.0 303.0 70.0 302.0 35.0 319.0 34.0 small-vehicle 0
302.0 70.0 283.0 71.0 284.0 32.0 301.0 33.0 small-vehicle 0
284.0 70.0 264.0 70.0 262.0 34.0 282.0 34.0 small-vehicle 0
265.0 71.0 245.0 71.0 245.0 35.0 264.0 35.0 small-vehicle 0
170.0 71.0 154.0 70.0 153.0 35.0 170.0 35.0 small-vehicle 0
189.0 70.0 171.0 72.0 169.0 35.0 188.0 36.0 small-vehicle 0
208.0 71.0 190.0 70.0 189.0 36.0 206.0 35.0 small-vehicle 0
227.0 71.0 208.0 71.0 208.0 34.0 225.0 35.0 small-vehicle 0
245.0 71.0 226.0 70.0 225.0 35.0 244.0 35.0 small-vehicle 0

================================================
FILE: Draw_DOTA_YOLO.py
================================================
# -*- coding: utf-8 -*-
import dota_utils as util
import os
import numpy as np
from PIL import Image
import cv2
import random
from YOLO_Transform import longsideformat2cvminAreaRect, cvminAreaRect2longsideformat
import math

import cv2
import math
import numpy as np
import os
import shutil


def rotateAugment(angle, scale, image, labels):
    """
    旋转目标增强  随机旋转
    @param angle: 旋转增强角度 int 单位为度
    @param scale: 设为1,尺度由train.py中定义
    @param image:  img信息  shape(heght, width, 3)
    @param labels:  (num, [classid x_c y_c longside shortside Θ]) Θ ∈ int[0,180)
    @return:
            rotated_img: augmented_img信息  shape(heght, width, 3)
            rotated_labels: augmented_label:  (num, [classid x_c y_c longside shortside Θ])
    """
    Pi_angle = -angle * math.pi / 180.0  # 弧度制,后面旋转坐标需要用到,注意负号!!!
    rows, cols = image.shape[:2]
    a, b = cols / 2, rows / 2
    M = cv2.getRotationMatrix2D(center=(a, b), angle=angle, scale=scale)
    rotated_img = cv2.warpAffine(image, M, (cols, rows))  # 旋转后的图像保持大小不变
    rotated_labels = []
    for label in labels:
        # rect=[(x_c,y_c),(w,h),Θ] Θ:flaot[0-179]  -> (-180,0)
        rect = longsideformat2cvminAreaRect(label[1], label[2], label[3], label[4], (label[5] - 179.9))
        # poly = [(x1,y1),(x2,y2),(x3,y3),(x4,y4)]
        poly = cv2.boxPoints(rect)  # 返回rect对应的四个点的值 normalized

        # 四点坐标反归一化
        poly[:, 0] = poly[:, 0] * cols
        poly[:, 1] = poly[:, 1] * rows

        # 下面是计算旋转后目标相对旋转过后的图像的位置
        X0 = (poly[0][0] - a) * math.cos(Pi_angle) - (poly[0][1] - b) * math.sin(Pi_angle) + a
        Y0 = (poly[0][0] - a) * math.sin(Pi_angle) + (poly[0][1] - b) * math.cos(Pi_angle) + b

        X1 = (poly[1][0] - a) * math.cos(Pi_angle) - (poly[1][1] - b) * math.sin(Pi_angle) + a
        Y1 = (poly[1][0] - a) * math.sin(Pi_angle) + (poly[1][1] - b) * math.cos(Pi_angle) + b

        X2 = (poly[2][0] - a) * math.cos(Pi_angle) - (poly[2][1] - b) * math.sin(Pi_angle) + a
        Y2 = (poly[2][0] - a) * math.sin(Pi_angle) + (poly[2][1] - b) * math.cos(Pi_angle) + b

        X3 = (poly[3][0] - a) * math.cos(Pi_angle) - (poly[3][1] - b) * math.sin(Pi_angle) + a
        Y3 = (poly[3][0] - a) * math.sin(Pi_angle) + (poly[3][1] - b) * math.cos(Pi_angle) + b

        poly_rotated = np.array([(X0, Y0), (X1, Y1), (X2, Y2), (X3, Y3)])
        # 四点坐标归一化
        poly_rotated[:, 0] = poly_rotated[:, 0] / cols
        poly_rotated[:, 1] = poly_rotated[:, 1] / rows

        rect_rotated = cv2.minAreaRect(np.float32(poly_rotated))  # 得到最小外接矩形的(中心(x,y), (宽,高), 旋转角度)

        c_x = rect_rotated[0][0]
        c_y = rect_rotated[0][1]
        w = rect_rotated[1][0]
        h = rect_rotated[1][1]
        theta = rect_rotated[-1]  # Range for angle is [-90,0)

        label[1:] = cvminAreaRect2longsideformat(c_x, c_y, w, h, theta)

        if (sum(label[1:-1] <= 0) + sum(label[1:3] >= 1)) >= 1:  # 0<xy<1, 0<side<=1
            # print('bbox[:2]中有>= 1的元素,bbox中有<= 0的元素,已将某个box排除,')
            # print(
            #     '出问题的longside形式数据:[%.16f, %.16f, %.16f, %.16f, %.1f]' % (label[1], label[2], label[3], label[4], label[5]))
            continue

        label[-1] = int(label[-1] + 180.5)  # range int[0,180] 四舍五入
        if label[-1] == 180:  # range int[0,179]
            label[-1] = 179
        rotated_labels.append(label)

    return rotated_img, np.array(rotated_labels)




def drawLongsideFormatImg(imgpath, txtpath, dstpath, extractclassname, thickness=2, augment=False):
    """
    根据labels绘制边框(label_format:classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, Θ)
    :param imgpath: the path of images
    :param txtpath: the path of txt in longside format
    :param dstpath: the path of image_drawed
    :param extractclassname: the category you selected
    """
    if os.path.exists(dstpath):
        shutil.rmtree(dstpath)  # delete output folder
    os.makedirs(dstpath)  # make new output folder
    # 设置画框的颜色    colors = [[178, 63, 143], [25, 184, 176], [238, 152, 129],....,[235, 137, 120]]随机设置RGB颜色
    colors = [[random.randint(0, 255) for _ in range(3)] for _ in range(len(extractclassname))]
    filelist = util.GetFileFromThisRootDir(txtpath)  # fileist=['/.../P0005.txt', ..., /.../P000?.txt]
    for fullname in filelist:  # fullname='/.../P000?.txt'
        objects = util.parse_longsideformat(fullname)
        '''
        objects[i] = [classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, theta]
        '''
        name = os.path.splitext(os.path.basename(fullname))[0]  # name='P000?'
        img_fullname = os.path.join(imgpath, name + '.png')  # img_fullname='/.../P000?.png'
        img_savename = os.path.join(dstpath, name + '_.png')  # img_fullname='/.../_P000?.png'
        img = Image.open(img_fullname)  # 图像被打开但未被读取
        img_w, img_h = img.size
        img = cv2.imread(img_fullname)  # 读取图像像素
        objects = np.array(objects)

        if augment:
            # flip up augment
            if len(objects):
                img = cv2.flip(img, 0)  # 垂直翻转
                print(img.shape)
                objects[:, 2] = 1 - objects[:, 2]  # y变x不变
                objects[:, -1] = 180 - objects[:, -1]  # θ根据上下偏转也进行改变
                objects[objects[:, -1] == 180, -1] = 0  # 原θ=0时,情况特殊

            # flip lr augment
            if len(objects):
                img = cv2.flip(img, 1)  # 水平翻转
                objects[:, 1] = 1 - objects[:, 1]  # x变y不变
                objects[:, -1] = 180 - objects[:, -1]  # θ根据左右偏转也进行改变
                objects[objects[:, -1] == 180, -1] = 0  # 原θ=0时,情况特殊

            #  旋转augment
            degrees = 45
            rotate_angle = random.uniform(-degrees, degrees)
            img, objects = rotateAugment(rotate_angle, 1, img, objects)


        for i, obj in enumerate(objects):
            # obj = [classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, float:0-179]
            class_index = obj[0]
            # rect=[(x_c,y_c),(w,h),Θ] Θ:flaot[0-179]  -> (-180,0)
            rect = longsideformat2cvminAreaRect(obj[1], obj[2], obj[3], obj[4], (obj[5]-179.9))
            # poly = [(x1,y1),(x2,y2),(x3,y3),(x4,y4)]
            poly = np.float32(cv2.boxPoints(rect))  # 返回rect对应的四个点的值 normalized

            # 四点坐标反归一化 取整
            poly[:, 0] = poly[:, 0] * img_w
            poly[:, 1] = poly[:, 1] * img_h
            poly = np.int0(poly)

            # 画出来
            cv2.drawContours(image=img,
                             contours=[poly],
                             contourIdx=-1,
                             color=colors[int(class_index)],
                             thickness=thickness)
        cv2.imwrite(img_savename, img)



if __name__ == '__main__':
    drawLongsideFormatImg(imgpath='DOTA_demo/images',
                          txtpath='DOTA_demo/yolo_labels',
                          dstpath='DOTA_demo/draw_longside_img',
                          extractclassname=util.classnames_v1_5,
                          augment=True)

================================================
FILE: ImgSplit.py
================================================
import os
import codecs
import numpy as np
import math
from dota_utils import GetFileFromThisRootDir
import cv2
import shapely.geometry as shgeo
import dota_utils as util
import copy

def choose_best_pointorder_fit_another(poly1, poly2):
    """
        To make the two polygons best fit with each point
    """
    x1 = poly1[0]
    y1 = poly1[1]
    x2 = poly1[2]
    y2 = poly1[3]
    x3 = poly1[4]
    y3 = poly1[5]
    x4 = poly1[6]
    y4 = poly1[7]
    combinate = [np.array([x1, y1, x2, y2, x3, y3, x4, y4]), np.array([x2, y2, x3, y3, x4, y4, x1, y1]),
                 np.array([x3, y3, x4, y4, x1, y1, x2, y2]), np.array([x4, y4, x1, y1, x2, y2, x3, y3])]
    dst_coordinate = np.array(poly2)
    distances = np.array([np.sum((coord - dst_coordinate)**2) for coord in combinate])
    sorted = distances.argsort()
    return combinate[sorted[0]]

def cal_line_length(point1, point2):
    return math.sqrt( math.pow(point1[0] - point2[0], 2) + math.pow(point1[1] - point2[1], 2))


class splitbase():
    def __init__(self,
                 basepath,
                 outpath,
                 code = 'utf-8',
                 gap=100,
                 subsize=1024,
                 thresh=0.7,
                 choosebestpoint=True,
                 ext = '.png'
                 ):
        """
        :param basepath: base path for dota data
        :param outpath: output base path for dota data,
        the basepath and outputpath have the similar subdirectory, 'images' and 'labelTxt'
        :param code: encodeing format of txt file
        :param gap: overlap between two patches
        :param subsize: subsize of patch
        :param thresh: the thresh determine whether to keep the instance if the instance is cut down in the process of split
        :param choosebestpoint: used to choose the first point for the
        :param ext: ext for the image format
        """
        self.basepath = basepath
        self.outpath = outpath
        self.code = code
        self.gap = gap
        self.subsize = subsize
        self.slide = self.subsize - self.gap
        self.thresh = thresh
        self.imagepath = os.path.join(self.basepath, 'images')
        self.labelpath = os.path.join(self.basepath, 'labelTxt')
        self.outimagepath = os.path.join(self.outpath, 'images')
        self.outlabelpath = os.path.join(self.outpath, 'labelTxt')
        self.choosebestpoint = choosebestpoint
        self.ext = ext
        if not os.path.exists(self.outimagepath):
            os.makedirs(self.outimagepath)
        if not os.path.exists(self.outlabelpath):
            os.makedirs(self.outlabelpath)

    ## point: (x, y), rec: (xmin, ymin, xmax, ymax)
    # def __del__(self):
    #     self.f_sub.close()
    ## grid --> (x, y) position of grids
    def polyorig2sub(self, left, up, poly):
        polyInsub = np.zeros(len(poly))
        for i in range(int(len(poly)/2)):
            polyInsub[i * 2] = int(poly[i * 2] - left)
            polyInsub[i * 2 + 1] = int(poly[i * 2 + 1] - up)
        return polyInsub

    def calchalf_iou(self, poly1, poly2):
        """
            It is not the iou on usual, the iou is the value of intersection over poly1
        """
        inter_poly = poly1.intersection(poly2)
        inter_area = inter_poly.area
        poly1_area = poly1.area
        half_iou = inter_area / poly1_area
        return inter_poly, half_iou

    def saveimagepatches(self, img, subimgname, left, up):
        subimg = copy.deepcopy(img[up: (up + self.subsize), left: (left + self.subsize)])
        outdir = os.path.join(self.outimagepath, subimgname + self.ext)
        cv2.imwrite(outdir, subimg)

    def GetPoly4FromPoly5(self, poly):
        distances = [cal_line_length((poly[i * 2], poly[i * 2 + 1] ), (poly[(i + 1) * 2], poly[(i + 1) * 2 + 1])) for i in range(int(len(poly)/2 - 1))]
        distances.append(cal_line_length((poly[0], poly[1]), (poly[8], poly[9])))
        pos = np.array(distances).argsort()[0]
        count = 0
        outpoly = []
        while count < 5:
            #print('count:', count)
            if (count == pos):
                outpoly.append((poly[count * 2] + poly[(count * 2 + 2)%10])/2)
                outpoly.append((poly[(count * 2 + 1)%10] + poly[(count * 2 + 3)%10])/2)
                count = count + 1
            elif (count == (pos + 1)%5):
                count = count + 1
                continue

            else:
                outpoly.append(poly[count * 2])
                outpoly.append(poly[count * 2 + 1])
                count = count + 1
        return outpoly

    def savepatches(self, resizeimg, objects, subimgname, left, up, right, down):
        outdir = os.path.join(self.outlabelpath, subimgname + '.txt')
        mask_poly = []
        imgpoly = shgeo.Polygon([(left, up), (right, up), (right, down),
                                 (left, down)])
        with codecs.open(outdir, 'w', self.code) as f_out:
            for obj in objects:
                gtpoly = shgeo.Polygon([(obj['poly'][0], obj['poly'][1]),
                                         (obj['poly'][2], obj['poly'][3]),
                                         (obj['poly'][4], obj['poly'][5]),
                                         (obj['poly'][6], obj['poly'][7])])
                if (gtpoly.area <= 0):
                    continue
                inter_poly, half_iou = self.calchalf_iou(gtpoly, imgpoly)

                # print('writing...')
                if (half_iou == 1):
                    polyInsub = self.polyorig2sub(left, up, obj['poly'])
                    outline = ' '.join(list(map(str, polyInsub)))
                    outline = outline + ' ' + obj['name'] + ' ' + str(obj['difficult'])
                    f_out.write(outline + '\n')
                elif (half_iou > 0):
                #elif (half_iou > self.thresh):
                  ##  print('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<')
                    inter_poly = shgeo.polygon.orient(inter_poly, sign=1)
                    out_poly = list(inter_poly.exterior.coords)[0: -1]
                    if len(out_poly) < 4:
                        continue

                    out_poly2 = []
                    for i in range(len(out_poly)):
                        out_poly2.append(out_poly[i][0])
                        out_poly2.append(out_poly[i][1])

                    if (len(out_poly) == 5):
                        #print('==========================')
                        out_poly2 = self.GetPoly4FromPoly5(out_poly2)
                    elif (len(out_poly) > 5):
                        """
                            if the cut instance is a polygon with points more than 5, we do not handle it currently
                        """
                        continue
                    if (self.choosebestpoint):
                        out_poly2 = choose_best_pointorder_fit_another(out_poly2, obj['poly'])

                    polyInsub = self.polyorig2sub(left, up, out_poly2)

                    for index, item in enumerate(polyInsub):
                        if (item <= 1):
                            polyInsub[index] = 1
                        elif (item >= self.subsize):
                            polyInsub[index] = self.subsize
                    outline = ' '.join(list(map(str, polyInsub)))
                    if (half_iou > self.thresh):
                        outline = outline + ' ' + obj['name'] + ' ' + str(obj['difficult'])
                    else:
                        ## if the left part is too small, label as '2'
                        outline = outline + ' ' + obj['name'] + ' ' + '2'
                    f_out.write(outline + '\n')
                #else:
                 #   mask_poly.append(inter_poly)
        self.saveimagepatches(resizeimg, subimgname, left, up)

    def SplitSingle(self, name, rate, extent):
        """
            split a single image and ground truth
        :param name: image name
        :param rate: the resize scale for the image
        :param extent: the image format
        :return:
        """
        img = cv2.imread(os.path.join(self.imagepath, name + extent))
        if np.shape(img) == ():
            return
        fullname = os.path.join(self.labelpath, name + '.txt')
        objects = util.parse_dota_poly2(fullname)
        for obj in objects:
            obj['poly'] = list(map(lambda x:rate*x, obj['poly']))
            #obj['poly'] = list(map(lambda x: ([2 * y for y in x]), obj['poly']))

        if (rate != 1):
            resizeimg = cv2.resize(img, None, fx=rate, fy=rate, interpolation = cv2.INTER_CUBIC)
        else:
            resizeimg = img
        outbasename = name + '__' + str(rate) + '__'
        weight = np.shape(resizeimg)[1]
        height = np.shape(resizeimg)[0]

        left, up = 0, 0
        while (left < weight):
            if (left + self.subsize >= weight):
                left = max(weight - self.subsize, 0)
            up = 0
            while (up < height):
                if (up + self.subsize >= height):
                    up = max(height - self.subsize, 0)
                right = min(left + self.subsize, weight - 1)
                down = min(up + self.subsize, height - 1)
                subimgname = outbasename + str(left) + '___' + str(up)
                # self.f_sub.write(name + ' ' + subimgname + ' ' + str(left) + ' ' + str(up) + '\n')
                self.savepatches(resizeimg, objects, subimgname, left, up, right, down)
                if (up + self.subsize >= height):
                    break
                else:
                    up = up + self.slide
            if (left + self.subsize >= weight):
                break
            else:
                left = left + self.slide

    def splitdata(self, rate):
        """
        :param rate: resize rate before cut
        """
        imagelist = GetFileFromThisRootDir(self.imagepath)
        imagenames = [util.custombasename(x) for x in imagelist if (util.custombasename(x) != 'Thumbs')]
        for name in imagenames:
            self.SplitSingle(name, rate, self.ext)

if __name__ == '__main__':
    # example usage of ImgSplit
    split = splitbase(r'example',
                       r'examplesplit')
    split.splitdata(1)

================================================
FILE: ImgSplit_multi_process.py
================================================
# coding=gbk
"""
-------------
This is the multi-process version
"""
import os
import codecs
import numpy as np
import math
from dota_utils import GetFileFromThisRootDir
import cv2
import shapely.geometry as shgeo
import dota_utils as util
import copy
from multiprocessing import Pool
from functools import partial
import time

def choose_best_pointorder_fit_another(poly1, poly2):
    """
        To make the two polygons best fit with each point
    """
    x1 = poly1[0]
    y1 = poly1[1]
    x2 = poly1[2]
    y2 = poly1[3]
    x3 = poly1[4]
    y3 = poly1[5]
    x4 = poly1[6]
    y4 = poly1[7]
    combinate = [np.array([x1, y1, x2, y2, x3, y3, x4, y4]), np.array([x2, y2, x3, y3, x4, y4, x1, y1]),
                 np.array([x3, y3, x4, y4, x1, y1, x2, y2]), np.array([x4, y4, x1, y1, x2, y2, x3, y3])]
    dst_coordinate = np.array(poly2)
    distances = np.array([np.sum((coord - dst_coordinate)**2) for coord in combinate])
    sorted = distances.argsort()
    return combinate[sorted[0]]

def cal_line_length(point1, point2):
    return math.sqrt( math.pow(point1[0] - point2[0], 2) + math.pow(point1[1] - point2[1], 2))


def split_single_warp(name, split_base, rate, extent):
    split_base.SplitSingle(name, rate, extent)

class splitbase():
    def __init__(self,
                 basepath,
                 outpath,
                 code = 'utf-8',
                 gap=512,
                 subsize=1024,
                 thresh=0.7,
                 choosebestpoint=True,
                 ext = '.png',
                 padding=True,
                 num_process=8
                 ):
        """
        :param basepath: base path for dota data  ָļ
        :param outpath: output base path for dota data,  ָͼƬļ
        the basepath and outputpath have the similar subdirectory, 'images' and 'labelTxt'
        :param code: encodeing format of txt file
        :param gap: overlap between two patches  ͼƬ֮ص
        :param subsize: subsize of patch
        :param thresh: the thresh determine whether to keep the instance if the instance is cut down in the process of split
        :param choosebestpoint: used to choose the first point for the
        :param ext: ext for the image format
        :param padding: if to padding the images so that all the images have the same size
        """
        self.basepath = basepath
        self.outpath = outpath
        self.code = code
        self.gap = gap
        self.subsize = subsize
        self.slide = self.subsize - self.gap
        self.thresh = thresh
        self.imagepath = os.path.join(self.basepath, 'images')
        self.labelpath = os.path.join(self.basepath, 'labelTxt')
        self.outimagepath = os.path.join(self.outpath, 'images')
        self.outlabelpath = os.path.join(self.outpath, 'labelTxt')
        self.choosebestpoint = choosebestpoint
        self.ext = ext
        self.padding = padding
        self.num_process = num_process
        self.pool = Pool(num_process)
        print('padding:', padding)

        # pdb.set_trace()
        if not os.path.isdir(self.outpath):
            os.mkdir(self.outpath)
        if not os.path.isdir(self.outimagepath):
            # pdb.set_trace()
            os.mkdir(self.outimagepath)
        if not os.path.isdir(self.outlabelpath):
            os.mkdir(self.outlabelpath)
        # pdb.set_trace()
    ## point: (x, y), rec: (xmin, ymin, xmax, ymax)
    # def __del__(self):
    #     self.f_sub.close()
    ## grid --> (x, y) position of grids
    def polyorig2sub(self, left, up, poly):
        polyInsub = np.zeros(len(poly))
        for i in range(int(len(poly)/2)):
            polyInsub[i * 2] = int(poly[i * 2] - left)
            polyInsub[i * 2 + 1] = int(poly[i * 2 + 1] - up)
        return polyInsub

    def calchalf_iou(self, poly1, poly2):
        """
            It is not the iou on usual, the iou is the value of intersection over poly1
        """
        inter_poly = poly1.intersection(poly2)
        inter_area = inter_poly.area
        poly1_area = poly1.area
        half_iou = inter_area / poly1_area
        return inter_poly, half_iou

    def saveimagepatches(self, img, subimgname, left, up):
        subimg = copy.deepcopy(img[up: (up + self.subsize), left: (left + self.subsize)])
        outdir = os.path.join(self.outimagepath, subimgname + self.ext)
        h, w, c = np.shape(subimg)
        if (self.padding):
            outimg = np.zeros((self.subsize, self.subsize, 3))
            outimg[0:h, 0:w, :] = subimg
            cv2.imwrite(outdir, outimg)
        else:
            cv2.imwrite(outdir, subimg)

    def GetPoly4FromPoly5(self, poly):
        distances = [cal_line_length((poly[i * 2], poly[i * 2 + 1] ), (poly[(i + 1) * 2], poly[(i + 1) * 2 + 1])) for i in range(int(len(poly)/2 - 1))]
        distances.append(cal_line_length((poly[0], poly[1]), (poly[8], poly[9])))
        pos = np.array(distances).argsort()[0]
        count = 0
        outpoly = []
        while count < 5:
            #print('count:', count)
            if (count == pos):
                outpoly.append((poly[count * 2] + poly[(count * 2 + 2)%10])/2)
                outpoly.append((poly[(count * 2 + 1)%10] + poly[(count * 2 + 3)%10])/2)
                count = count + 1
            elif (count == (pos + 1)%5):
                count = count + 1
                continue

            else:
                outpoly.append(poly[count * 2])
                outpoly.append(poly[count * 2 + 1])
                count = count + 1
        return outpoly

    def savepatches(self, resizeimg, objects, subimgname, left, up, right, down):
        outdir = os.path.join(self.outlabelpath, subimgname + '.txt')
        mask_poly = []
        imgpoly = shgeo.Polygon([(left, up), (right, up), (right, down),
                                 (left, down)])
        with codecs.open(outdir, 'w', self.code) as f_out:
            for obj in objects:
                gtpoly = shgeo.Polygon([(obj['poly'][0], obj['poly'][1]),
                                         (obj['poly'][2], obj['poly'][3]),
                                         (obj['poly'][4], obj['poly'][5]),
                                         (obj['poly'][6], obj['poly'][7])])
                if (gtpoly.area <= 0):
                    continue
                inter_poly, half_iou = self.calchalf_iou(gtpoly, imgpoly)

                # print('writing...')
                if (half_iou == 1):
                    polyInsub = self.polyorig2sub(left, up, obj['poly'])
                    outline = ' '.join(list(map(str, polyInsub)))
                    outline = outline + ' ' + obj['name'] + ' ' + str(obj['difficult'])
                    f_out.write(outline + '\n')
                elif (half_iou > 0):
                #elif (half_iou > self.thresh):
                  ##  print('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<')
                    inter_poly = shgeo.polygon.orient(inter_poly, sign=1)
                    out_poly = list(inter_poly.exterior.coords)[0: -1]
                    if len(out_poly) < 4:
                        continue

                    out_poly2 = []
                    for i in range(len(out_poly)):
                        out_poly2.append(out_poly[i][0])
                        out_poly2.append(out_poly[i][1])

                    if (len(out_poly) == 5):
                        #print('==========================')
                        out_poly2 = self.GetPoly4FromPoly5(out_poly2)
                    elif (len(out_poly) > 5):
                        """
                            if the cut instance is a polygon with points more than 5, we do not handle it currently
                        """
                        continue
                    if (self.choosebestpoint):
                        out_poly2 = choose_best_pointorder_fit_another(out_poly2, obj['poly'])

                    polyInsub = self.polyorig2sub(left, up, out_poly2)

                    for index, item in enumerate(polyInsub):
                        if (item <= 1):
                            polyInsub[index] = 1
                        elif (item >= self.subsize):
                            polyInsub[index] = self.subsize
                    outline = ' '.join(list(map(str, polyInsub)))
                    if (half_iou > self.thresh):
                        outline = outline + ' ' + obj['name'] + ' ' + str(obj['difficult'])
                    else:
                        ## if the left part is too small, label as '2'
                        outline = outline + ' ' + obj['name'] + ' ' + '2'
                    f_out.write(outline + '\n')
                #else:
                 #   mask_poly.append(inter_poly)
        self.saveimagepatches(resizeimg, subimgname, left, up)

    def SplitSingle(self, name, rate, extent):
        """
            split a single image and ground truth
        :param name: image name
        :param rate: the resize scale for the image
        :param extent: the image format
        :return:
        """
        img = cv2.imread(os.path.join(self.imagepath, name + extent))
        if np.shape(img) == ():
            return
        fullname = os.path.join(self.labelpath, name + '.txt')
        objects = util.parse_dota_poly2(fullname)
        for obj in objects:
            obj['poly'] = list(map(lambda x:rate*x, obj['poly']))
            #obj['poly'] = list(map(lambda x: ([2 * y for y in x]), obj['poly']))

        if (rate != 1):
            resizeimg = cv2.resize(img, None, fx=rate, fy=rate, interpolation = cv2.INTER_CUBIC)
        else:
            resizeimg = img
        outbasename = name + '__' + str(rate) + '__'
        weight = np.shape(resizeimg)[1]
        height = np.shape(resizeimg)[0]

        left, up = 0, 0
        while (left < weight):
            if (left + self.subsize >= weight):
                left = max(weight - self.subsize, 0)
            up = 0
            while (up < height):
                if (up + self.subsize >= height):
                    up = max(height - self.subsize, 0)
                right = min(left + self.subsize, weight - 1)
                down = min(up + self.subsize, height - 1)
                subimgname = outbasename + str(left) + '___' + str(up)
                # self.f_sub.write(name + ' ' + subimgname + ' ' + str(left) + ' ' + str(up) + '\n')
                self.savepatches(resizeimg, objects, subimgname, left, up, right, down)
                if (up + self.subsize >= height):
                    break
                else:
                    up = up + self.slide
            if (left + self.subsize >= weight):
                break
            else:
                left = left + self.slide

    def splitdata(self, rate):
        """
        :param rate: resize rate before cut
        """
        imagelist = GetFileFromThisRootDir(self.imagepath)
        imagenames = [util.custombasename(x) for x in imagelist if (util.custombasename(x) != 'Thumbs')]
        if self.num_process == 1:
            for name in imagenames:
                self.SplitSingle(name, rate, self.ext)
        else:

            # worker = partial(self.SplitSingle, rate=rate, extent=self.ext)
            worker = partial(split_single_warp, split_base=self, rate=rate, extent=self.ext)
            self.pool.map(worker, imagenames)

    def __getstate__(self):
        self_dict = self.__dict__.copy()
        del self_dict['pool']
        return self_dict

    def __setstate__(self, state):
        self.__dict__.update(state)
if __name__ == '__main__':
    # example usage of ImgSplit
    # start = time.clock()
    # split = splitbase(r'/data/dj/dota/val',
    #                    r'/data/dj/dota/val_1024_debugmulti-process_refactor') # time cost 19s
    # # split.splitdata(1)
    # # split.splitdata(2)
    # split.splitdata(0.4)
    #
    # elapsed = (time.clock() - start)
    # print("Time used:", elapse
    #
    #
    # d)

    split = splitbase(r'example',
                      r'example_split',
                      gap=200,        # ص
                      subsize=1024,   # ָɵСͼƬsize
                      num_process=8
                      )
    split.splitdata(1)  # resize rate before cut



================================================
FILE: README.md
================================================

## Brief Introduction
Based on [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit).  
Add some modules to trans DOTA annotation format to YOLO annotation format.  
Add some files for every demo.


## Fuction
* `DOTA.py`  Load image, and show the bounding oriented box.

* `ImgSplit.py` Split image and the label.

* `ResultMerge.py` Merge the detection result annotation txt.

* `dota_×_evaluation_task×.py` Evaluate the detection result annotation txt.

* `YOLO_Transformer.py`     Trans DOTA format to YOLO(OBB or HBB) format.

* `Draw_DOTA_YOLO.py` Picture the YOLO_OBB labels(after augmented).

## Installation
Same as [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit).  Then:

```
$  pip install -r requirements.txt
```

## More detailed explanation
想要了解这几个函数实现的细节和原理可以看我的知乎文章;    
[DOTA遥感数据集以及相关工具DOTA_devkit的整理(踩坑记录)](https://zhuanlan.zhihu.com/p/355862906);    
[DOTA数据格式转YOLO数据格式工具(cv2.minAreaRect踩坑记录)](https://zhuanlan.zhihu.com/p/356416158);


## Usage Example
* `DOTA.py`     
```javascript
$  python DOTA.py
```
![DOTA_HBB_label](./P0003_HBB.png)
![DOTA_OBB_label](./P0003_OBB.png)
* `ImgSplit.py` 
```javascript
$  python ImgSplit_multi_process.py
```
![Img_before_split](./P0130.png)
![Img_after_split](./P0130__1__0___0.png)
* `ResultMerge.py` 
```javascript
$  python ResultMerge.py
```
![visualize_detection_result1](./P0004__1__0___0.png)
![visualize_detection_result2](./P0004__1__0___440.png)
![visualize_merged_result](./P0004_.png)




* `dota_v1.5_evaluation_task1.py` 

change the path with yours.
```javascript
detpath = r'/.../evaluation_example/result_classname/Task1_{:s}.txt'
annopath = r'/.../evaluation_example/row_DOTA_labels/{:s}.txt'
imagesetfile = r'/.../evaluation_example/imgnamefile.txt'
```
```javascript
$  python dota_v1.5_evaluation_task1.py
```

* `YOLO_Transform.py` 
```javascript
$  python YOLO_Transform.py
```
```javascript
DOTA format:    poly classname diffcult
    To
YOLO HBB format: classid x_c y_c width height   ——   def dota2Darknet()
longside format: classid x_c y_c longside shortside Θ  Θ∈[0, 180)  ——  def dota2LongSideFormat()
```


* `Draw_DOTA_YOLO.py`

1.Run YOLO_Transformer.py to get the YOLO_OBB_labels first.

2.then augment YOLO_OBB_labels and visualize it:
```javascript
$  Draw_DOTA_YOLO.py
```
![visualize_augmented_labels](./P0003_augment_.png)


## 有问题反馈
在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

* 知乎(@[略略略](https://www.zhihu.com/people/lue-lue-lue-3-92-86))
* 代码问题提issues,其他问题请知乎上联系


## 感激
感谢以下的项目,排名不分先后

* [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit)

## 关于作者

```javascript
  Name  : "胡凯旋"
  describe myself:"咸鱼一枚"
  
```


================================================
FILE: ResultMerge.py
================================================
# -*- coding: utf-8 -*-
"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import os
import numpy as np
import dota_utils as util
import re
import time
import polyiou

## the IoU thresh for nms when merge image
nms_thresh = 0.3

def py_cpu_nms_poly(dets, thresh):
    """
    任意四点poly nms.取出nms后的边框的索引
    @param dets: shape(detection_num, [poly, confidence1]) 原始图像中的检测出的目标数量
    @param thresh:
    @return:
            keep: 经nms后的目标边框的索引
    """
    scores = dets[:, 8]
    polys = []
    areas = []
    for i in range(len(dets)):
        tm_polygon = polyiou.VectorDouble([dets[i][0], dets[i][1],
                                            dets[i][2], dets[i][3],
                                            dets[i][4], dets[i][5],
                                            dets[i][6], dets[i][7]])
        polys.append(tm_polygon)

    # argsort将元素小到大排列 返回索引值 [::-1]即从后向前取元素
    order = scores.argsort()[::-1]  # 取出元素的索引值 顺序为从大到小
    keep = []
    while order.size > 0:
        ovr = []
        i = order[0]  # 取出当前剩余置信度最大的目标边框的索引
        keep.append(i)
        for j in range(order.size - 1):  # 求出置信度最大poly与其他所有poly的IoU
            iou = polyiou.iou_poly(polys[i], polys[order[j + 1]])
            ovr.append(iou)
        ovr = np.array(ovr)
        inds = np.where(ovr <= thresh)[0]  # 找出iou小于阈值的索引
        order = order[inds + 1]
    return keep

def py_cpu_nms(dets, thresh):
    """Pure Python NMS baseline."""
    #print('dets:', dets)
    x1 = dets[:, 0]
    y1 = dets[:, 1]
    x2 = dets[:, 2]
    y2 = dets[:, 3]
    scores = dets[:, 4]

    areas = (x2 - x1 + 1) * (y2 - y1 + 1)
    ## index for dets
    order = scores.argsort()[::-1]

    keep = []
    while order.size > 0:
        i = order[0]
        keep.append(i)
        xx1 = np.maximum(x1[i], x1[order[1:]])
        yy1 = np.maximum(y1[i], y1[order[1:]])
        xx2 = np.minimum(x2[i], x2[order[1:]])
        yy2 = np.minimum(y2[i], y2[order[1:]])

        w = np.maximum(0.0, xx2 - xx1 + 1)
        h = np.maximum(0.0, yy2 - yy1 + 1)
        inter = w * h
        ovr = inter / (areas[i] + areas[order[1:]] - inter)

        inds = np.where(ovr <= thresh)[0]
        order = order[inds + 1]

    return keep

def nmsbynamedict(nameboxdict, nms, thresh):
    """
    对namedict中的目标信息进行nms.不改变输入的数据形式
    @param nameboxdict: eg:{
                           'P706':[[poly1, confidence1], ..., [poly9, confidence9]],
                           ...
                           'P700':[[poly1, confidence1], ..., [poly9, confidence9]]
                            }
    @param nms:
    @param thresh: nms阈值, IoU阈值
    @return:
            nameboxnmsdict: eg:{
                                'P706':[[poly1, confidence1], ..., [poly_nms, confidence9]],
                                 ...
                                'P700':[[poly1, confidence1], ..., [poly_nms, confidence9]]
                               }
    """
    # 初始化字典
    nameboxnmsdict = {x: [] for x in nameboxdict}  # eg: nameboxnmsdict={'P0770': [], 'P1888': []}
    for imgname in nameboxdict:  # 提取nameboxdict中的key eg:P0770   P1888
        keep = nms(np.array(nameboxdict[imgname]), thresh)  # rotated_nms索引值列表
        outdets = []
        #print('nameboxdict[imgname]: ', nameboxnmsdict[imgname])
        for index in keep:
            # print('index:', index)
            outdets.append(nameboxdict[imgname][index])
        nameboxnmsdict[imgname] = outdets
    return nameboxnmsdict

def poly2origpoly(poly, x, y, rate):
    origpoly = []
    for i in range(int(len(poly)/2)):
        tmp_x = float(poly[i * 2] + x) / float(rate)
        tmp_y = float(poly[i * 2 + 1] + y) / float(rate)
        origpoly.append(tmp_x)
        origpoly.append(tmp_y)
    return origpoly

def mergebase(srcpath, dstpath, nms):
    """
    将源路径中所有的txt目标信息,经nms后存入目标路径中的同名txt
    @param srcpath: 合并前信息保存的txt源路径
    @param dstpath: 合并后信息保存的txt目标路径
    @param nms: NMS函数
    """
    filelist = util.GetFileFromThisRootDir(srcpath)  # srcpath文件夹下的所有文件相对路径 eg:['example_split/../P0001.txt', ..., '?.txt']
    for fullname in filelist:  # 'example_split/../P0001.txt'
        name = util.custombasename(fullname)  # 只留下文件名 eg:P0001
        dstname = os.path.join(dstpath, name + '.txt')  # eg: example_merge/..P0001.txt
        if not os.path.exists(dstpath):
            os.makedirs(dstpath)
        with open(fullname, 'r') as f_in:
            nameboxdict = {}
            lines = f_in.readlines()  # 读取txt中所有行,每行作为一个元素存于list中
            splitlines = [x.strip().split(' ') for x in lines]  # 再次分割list中的每行元素 shape:n行 * m个元素
            for splitline in splitlines:  # splitline:每行中的m个元素
                # splitline = [待merge图片名(该目标所处图片名称), confidence, x1, y1, x2, y2, x3, y3, x4, y4]
                subname = splitline[0]  # 每行的第一个元素 是被分割的图片的图片名 eg:P0706__1__0___0
                splitname = subname.split('__')  # 分割待merge的图像的名称 eg:['P0706','1','0','_0']
                oriname = splitname[0]  # 获得待merge图像的原图像名称 eg:P706
                pattern1 = re.compile(r'__\d+___\d+')  # 预先编译好r'__\d+___\d+' 提高重复使用效率 \d表示数字

                x_y = re.findall(pattern1, subname)  # 匹配subname中的字符串 eg: x_y=['__0___0']
                x_y_2 = re.findall(r'\d+', x_y[0])  # 匹配subname中的字符串 eg: x_y_2= ['0','0']
                x, y = int(x_y_2[0]), int(x_y_2[1])  # 找到当前subname图片在原图中的分割位置

                pattern2 = re.compile(r'__([\d+\.]+)__\d+___')  # \.表示一切字符

                rate = re.findall(pattern2, subname)[0]  # 找到该subname分割图片时的分割rate (resize rate before cut)

                confidence = splitline[1]
                poly = list(map(float, splitline[2:]))  # 每个元素映射为浮点数 再放入列表中
                origpoly = poly2origpoly(poly, x, y, rate)  # 将目标位置信息resize 恢复成原图的poly坐标
                det = origpoly  # shape(8)
                det.append(confidence)  # [poly, confidence]
                det = list(map(float, det))
                if (oriname not in nameboxdict):
                    nameboxdict[oriname] = []   # 弄个元组,汇集原图目标信息 eg: 'P706':[[poly1, confidence1], ..., ]
                nameboxdict[oriname].append(det)
            nameboxnmsdict = nmsbynamedict(nameboxdict, nms, nms_thresh)  # 对nameboxdict元组进行nms
            with open(dstname, 'w') as f_out:
                for imgname in nameboxnmsdict:
                    for det in nameboxnmsdict[imgname]:  # 取出对应图片的nms后的目标信息
                        #print('det:', det)
                        confidence = det[-1]
                        bbox = det[0:-1]
                        outline = imgname + ' ' + str(confidence) + ' ' + ' '.join(map(str, bbox))
                        #print('outline:', outline)
                        f_out.write(outline + '\n')

def mergebyrec(srcpath, dstpath):
    """
    srcpath: result files before merge and nms
    dstpath: result files after merge and nms
    """
    # srcpath = r'E:\bod-dataset\results\bod-v3_rfcn_2000000'
    # dstpath = r'E:\bod-dataset\results\bod-v3_rfcn_2000000_nms'

    mergebase(srcpath,
              dstpath,
              py_cpu_nms)
def mergebypoly(srcpath, dstpath):
    """
    srcpath: result files before merge and nms.txt的信息格式为:[P0770__1__0___0 confidence poly]
    dstpath: result files after merge and nms.保存的txt信息格式为:[P0770 confidence poly]
    """
    # srcpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/comp4_test_results'
    # dstpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/testtime'

    mergebase(srcpath,
              dstpath,
              py_cpu_nms_poly)
if __name__ == '__main__':
    # see demo for example
    mergebypoly(r'ResultMerge_example', r'ResultMerge_example_result')
    # mergebyrec()

================================================
FILE: ResultMerge_example/1.txt
================================================
P0770__1__0___0 0.9 856.0 696.0 1024.0 781.0 1024.0 1024.0 752.0 1006.0
P0770__1__0___0 0.9 349.0 491.0 388.0 508.0 353.0 591.0 313.0 573.0
P0770__1__0___0 0.9 346.0 362.0 362.0 369.0 345.0 405.0 328.0 398.0
P0770__1__0___0 0.9 248.0 577.0 330.0 613.0 314.0 652.0 231.0 614.0
P0770__1__0___0 0.9 543.0 66.0 560.0 76.0 540.0 115.0 521.0 104.0
P0770__1__0___0 0.9 283.0 491.0 306.0 490.0 305.0 534.0 282.0 533.0
P0770__1__0___0 0.9 244.0 643.0 292.0 664.0 278.0 694.0 231.0 672.0
P0770__1__0___0 0.9 210.0 686.0 254.0 704.0 247.0 720.0 204.0 702.0
P0770__1__0___0 0.9 223.0 1010.0 240.0 1018.0 237.0 1024.0 217.0 1024.0
P0770__1__0___0 0.9 1013.0 345.0 1024.0 391.0 999.0 440.0 962.0 420.0
P0770__1__0___0 0.9 941.0 310.0 978.0 329.0 939.0 409.0 900.0 390.0
P0770__1__0___0 0.9 879.0 279.0 918.0 299.0 878.0 379.0 839.0 359.0
P0770__1__0___0 0.9 819.0 249.0 857.0 269.0 816.0 349.0 779.0 329.0
P0770__1__0___0 0.9 757.0 219.0 795.0 238.0 756.0 319.0 718.0 299.0
P0770__1__0___0 0.9 697.0 189.0 735.0 208.0 695.0 290.0 657.0 269.0
P0770__1__0___0 0.9 638.0 351.0 781.0 422.0 716.0 567.0 565.0 498.0
P0770__1__0___0 0.9 394.0 825.0 466.0 690.0 600.0 762.0 528.0 905.0
P0770__1__0___0 0.9 653.0 795.0 747.0 845.0 698.0 936.0 602.0 890.0
P0770__1__0___0 0.9 496.0 148.0 535.0 166.0 498.0 247.0 459.0 230.0
P0770__1__586___334 0.8 856.0 362.0 1024.0 447.0 1024.0 806.0 716.0 654.0
P0770__1__586___334 0.8 349.0 157.0 388.0 174.0 353.0 257.0 313.0 239.0
P0770__1__586___334 0.8 346.0 28.0 362.0 35.0 345.0 71.0 328.0 64.0
P0770__1__586___334 0.8 248.0 243.0 330.0 279.0 314.0 318.0 231.0 280.0
P0770__1__586___334 0.8 283.0 157.0 306.0 156.0 305.0 200.0 282.0 199.0
P0770__1__586___334 0.8 244.0 309.0 292.0 330.0 278.0 360.0 231.0 338.0
P0770__1__586___334 0.8 210.0 352.0 254.0 370.0 247.0 386.0 204.0 368.0
P0770__1__586___334 0.8 223.0 676.0 240.0 684.0 226.0 716.0 209.0 709.0
P0770__1__586___334 0.8 14.0 757.0 56.0 774.0 45.0 797.0 5.0 778.0
P0770__1__586___334 0.8 125.0 906.0 142.0 913.0 130.0 948.0 113.0 941.0
P0770__1__586___334 0.8 1013.0 11.0 1024.0 57.0 999.0 106.0 962.0 86.0
P0770__1__586___334 0.8 928.0 1.0 975.0 1.0 939.0 75.0 900.0 56.0
P0770__1__586___334 0.8 851.0 1.0 900.0 1.0 878.0 45.0 839.0 25.0
P0770__1__586___334 0.8 638.0 17.0 781.0 88.0 716.0 233.0 565.0 164.0
P0770__1__586___334 0.8 394.0 491.0 466.0 356.0 600.0 428.0 528.0 571.0
P0770__1__586___334 0.8 653.0 461.0 747.0 511.0 698.0 602.0 602.0 556.0
P0770__1__586___0 0.7 270.0 696.0 879.0 1016.0 202.0 1024.0 130.0 988.0
P0770__1__586___0 0.7 562.0 658.0 669.0 711.0 631.0 787.0 524.0 735.0
P0770__1__586___0 0.7 416.0 339.0 454.0 360.0 413.0 440.0 376.0 420.0
P0770__1__586___0 0.7 355.0 310.0 392.0 329.0 353.0 409.0 314.0 390.0
P0770__1__586___0 0.7 293.0 279.0 332.0 299.0 292.0 379.0 253.0 359.0
P0770__1__586___0 0.7 233.0 249.0 271.0 269.0 230.0 349.0 193.0 329.0
P0770__1__586___0 0.7 171.0 219.0 209.0 238.0 170.0 319.0 132.0 299.0
P0770__1__586___0 0.7 111.0 189.0 149.0 208.0 109.0 290.0 71.0 269.0
P0770__1__586___0 0.7 52.0 351.0 195.0 422.0 130.0 567.0 1.0 481.0
P0770__1__586___0 0.7 67.0 795.0 161.0 845.0 112.0 936.0 16.0 890.0
P0770__1__586___334 0.6 270.0 362.0 883.0 674.0 755.0 964.0 130.0 654.0
P0770__1__586___334 0.6 562.0 324.0 669.0 377.0 631.0 453.0 524.0 401.0
P0770__1__586___334 0.6 416.0 5.0 454.0 26.0 413.0 106.0 376.0 86.0
P0770__1__586___334 0.6 342.0 1.0 389.0 1.0 353.0 75.0 314.0 56.0
P0770__1__586___334 0.6 265.0 1.0 314.0 1.0 292.0 45.0 253.0 25.0
P0770__1__586___334 0.6 52.0 17.0 195.0 88.0 130.0 233.0 1.0 147.0
P0770__1__586___334 0.6 67.0 461.0 161.0 511.0 112.0 602.0 16.0 556.0
P1888__1__0___0 0.5 674.0 375.0 683.0 375.0 684.0 394.0 675.0 395.0
P1888__1__0___0 0.5 683.0 351.0 694.0 351.0 695.0 371.0 684.0 371.0
P1888__1__0___0 0.5 465.0 371.0 455.0 372.0 451.0 324.0 460.0 323.0
P1888__1__0___0 0.5 451.0 374.0 441.0 375.0 436.0 327.0 445.0 326.0
P1888__1__0___0 0.5 439.0 373.0 429.0 374.0 422.0 327.0 433.0 326.0
P1888__1__0___0 0.5 426.0 376.0 415.0 378.0 408.0 330.0 418.0 328.0
P1888__1__0___0 0.5 411.0 377.0 400.0 379.0 395.0 332.0 405.0 330.0
P1888__1__0___0 0.5 398.0 377.0 388.0 379.0 382.0 331.0 392.0 330.0
P1888__1__0___0 0.5 384.0 382.0 374.0 383.0 368.0 334.0 377.0 333.0
P1888__1__0___0 0.5 370.0 382.0 360.0 383.0 355.0 336.0 364.0 335.0
P1888__1__0___0 0.5 354.0 384.0 345.0 383.0 341.0 337.0 352.0 336.0
P1888__1__0___0 0.5 328.0 387.0 318.0 388.0 312.0 342.0 323.0 340.0
P1888__1__0___0 0.5 316.0 389.0 307.0 392.0 300.0 344.0 308.0 342.0
P1888__1__0___0 0.5 302.0 390.0 292.0 392.0 286.0 343.0 296.0 342.0
P1888__1__0___0 0.5 288.0 394.0 278.0 394.0 273.0 346.0 281.0 345.0
P1888__1__0___0 0.5 531.0 213.0 520.0 215.0 518.0 180.0 528.0 179.0
P1888__1__0___0 0.5 517.0 213.0 507.0 215.0 502.0 174.0 512.0 172.0
P1888__1__0___0 0.5 504.0 216.0 494.0 217.0 490.0 176.0 498.0 174.0
P1888__1__0___0 0.5 490.0 216.0 481.0 217.0 474.0 176.0 484.0 174.0
P1888__1__0___0 0.5 480.0 245.0 470.0 246.0 466.0 205.0 475.0 203.0
P1888__1__0___0 0.5 467.0 248.0 457.0 249.0 453.0 207.0 462.0 205.0
P1888__1__0___0 0.5 454.0 248.0 445.0 249.0 441.0 208.0 450.0 207.0
P1888__1__0___0 0.5 441.0 250.0 431.0 251.0 427.0 209.0 437.0 208.0
P1888__1__0___0 0.5 419.0 253.0 409.0 254.0 402.0 212.0 410.0 210.0
P1888__1__0___0 0.5 382.0 259.0 372.0 261.0 366.0 219.0 376.0 218.0
P1888__1__0___0 0.5 368.0 260.0 359.0 261.0 353.0 218.0 362.0 217.0
P1888__1__0___0 0.5 356.0 259.0 347.0 261.0 339.0 220.0 348.0 219.0
P1888__1__0___0 0.5 343.0 262.0 334.0 265.0 327.0 222.0 335.0 221.0
P1888__1__0___0 0.5 319.0 266.0 310.0 268.0 304.0 225.0 314.0 223.0
P1888__1__0___0 0.5 307.0 268.0 297.0 269.0 292.0 227.0 301.0 226.0
P1888__1__0___0 0.5 294.0 261.0 284.0 264.0 277.0 221.0 287.0 220.0
P1888__1__0___0 0.5 480.0 369.0 469.0 371.0 463.0 321.0 473.0 320.0
P1888__1__0___0 0.5 493.0 367.0 483.0 368.0 476.0 321.0 486.0 319.0
P1888__1__0___0 0.5 507.0 365.0 498.0 368.0 489.0 320.0 499.0 318.0
P1888__1__0___0 0.5 457.0 442.0 468.0 443.0 470.0 485.0 461.0 486.0
P1888__1__0___0 0.5 681.0 369.0 672.0 369.0 671.0 351.0 680.0 351.0
P1888__1__0___0 0.5 654.0 374.0 664.0 374.0 665.0 395.0 654.0 396.0
P1888__1__0___0 0.5 697.0 281.0 706.0 280.0 707.0 300.0 698.0 300.0
P1888__1__0___0 0.5 687.0 281.0 697.0 280.0 698.0 299.0 688.0 299.0
P1888__1__0___0 0.5 677.0 282.0 687.0 282.0 688.0 302.0 678.0 303.0
P1888__1__0___0 0.5 667.0 286.0 676.0 285.0 677.0 303.0 669.0 304.0
P1888__1__0___0 0.5 657.0 287.0 666.0 286.0 667.0 306.0 657.0 307.0
P1888__1__0___0 0.5 696.0 263.0 705.0 261.0 707.0 280.0 698.0 280.0
P1888__1__0___0 0.5 686.0 260.0 695.0 259.0 695.0 278.0 687.0 278.0
P1888__1__0___0 0.5 665.0 262.0 675.0 261.0 676.0 280.0 667.0 281.0
P1888__1__0___0 0.5 656.0 262.0 665.0 263.0 666.0 284.0 656.0 284.0
P1888__1__0___0 0.5 645.0 267.0 654.0 267.0 655.0 285.0 646.0 285.0
P1888__1__0___0 0.5 469.0 442.0 479.0 441.0 485.0 484.0 474.0 485.0
P1888__1__0___0 0.5 443.0 444.0 454.0 444.0 458.0 487.0 448.0 488.0
P1888__1__0___0 0.5 520.0 362.0 511.0 364.0 503.0 316.0 513.0 315.0
P1888__1__0___0 0.5 430.0 446.0 440.0 445.0 446.0 489.0 436.0 490.0
P1888__1__0___0 0.5 419.0 450.0 430.0 450.0 436.0 495.0 425.0 497.0
P1888__1__0___0 0.5 406.0 451.0 416.0 451.0 421.0 495.0 410.0 495.0
P1888__1__0___0 0.5 394.0 454.0 403.0 453.0 409.0 496.0 400.0 497.0
P1888__1__0___0 0.5 381.0 455.0 393.0 455.0 396.0 496.0 386.0 498.0
P1888__1__0___0 0.5 368.0 452.0 379.0 452.0 383.0 496.0 373.0 497.0
P1888__1__0___0 0.5 354.0 455.0 365.0 454.0 371.0 497.0 360.0 498.0
P1888__1__0___0 0.5 343.0 455.0 354.0 455.0 358.0 498.0 347.0 498.0
P1888__1__0___0 0.5 316.0 458.0 327.0 456.0 335.0 499.0 325.0 502.0
P1888__1__0___0 0.5 304.0 463.0 315.0 461.0 320.0 505.0 310.0 506.0
P1888__1__0___0 0.5 293.0 463.0 303.0 462.0 308.0 505.0 298.0 506.0
P1888__1__0___0 0.5 281.0 466.0 291.0 464.0 296.0 508.0 286.0 508.0
P1888__1__0___0 0.5 200.0 449.0 210.0 450.0 210.0 493.0 200.0 492.0
P1888__1__0___0 0.5 197.0 200.0 207.0 200.0 208.0 242.0 198.0 243.0


================================================
FILE: ResultMerge_multi_process.py
================================================
"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import os
import numpy as np
import re
import time
import sys
sys.path.insert(0,'..')
try:
    import dota_utils as util
except:
    import dota_kit.dota_utils as util
import polyiou
import pdb
import math
from multiprocessing import Pool
from functools import partial

## the thresh for nms when merge image
nms_thresh = 0.1

def py_cpu_nms_poly(dets, thresh):
    scores = dets[:, 8]
    polys = []
    areas = []
    for i in range(len(dets)):
        tm_polygon = polyiou.VectorDouble([dets[i][0], dets[i][1],
                                            dets[i][2], dets[i][3],
                                            dets[i][4], dets[i][5],
                                            dets[i][6], dets[i][7]])
        polys.append(tm_polygon)
    order = scores.argsort()[::-1]

    keep = []
    while order.size > 0:
        ovr = []
        i = order[0]
        keep.append(i)
        for j in range(order.size - 1):
            iou = polyiou.iou_poly(polys[i], polys[order[j + 1]])
            ovr.append(iou)
        ovr = np.array(ovr)

        # print('ovr: ', ovr)
        # print('thresh: ', thresh)
        try:
            if math.isnan(ovr[0]):
                pdb.set_trace()
        except:
            pass
        inds = np.where(ovr <= thresh)[0]
        # print('inds: ', inds)

        order = order[inds + 1]

    return keep


def py_cpu_nms_poly_fast(dets, thresh):
    obbs = dets[:, 0:-1]
    x1 = np.min(obbs[:, 0::2], axis=1)
    y1 = np.min(obbs[:, 1::2], axis=1)
    x2 = np.max(obbs[:, 0::2], axis=1)
    y2 = np.max(obbs[:, 1::2], axis=1)
    scores = dets[:, 8]
    areas = (x2 - x1 + 1) * (y2 - y1 + 1)

    polys = []
    for i in range(len(dets)):
        tm_polygon = polyiou.VectorDouble([dets[i][0], dets[i][1],
                                            dets[i][2], dets[i][3],
                                            dets[i][4], dets[i][5],
                                            dets[i][6], dets[i][7]])
        polys.append(tm_polygon)
    order = scores.argsort()[::-1]

    keep = []
    while order.size > 0:
        ovr = []
        i = order[0]
        keep.append(i)
        # if order.size == 0:
        #     break
        xx1 = np.maximum(x1[i], x1[order[1:]])
        yy1 = np.maximum(y1[i], y1[order[1:]])
        xx2 = np.minimum(x2[i], x2[order[1:]])
        yy2 = np.minimum(y2[i], y2[order[1:]])
        # w = np.maximum(0.0, xx2 - xx1 + 1)
        # h = np.maximum(0.0, yy2 - yy1 + 1)
        w = np.maximum(0.0, xx2 - xx1)
        h = np.maximum(0.0, yy2 - yy1)
        hbb_inter = w * h
        hbb_ovr = hbb_inter / (areas[i] + areas[order[1:]] - hbb_inter)
        # h_keep_inds = np.where(hbb_ovr == 0)[0]
        h_inds = np.where(hbb_ovr > 0)[0]
        tmp_order = order[h_inds + 1]
        for j in range(tmp_order.size):
            iou = polyiou.iou_poly(polys[i], polys[tmp_order[j]])
            hbb_ovr[h_inds[j]] = iou
            # ovr.append(iou)
            # ovr_index.append(tmp_order[j])

        # ovr = np.array(ovr)
        # ovr_index = np.array(ovr_index)
        # print('ovr: ', ovr)
        # print('thresh: ', thresh)
        try:
            if math.isnan(ovr[0]):
                pdb.set_trace()
        except:
            pass
        inds = np.where(hbb_ovr <= thresh)[0]

        # order_obb = ovr_index[inds]
        # print('inds: ', inds)
        # order_hbb = order[h_keep_inds + 1]
        order = order[inds + 1]
        # pdb.set_trace()
        # order = np.concatenate((order_obb, order_hbb), axis=0).astype(np.int)
    return keep

def py_cpu_nms(dets, thresh):
    """Pure Python NMS baseline."""
    #print('dets:', dets)
    x1 = dets[:, 0]
    y1 = dets[:, 1]
    x2 = dets[:, 2]
    y2 = dets[:, 3]
    scores = dets[:, 4]

    areas = (x2 - x1 + 1) * (y2 - y1 + 1)
    ## index for dets
    order = scores.argsort()[::-1]


    keep = []
    while order.size > 0:
        i = order[0]
        keep.append(i)
        xx1 = np.maximum(x1[i], x1[order[1:]])
        yy1 = np.maximum(y1[i], y1[order[1:]])
        xx2 = np.minimum(x2[i], x2[order[1:]])
        yy2 = np.minimum(y2[i], y2[order[1:]])

        w = np.maximum(0.0, xx2 - xx1 + 1)
        h = np.maximum(0.0, yy2 - yy1 + 1)
        inter = w * h
        ovr = inter / (areas[i] + areas[order[1:]] - inter)

        inds = np.where(ovr <= thresh)[0]
        order = order[inds + 1]

    return keep

def nmsbynamedict(nameboxdict, nms, thresh):
    nameboxnmsdict = {x: [] for x in nameboxdict}
    for imgname in nameboxdict:
        #print('imgname:', imgname)
        #keep = py_cpu_nms(np.array(nameboxdict[imgname]), thresh)
        #print('type nameboxdict:', type(nameboxnmsdict))
        #print('type imgname:', type(imgname))
        #print('type nms:', type(nms))
        keep = nms(np.array(nameboxdict[imgname]), thresh)
        #print('keep:', keep)
        outdets = []
        #print('nameboxdict[imgname]: ', nameboxnmsdict[imgname])
        for index in keep:
            # print('index:', index)
            outdets.append(nameboxdict[imgname][index])
        nameboxnmsdict[imgname] = outdets
    return nameboxnmsdict
def poly2origpoly(poly, x, y, rate):
    origpoly = []
    for i in range(int(len(poly)/2)):
        tmp_x = float(poly[i * 2] + x) / float(rate)
        tmp_y = float(poly[i * 2 + 1] + y) / float(rate)
        origpoly.append(tmp_x)
        origpoly.append(tmp_y)
    return origpoly

def mergesingle(dstpath, nms, fullname):
    name = util.custombasename(fullname)
    #print('name:', name)
    dstname = os.path.join(dstpath, name + '.txt')
    with open(fullname, 'r') as f_in:
        nameboxdict = {}
        lines = f_in.readlines()
        splitlines = [x.strip().split(' ') for x in lines]
        for splitline in splitlines:
            subname = splitline[0]
            splitname = subname.split('__')
            oriname = splitname[0]
            pattern1 = re.compile(r'__\d+___\d+')
            #print('subname:', subname)
            x_y = re.findall(pattern1, subname)
            x_y_2 = re.findall(r'\d+', x_y[0])
            x, y = int(x_y_2[0]), int(x_y_2[1])

            pattern2 = re.compile(r'__([\d+\.]+)__\d+___')

            rate = re.findall(pattern2, subname)[0]

            confidence = splitline[1]
            poly = list(map(float, splitline[2:]))
            origpoly = poly2origpoly(poly, x, y, rate)
            det = origpoly
            det.append(confidence)
            det = list(map(float, det))
            if (oriname not in nameboxdict):
                nameboxdict[oriname] = []
            nameboxdict[oriname].append(det)
        nameboxnmsdict = nmsbynamedict(nameboxdict, nms, nms_thresh)
        with open(dstname, 'w') as f_out:
            for imgname in nameboxnmsdict:
                for det in nameboxnmsdict[imgname]:
                    #print('det:', det)
                    confidence = det[-1]
                    bbox = det[0:-1]
                    outline = imgname + ' ' + str(confidence) + ' ' + ' '.join(map(str, bbox))
                    #print('outline:', outline)
                    f_out.write(outline + '\n')

def mergebase_parallel(srcpath, dstpath, nms):
    """
        Դ·еtxtĿϢ,nmsĿ·еͬtxt
        @param srcpath: ϲǰϢtxtԴ·
        @param dstpath: ϲϢtxtĿ·
        @param nms: NMS
    """
    pool = Pool(16)
    filelist = util.GetFileFromThisRootDir(srcpath)

    mergesingle_fn = partial(mergesingle, dstpath, nms)
    # pdb.set_trace()
    pool.map(mergesingle_fn, filelist)

def mergebase(srcpath, dstpath, nms):
    filelist = util.GetFileFromThisRootDir(srcpath)
    for filename in filelist:
        mergesingle(dstpath, nms, filename)

def mergebyrec(srcpath, dstpath):
    """
    srcpath: result files before merge and nms
    dstpath: result files after merge and nms
    """
    # srcpath = r'E:\bod-dataset\results\bod-v3_rfcn_2000000'
    # dstpath = r'E:\bod-dataset\results\bod-v3_rfcn_2000000_nms'

    mergebase(srcpath,
              dstpath,
              py_cpu_nms)
def mergebypoly(srcpath, dstpath):
    """
        srcpath: result files before merge and nms.txtϢʽΪ:[P0770__1__0___0 confidence poly]
        dstpath: result files after merge and nms.txtϢʽΪ:[P0770 confidence poly]
    """
    # srcpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/comp4_test_results'
    # dstpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/testtime'

    # mergebase(srcpath,
    #           dstpath,
    #           py_cpu_nms_poly)
    mergebase_parallel(srcpath,
              dstpath,
              py_cpu_nms_poly_fast)
if __name__ == '__main__':
    mergebypoly(r'ResultMerge_example', r'ResultMerge_example_result')
    # mergebyrec()

================================================
FILE: SplitOnlyImage.py
================================================
import os
import numpy as np
import cv2
import copy
import dota_utils as util

class splitbase():
    def __init__(self,
                 srcpath,
                 dstpath,
                 gap=100,
                 subsize=1024,
                 ext='.png'):
        self.srcpath = srcpath
        self.outpath = dstpath
        self.gap = gap
        self.subsize = subsize
        self.slide = self.subsize - self.gap
        self.srcpath = srcpath
        self.dstpath = dstpath
        self.ext = ext
    def saveimagepatches(self, img, subimgname, left, up, ext='.png'):
        subimg = copy.deepcopy(img[up: (up + self.subsize), left: (left + self.subsize)])
        outdir = os.path.join(self.dstpath, subimgname + ext)
        cv2.imwrite(outdir, subimg)

    def SplitSingle(self, name, rate, extent):
        img = cv2.imread(os.path.join(self.srcpath, name + extent))
        assert np.shape(img) != ()

        if (rate != 1):
            resizeimg = cv2.resize(img, None, fx=rate, fy=rate, interpolation = cv2.INTER_CUBIC)
        else:
            resizeimg = img
        outbasename = name + '__' + str(rate) + '__'

        weight = np.shape(resizeimg)[1]
        height = np.shape(resizeimg)[0]
        
        left, up = 0, 0
        while (left < weight):
            if (left + self.subsize >= weight):
                left = max(weight - self.subsize, 0)
            up = 0
            while (up < height):
                if (up + self.subsize >= height):
                    up = max(height - self.subsize, 0)
                subimgname = outbasename + str(left) + '___' + str(up)
                self.saveimagepatches(resizeimg, subimgname, left, up)
                if (up + self.subsize >= height):
                    break
                else:
                    up = up + self.slide
            if (left + self.subsize >= weight):
                break
            else:
                left = left + self.slide

    def splitdata(self, rate):
        
        imagelist = util.GetFileFromThisRootDir(self.srcpath)
        imagenames = [util.custombasename(x) for x in imagelist if (util.custombasename(x) != 'Thumbs')]
        for name in imagenames:
            self.SplitSingle(name, rate, self.ext)
if __name__ == '__main__':
    split = splitbase(r'example/images',
                      r'example/imagesSplit')
    split.splitdata(1)

================================================
FILE: SplitOnlyImage_multi_process.py
================================================
import os
import numpy as np
import cv2
import copy
import dota_utils as util
from multiprocessing import Pool
from functools import partial


def split_single_warp(name, split_base, rate, extent):
    split_base.SplitSingle(name, rate, extent)
class splitbase():
    def __init__(self,
                 srcpath,
                 dstpath,
                 gap=100,
                 subsize=1024,
                 ext='.png',
                 padding=True,
                 num_process=32):
        self.srcpath = srcpath
        self.outpath = dstpath
        self.gap = gap
        self.subsize = subsize
        self.slide = self.subsize - self.gap
        self.srcpath = srcpath
        self.dstpath = dstpath
        self.ext = ext
        self.padding = padding
        self.pool = Pool(num_process)

        if not os.path.isdir(self.outpath):
            os.mkdir(self.outpath)

    def saveimagepatches(self, img, subimgname, left, up, ext='.png'):
        subimg = copy.deepcopy(img[up: (up + self.subsize), left: (left + self.subsize)])
        outdir = os.path.join(self.dstpath, subimgname + ext)
        h, w, c = np.shape(subimg)
        if (self.padding):
            outimg = np.zeros((self.subsize, self.subsize, 3))
            outimg[0:h, 0:w, :] = subimg
            cv2.imwrite(outdir, outimg)
        else:
            cv2.imwrite(outdir, subimg)

    def SplitSingle(self, name, rate, extent):
        img = cv2.imread(os.path.join(self.srcpath, name + extent))
        assert np.shape(img) != ()

        if (rate != 1):
            resizeimg = cv2.resize(img, None, fx=rate, fy=rate, interpolation=cv2.INTER_CUBIC)
        else:
            resizeimg = img
        outbasename = name + '__' + str(rate) + '__'

        weight = np.shape(resizeimg)[1]
        height = np.shape(resizeimg)[0]

        # if (max(weight, height) < self.subsize/2):
        #     return

        left, up = 0, 0
        while (left < weight):
            if (left + self.subsize >= weight):
                left = max(weight - self.subsize, 0)
            up = 0
            while (up < height):
                if (up + self.subsize >= height):
                    up = max(height - self.subsize, 0)
                subimgname = outbasename + str(left) + '___' + str(up)
                self.saveimagepatches(resizeimg, subimgname, left, up)
                if (up + self.subsize >= height):
                    break
                else:
                    up = up + self.slide
            if (left + self.subsize >= weight):
                break
            else:
                left = left + self.slide

    def splitdata(self, rate):

        imagelist = util.GetFileFromThisRootDir(self.srcpath)
        imagenames = [util.custombasename(x) for x in imagelist if (util.custombasename(x) != 'Thumbs')]

        # worker = partial(self.SplitSingle, rate=rate, extent=self.ext)
        worker = partial(split_single_warp, split_base=self, rate=rate, extent=self.ext)
        self.pool.map(worker, imagenames)
        #
        # for name in imagenames:
        #     self.SplitSingle(name, rate, self.ext)
    def __getstate__(self):
        self_dict = self.__dict__.copy()
        del self_dict['pool']
        return self_dict

    def __setstate__(self, state):
        self.__dict__.update(state)

if __name__ == '__main__':
    split = splitbase(r'/home/dingjian/data/dota/val/images',
                      r'/home/dingjian/data/dota/valsplit',
                      num_process=32)
    split.splitdata(1)

================================================
FILE: YOLO_Transform.py
================================================
# -*- coding: utf-8 -*-
import dota_utils as util
import os
import numpy as np
from PIL import Image
import cv2
import random
import  shutil
import matplotlib.pyplot as plt
from shapely.geometry import Polygon, MultiPoint  # 多边形
import time
import argparse

## trans dota format to format YOLO(darknet) required
def dota2Darknet(imgpath, txtpath, dstpath, extractclassname):
    """
    :param imgpath: the path of images
    :param txtpath: the path of txt in dota format
    :param dstpath: the path of txt in YOLO format
    :param extractclassname: the category you selected
    :return:
           txt format: id x y w h
    """
    if os.path.exists(dstpath):
        shutil.rmtree(dstpath)  # delete output folder
    os.makedirs(dstpath)  # make new output folder
    filelist = util.GetFileFromThisRootDir(txtpath)  # fileist=['/.../P0005.txt', ..., /.../P000?.txt]
    for fullname in filelist:  # fullname='/.../P000?.txt'
        objects = util.parse_dota_poly(fullname)
        '''
        objects =
        [{'name': 'ship', 
          'difficult': '1', 
          'poly': [(1054.0, 1028.0), (1063.0, 1011.0), (1111.0, 1040.0), (1112.0, 1062.0)], 
          'area': 1159.5
          },
          ...
        ]
        '''
        name = os.path.splitext(os.path.basename(fullname))[0]  # name='P000?'
        img_fullname = os.path.join(imgpath, name + '.png')  # img_fullname='/.../P000?.png'
        img = Image.open(img_fullname)
        img_w, img_h = img.size
        # print img_w,img_h
        with open(os.path.join(dstpath, name + '.txt'), 'w') as f_out:
            for obj in objects:
                poly = obj['poly']  # poly=[(x1,y1),(x2,y2),(x3,y3),(x4,y4)]
                bbox = np.array(util.dots4ToRecC(poly, img_w, img_h))  # bbox=[x y w h]
                if (sum(bbox <= 0) + sum(bbox >= 1)) >= 1:  # 若bbox中有<=0或>= 1的元素则将该box排除
                    continue
                if (obj['name'] in extractclassname):
                    id = extractclassname.index(obj['name'])  # id=类名的索引 比如'plane'对应id=0
                else:
                    continue
                outline = str(id) + ' ' + ' '.join(list(map(str, bbox)))  # outline='id x y w h'
                f_out.write(outline + '\n')  # 写入txt文件中并加上换行符号 \n

## trans dota format to  (cls, c_x, c_y, Longest side, short side, angle:[0,179))
def dota2LongSideFormat(imgpath, txtpath, dstpath, extractclassname):
    """
    trans dota farmat to longside format
    :param imgpath: the path of images
    :param txtpath: the path of txt in dota format
    :param dstpath: the path of txt in YOLO format
    :param extractclassname: the category you selected
    """
    if os.path.exists(dstpath):
        shutil.rmtree(dstpath)  # delete output folder
    os.makedirs(dstpath)  # make new output folder
    filelist = util.GetFileFromThisRootDir(txtpath)  # fileist=['/.../P0005.txt', ..., /.../P000?.txt]
    for fullname in filelist:  # fullname='/.../P000?.txt'
        objects = util.parse_dota_poly(fullname)
        '''
        objects =
        [{'name': 'ship', 
          'difficult': '1', 
          'poly': [(1054.0, 1028.0), (1063.0, 1011.0), (1111.0, 1040.0), (1112.0, 1062.0)], 
          'area': 1159.5
          },
          ...
        ]
        '''
        name = os.path.splitext(os.path.basename(fullname))[0]  # name='P000?'
        img_fullname = os.path.join(imgpath, name + '.png')  # img_fullname='/.../P000?.png'
        img = Image.open(img_fullname)
        img_w, img_h = img.size
        # print img_w,img_h
        with open(os.path.join(dstpath, name + '.txt'), 'w') as f_out:
            num_gt = 0
            for i, obj in enumerate(objects):
                num_gt = num_gt + 1  # 为当前有效gt计数
                poly = obj['poly']  # poly=[(x1,y1),(x2,y2),(x3,y3),(x4,y4)]
                poly = np.float32(np.array(poly))
                # 四点坐标归一化
                poly[:, 0] = poly[:, 0]/img_w
                poly[:, 1] = poly[:, 1]/img_h

                rect = cv2.minAreaRect(poly)  # 得到最小外接矩形的(中心(x,y), (宽,高), 旋转角度)
               # box = np.float32(cv2.boxPoints(rect))  # 返回rect四个点的值

                c_x = rect[0][0]
                c_y = rect[0][1]
                w = rect[1][0]
                h = rect[1][1]
                theta = rect[-1]  # Range for angle is [-90,0)

                trans_data = cvminAreaRect2longsideformat(c_x, c_y, w, h, theta)
                if not trans_data:
                    if theta != 90:  # Θ=90说明wh中有为0的元素,即gt信息不完整,无需提示异常,直接删除
                        print('opencv表示法转长边表示法出现异常,已将第%d个box排除,问题出现在该图片中:%s' % (i, img_fullname))
                    num_gt = num_gt - 1
                    continue
                else:
                    # range:[-180,0)
                    c_x, c_y, longside, shortside, theta_longside = trans_data

                bbox = np.array((c_x, c_y, longside, shortside))

                if (sum(bbox <= 0) + sum(bbox[:2] >= 1) ) >= 1:  # 0<xy<1, 0<side<=1
                    print('bbox[:2]中有>= 1的元素,bbox中有<= 0的元素,已将第%d个box排除,问题出现在该图片中:%s' % (i, img_fullname))
                    print('出问题的longside形式数据:[%.16f, %.16f, %.16f, %.16f, %.1f]' % (c_x, c_y, longside, shortside, theta_longside))
                    num_gt = num_gt - 1
                    continue
                if (obj['name'] in extractclassname):
                    id = extractclassname.index(obj['name'])  # id=类名的索引 比如'plane'对应id=0
                else:
                    print('预定类别中没有类别:%s;已将该box排除,问题出现在该图片中:%s' % (obj['name'], fullname))
                    num_gt = num_gt - 1
                    continue
                theta_label = int(theta_longside + 180.5)  # range int[0,180] 四舍五入
                if theta_label == 180:  # range int[0,179]
                    theta_label = 179
                # outline='id x y longside shortside Θ'

                # final check
                if id > 15 or id < 0:
                    print('id problems,问题出现在该图片中:%s' % (i, img_fullname))
                    print('出问题的longside形式数据:[%.16f, %.16f, %.16f, %.16f, %.1f]' % (
                    c_x, c_y, longside, shortside, theta_longside))
                if theta_label < 0 or theta_label > 179:
                    print('id problems,问题出现在该图片中:%s' % (i, img_fullname))
                    print('出问题的longside形式数据:[%.16f, %.16f, %.16f, %.16f, %.1f]' % (
                        c_x, c_y, longside, shortside, theta_longside))
                outline = str(id) + ' ' + ' '.join(list(map(str, bbox))) + ' ' + str(theta_label)
                f_out.write(outline + '\n')  # 写入txt文件中并加上换行符号 \n

        if num_gt == 0:
            os.remove(os.path.join(dstpath, name + '.txt'))  #
            os.remove(img_fullname)
            os.remove(fullname)
            print('%s 图片对应的txt不存在有效目标,已删除对应图片与txt' % img_fullname)
    print('已完成文件夹内DOTA数据形式到长边表示法的转换')


def cvminAreaRect2longsideformat(x_c, y_c, width, height, theta):
    '''
    trans minAreaRect(x_c, y_c, width, height, θ) to longside format(x_c, y_c, longside, shortside, θ)
    两者区别为:
            当opencv表示法中width为最长边时(包括正方形的情况),则两种表示方法一致
            当opencv表示法中width不为最长边 ,则最长边表示法的角度要在opencv的Θ基础上-90度         
    @param x_c: center_x
    @param y_c: center_y
    @param width: x轴逆时针旋转碰到的第一条边
    @param height: 与width不同的边
    @param theta: x轴逆时针旋转与width的夹角,由于原点位于图像的左上角,逆时针旋转角度为负 [-90, 0)
    @return: 
            x_c: center_x
            y_c: center_y
            longside: 最长边
            shortside: 最短边
            theta_longside: 最长边和x轴逆时针旋转的夹角,逆时针方向角度为负 [-180, 0)
    '''
    '''
    意外情况:(此时要将它们恢复符合规则的opencv形式:wh交换,Θ置为-90)
    竖直box:box_width < box_height  θ=0
    水平box:box_width > box_height  θ=0
    '''
    if theta == 0:
        theta = -90
        buffer_width = width
        width = height
        height = buffer_width

    if theta > 0:
        if theta != 90:  # Θ=90说明wh中有为0的元素,即gt信息不完整,无需提示异常,直接删除
            print('θ计算出现异常,当前数据为:%.16f, %.16f, %.16f, %.16f, %.1f;超出opencv表示法的范围:[-90,0)' % (x_c, y_c, width, height, theta))
        return False

    if theta < -90:
        print('θ计算出现异常,当前数据为:%.16f, %.16f, %.16f, %.16f, %.1f;超出opencv表示法的范围:[-90,0)' % (x_c, y_c, width, height, theta))
        return False

    if width != max(width, height):  # 若width不是最长边
        longside = height
        shortside = width
        theta_longside = theta - 90
    else:  # 若width是最长边(包括正方形的情况)
        longside = width
        shortside = height
        theta_longside = theta

    if longside < shortside:
        print('旋转框转换表示形式后出现问题:最长边小于短边;[%.16f, %.16f, %.16f, %.16f, %.1f]' % (x_c, y_c, longside, shortside, theta_longside))
        return False
    if (theta_longside < -180 or theta_longside >= 0):
        print('旋转框转换表示形式时出现问题:θ超出长边表示法的范围:[-180,0);[%.16f, %.16f, %.16f, %.16f, %.1f]' % (x_c, y_c, longside, shortside, theta_longside))
        return False

    return x_c, y_c, longside, shortside, theta_longside

def drawLongsideFormatimg(imgpath, txtpath, dstpath, extractclassname, thickness=2):
    """
    根据labels绘制边框(label_format:classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, Θ)
    :param imgpath: the path of images
    :param txtpath: the path of txt in longside format
    :param dstpath: the path of image_drawed
    :param extractclassname: the category you selected
    """
    if os.path.exists(dstpath):
        shutil.rmtree(dstpath)  # delete output folder
    os.makedirs(dstpath)  # make new output folder
    # 设置画框的颜色    colors = [[178, 63, 143], [25, 184, 176], [238, 152, 129],....,[235, 137, 120]]随机设置RGB颜色
    colors = [[random.randint(0, 255) for _ in range(3)] for _ in range(len(extractclassname))]
    filelist = util.GetFileFromThisRootDir(txtpath)  # fileist=['/.../P0005.txt', ..., /.../P000?.txt]
    for fullname in filelist:  # fullname='/.../P000?.txt'
        objects = util.parse_longsideformat(fullname)
        '''
        objects[i] = [classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, theta]
        '''
        name = os.path.splitext(os.path.basename(fullname))[0]  # name='P000?'
        img_fullname = os.path.join(imgpath, name + '.png')  # img_fullname='/.../P000?.png'
        img_savename = os.path.join(dstpath, name + '_.png')  # img_fullname='/.../_P000?.png'
        img = Image.open(img_fullname)  # 图像被打开但未被读取
        img_w, img_h = img.size
        img = cv2.imread(img_fullname)  # 读取图像像素
        for i, obj in enumerate(objects):
            # obj = [classid, x_c_normalized, y_c_normalized, longside_normalized, shortside_normalized, float:0-179]
            class_index = obj[0]
            # rect=[(x_c,y_c),(w,h),Θ] Θ:flaot[0-179]  -> (-180,0)
            rect = longsideformat2cvminAreaRect(obj[1], obj[2], obj[3], obj[4], (obj[5]-179.9))
            # poly = [(x1,y1),(x2,y2),(x3,y3),(x4,y4)]
            poly = np.float32(cv2.boxPoints(rect))  # 返回rect对应的四个点的值 normalized

            # 四点坐标反归一化 取整
            poly[:, 0] = poly[:, 0] * img_w
            poly[:, 1] = poly[:, 1] * img_h
            poly = np.int0(poly)

            # 画出来
            cv2.drawContours(image=img,
                             contours=[poly],
                             contourIdx=-1,
                             color=colors[int(class_index)],
                             thickness=thickness)
        cv2.imwrite(img_savename, img)

    # time.sleep()

def longsideformat2cvminAreaRect(x_c, y_c, longside, shortside, theta_longside):
    '''
    trans longside format(x_c, y_c, longside, shortside, θ) to minAreaRect(x_c, y_c, width, height, θ)
    两者区别为:
            当opencv表示法中width为最长边时(包括正方形的情况),则两种表示方法一致
            当opencv表示法中width不为最长边 ,则最长边表示法的角度要在opencv的Θ基础上-90度         
    @param x_c: center_x
    @param y_c: center_y
    @param longside: 最长边
    @param shortside: 最短边
    @param theta_longside: 最长边和x轴逆时针旋转的夹角,逆时针方向角度为负 [-180, 0)
    @return: ((x_c, y_c),(width, height),Θ)
            x_c: center_x
            y_c: center_y
            width: x轴逆时针旋转碰到的第一条边最长边
            height: 与width不同的边
            theta: x轴逆时针旋转与width的夹角,由于原点位于图像的左上角,逆时针旋转角度为负 [-90, 0)
    '''
    if (theta_longside >= -180 and theta_longside < -90):  # width is not the longest side
        width = shortside
        height = longside
        theta = theta_longside + 90
    else:
        width = longside
        height =shortside
        theta = theta_longside

    if theta < -90 or theta >= 0:
        print('当前θ=%.1f,超出opencv的θ定义范围[-90, 0)' % theta)

    return ((x_c, y_c), (width, height), theta)

def delete(imgpath, txtpath):
    filelist = util.GetFileFromThisRootDir(txtpath)  # fileist=['/.../P0005.txt', ..., /.../P000?.txt]
    for fullname in filelist:  # fullname='/.../P000?.txt'
        name = os.path.splitext(os.path.basename(fullname))[0]  # name='P000?'
        img_fullname = os.path.join(imgpath, name + '.png')  # img_fullname='/.../P000?.png'
        if not os.path.exists(img_fullname):  # 如果文件bu存在
            os.remove(fullname)

if __name__ == '__main__':
    ## an example

    dota2LongSideFormat('./DOTA_demo/images',
                        './DOTA_demo/labelTxt',
                        './DOTA_demo/yolo_labels',
                        util.classnames_v1_5)

    drawLongsideFormatimg(imgpath='DOTA_demo/images',
                          txtpath='DOTA_demo/yolo_labels',
                          dstpath='DOTA_demo/draw_longside_img',
                          extractclassname=util.classnames_v1_5)


================================================
FILE: demo.ipynb
================================================
[File too large to display: 11.0 MB]

================================================
FILE: dota-v1.5_evaluation_task1.py
================================================
# --------------------------------------------------------
# dota_evaluation_task1
# Licensed under The MIT License [see LICENSE for details]
# Written by Jian Ding, based on code from Bharath Hariharan
# --------------------------------------------------------

"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import xml.etree.ElementTree as ET
import os
#import cPickle
import numpy as np
import matplotlib.pyplot as plt
import polyiou
from functools import partial
import pdb

def parse_gt(filename):
    """

    :param filename: ground truth file to parse
    :return: all instances in a picture
    """
    objects = []
    with  open(filename, 'r') as f:
        while True:
            line = f.readline()
            if line:
                splitlines = line.strip().split(' ')
                object_struct = {}
                if (len(splitlines) < 9):
                    continue
                object_struct['name'] = splitlines[8]

                # if (len(splitlines) == 9):
                #     object_struct['difficult'] = 0
                # elif (len(splitlines) == 10):
                #     object_struct['difficult'] = int(splitlines[9])
                object_struct['difficult'] = 0
                object_struct['bbox'] = [float(splitlines[0]),
                                         float(splitlines[1]),
                                         float(splitlines[2]),
                                         float(splitlines[3]),
                                         float(splitlines[4]),
                                         float(splitlines[5]),
                                         float(splitlines[6]),
                                         float(splitlines[7])]
                objects.append(object_struct)
            else:
                break
    return objects
def voc_ap(rec, prec, use_07_metric=False):
    """ ap = voc_ap(rec, prec, [use_07_metric])
    Compute VOC AP given precision and recall.
    If use_07_metric is true, uses the
    VOC 07 11 point method (default:False).
    """
    if use_07_metric:
        # 11 point metric
        ap = 0.
        for t in np.arange(0., 1.1, 0.1):
            if np.sum(rec >= t) == 0:
                p = 0
            else:
                p = np.max(prec[rec >= t])
            ap = ap + p / 11.
    else:
        # correct AP calculation
        # first append sentinel values at the end
        mrec = np.concatenate(([0.], rec, [1.]))
        mpre = np.concatenate(([0.], prec, [0.]))

        # compute the precision envelope
        for i in range(mpre.size - 1, 0, -1):
            mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])

        # to calculate area under PR curve, look for points
        # where X axis (recall) changes value
        i = np.where(mrec[1:] != mrec[:-1])[0]

        # and sum (\Delta recall) * prec
        ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
    return ap


def voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
            # cachedir,
             ovthresh=0.5,
             use_07_metric=False):
    """rec, prec, ap = voc_eval(detpath,
                                annopath,
                                imagesetfile,
                                classname,
                                [ovthresh],
                                [use_07_metric])
    Top level function that does the PASCAL VOC evaluation.
    detpath: Path to detections
        detpath.format(classname) should produce the detection results file.
    annopath: Path to annotations
        annopath.format(imagename) should be the xml annotations file.
    imagesetfile: Text file containing the list of images, one image per line.
    classname: Category name (duh)
    cachedir: Directory for caching the annotations
    [ovthresh]: Overlap threshold (default = 0.5)
    [use_07_metric]: Whether to use VOC07's 11 point AP computation
        (default False)
    """
    # assumes detections are in detpath.format(classname)
    # assumes annotations are in annopath.format(imagename)
    # assumes imagesetfile is a text file with each line an image name
    # cachedir caches the annotations in a pickle file

    # first load gt
    #if not os.path.isdir(cachedir):
     #   os.mkdir(cachedir)
    #cachefile = os.path.join(cachedir, 'annots.pkl')
    # read list of images
    with open(imagesetfile, 'r') as f:
        lines = f.readlines()
    imagenames = [x.strip() for x in lines]
    #print('imagenames: ', imagenames)
    #if not os.path.isfile(cachefile):
        # load annots
    recs = {}
    for i, imagename in enumerate(imagenames):
        #print('parse_files name: ', annopath.format(imagename))
        recs[imagename] = parse_gt(annopath.format(imagename))

    # extract gt objects for this class
    class_recs = {}
    npos = 0
    for imagename in imagenames:
        R = [obj for obj in recs[imagename] if obj['name'] == classname]
        bbox = np.array([x['bbox'] for x in R])
        difficult = np.array([x['difficult'] for x in R]).astype(np.bool)
        det = [False] * len(R)
        npos = npos + sum(~difficult)
        class_recs[imagename] = {'bbox': bbox,
                                 'difficult': difficult,
                                 'det': det}

    # read dets from Task1* files
    detfile = detpath.format(classname)
    with open(detfile, 'r') as f:
        lines = f.readlines()

    splitlines = [x.strip().split(' ') for x in lines]
    image_ids = [x[0] for x in splitlines]
    confidence = np.array([float(x[1]) for x in splitlines])

    #print('check confidence: ', confidence)

    BB = np.array([[float(z) for z in x[2:]] for x in splitlines])

    # sort by confidence
    sorted_ind = np.argsort(-confidence)
    sorted_scores = np.sort(-confidence)

    #print('check sorted_scores: ', sorted_scores)
    #print('check sorted_ind: ', sorted_ind)

    ## note the usage only in numpy not for list
    BB = BB[sorted_ind, :]
    image_ids = [image_ids[x] for x in sorted_ind]
    #print('check imge_ids: ', image_ids)
    #print('imge_ids len:', len(image_ids))
    # go down dets and mark TPs and FPs
    nd = len(image_ids)
    tp = np.zeros(nd)
    fp = np.zeros(nd)
    for d in range(nd):
        R = class_recs[image_ids[d]]
        bb = BB[d, :].astype(float)
        ovmax = -np.inf
        BBGT = R['bbox'].astype(float)

        ## compute det bb with each BBGT

        if BBGT.size > 0:
            # compute overlaps
            # intersection

            # 1. calculate the overlaps between hbbs, if the iou between hbbs are 0, the iou between obbs are 0, too.
            # pdb.set_trace()
            BBGT_xmin =  np.min(BBGT[:, 0::2], axis=1)
            BBGT_ymin = np.min(BBGT[:, 1::2], axis=1)
            BBGT_xmax = np.max(BBGT[:, 0::2], axis=1)
            BBGT_ymax = np.max(BBGT[:, 1::2], axis=1)
            bb_xmin = np.min(bb[0::2])
            bb_ymin = np.min(bb[1::2])
            bb_xmax = np.max(bb[0::2])
            bb_ymax = np.max(bb[1::2])

            ixmin = np.maximum(BBGT_xmin, bb_xmin)
            iymin = np.maximum(BBGT_ymin, bb_ymin)
            ixmax = np.minimum(BBGT_xmax, bb_xmax)
            iymax = np.minimum(BBGT_ymax, bb_ymax)
            iw = np.maximum(ixmax - ixmin + 1., 0.)
            ih = np.maximum(iymax - iymin + 1., 0.)
            inters = iw * ih

            # union
            uni = ((bb_xmax - bb_xmin + 1.) * (bb_ymax - bb_ymin + 1.) +
                   (BBGT_xmax - BBGT_xmin + 1.) *
                   (BBGT_ymax - BBGT_ymin + 1.) - inters)

            overlaps = inters / uni

            BBGT_keep_mask = overlaps > 0
            BBGT_keep = BBGT[BBGT_keep_mask, :]
            BBGT_keep_index = np.where(overlaps > 0)[0]
            # pdb.set_trace()
            def calcoverlaps(BBGT_keep, bb):
                overlaps = []
                for index, GT in enumerate(BBGT_keep):

                    overlap = polyiou.iou_poly(polyiou.VectorDouble(BBGT_keep[index]), polyiou.VectorDouble(bb))
                    overlaps.append(overlap)
                return overlaps
            if len(BBGT_keep) > 0:
                overlaps = calcoverlaps(BBGT_keep, bb)

                ovmax = np.max(overlaps)
                jmax = np.argmax(overlaps)
                # pdb.set_trace()
                jmax = BBGT_keep_index[jmax]
        if ovmax > ovthresh:
            if not R['difficult'][jmax]:
                if not R['det'][jmax]:
                    tp[d] = 1.
                    R['det'][jmax] = 1
                else:
                    fp[d] = 1.
        else:
            fp[d] = 1.

    # compute precision recall

    print('check fp:', fp)
    print('check tp', tp)


    print('npos num:', npos)
    fp = np.cumsum(fp)
    tp = np.cumsum(tp)

    rec = tp / float(npos)
    # avoid divide by zero in case the first detection matches a difficult
    # ground truth
    prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps)
    ap = voc_ap(rec, prec, use_07_metric)

    return rec, prec, ap

def main():

    detpath = r'/home/test/Persons/hukaixuan/DOTA_devkit-master/evaluation_example/result_classname/Task1_{:s}.txt'
    annopath = r'/home/test/Persons/hukaixuan/DOTA_devkit-master/evaluation_example/row_DOTA_labels/{:s}.txt'
    imagesetfile = r'/home/test/Persons/hukaixuan/DOTA_devkit-master/evaluation_example/imgnamefile.txt'

    # detpath = r'PATH_TO_BE_CONFIGURED/Task1_{:s}.txt'
    # annopath = r'PATH_TO_BE_CONFIGURED/{:s}.txt' # change the directory to the path of val/labelTxt, if you want to do evaluation on the valset
    # imagesetfile = r'PATH_TO_BE_CONFIGURED/valset.txt'

    # For demo
    classnames = ['harbor', 'large-vehicle', 'ship', 'small-vehicle']
    # For DOTA-v1.5
    # classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
    #             'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter', 'container-crane']
     # For DOTA-v1.0
    # classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
    #             'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter', ']
    classaps = []
    map = 0
    skippedClassCount = 0
    for classname in classnames:
        print('classname:', classname)
        detfile = detpath.format(classname)
        if not (os.path.exists(detfile)):
            skippedClassCount += 1
            print('This class is not be detected in your dataset: {:s}'.format(classname))
            continue
        rec, prec, ap = voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
             ovthresh=0.5,
             use_07_metric=True)
        map = map + ap
        #print('rec: ', rec, 'prec: ', prec, 'ap: ', ap)
        print('ap: ', ap)
        classaps.append(ap)

        # umcomment to show p-r curve of each category
        # plt.figure(figsize=(8,4))
        # plt.xlabel('recall')
        # plt.ylabel('precision')
        # plt.plot(rec, prec)
       # plt.show()
    map = map/(len(classnames)-skippedClassCount)
    print('map:', map)
    classaps = 100*np.array(classaps)
    print('classaps: ', classaps)
if __name__ == '__main__':
    main()


================================================
FILE: dota-v1.5_evaluation_task2.py
================================================
# --------------------------------------------------------
# dota_evaluation_task1
# Licensed under The MIT License [see LICENSE for details]
# Written by Jian Ding, based on code from Bharath Hariharan
# --------------------------------------------------------

"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import xml.etree.ElementTree as ET
import os
#import cPickle
import numpy as np
import matplotlib.pyplot as plt

def parse_gt(filename):
    objects = []
    with open(filename, 'r') as f:
        lines = f.readlines()
        splitlines = [x.strip().split(' ')  for x in lines]
        for splitline in splitlines:
            object_struct = {}
            object_struct['name'] = splitline[8]
            # if (len(splitline) == 9):
            #     object_struct['difficult'] = 0
            # elif (len(splitline) == 10):
            #     object_struct['difficult'] = int(splitline[9])
            object_struct['difficult'] = 0
            object_struct['bbox'] = [int(float(splitline[0])),
                                         int(float(splitline[1])),
                                         int(float(splitline[4])),
                                         int(float(splitline[5]))]
            w = int(float(splitline[4])) - int(float(splitline[0]))
            h = int(float(splitline[5])) - int(float(splitline[1]))
            object_struct['area'] = w * h
            #print('area:', object_struct['area'])
            # if object_struct['area'] < (15 * 15):
            #     #print('area:', object_struct['area'])
            #     object_struct['difficult'] = 1
            objects.append(object_struct)
    return objects
def voc_ap(rec, prec, use_07_metric=False):
    """ ap = voc_ap(rec, prec, [use_07_metric])
    Compute VOC AP given precision and recall.
    If use_07_metric is true, uses the
    VOC 07 11 point method (default:False).
    """
    if use_07_metric:
        # 11 point metric
        ap = 0.
        for t in np.arange(0., 1.1, 0.1):
            if np.sum(rec >= t) == 0:
                p = 0
            else:
                p = np.max(prec[rec >= t])
            ap = ap + p / 11.
    else:
        # correct AP calculation
        # first append sentinel values at the end
        mrec = np.concatenate(([0.], rec, [1.]))
        mpre = np.concatenate(([0.], prec, [0.]))

        # compute the precision envelope
        for i in range(mpre.size - 1, 0, -1):
            mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])

        # to calculate area under PR curve, look for points
        # where X axis (recall) changes value
        i = np.where(mrec[1:] != mrec[:-1])[0]

        # and sum (\Delta recall) * prec
        ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
    return ap

def voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
            # cachedir,
             ovthresh=0.5,
             use_07_metric=False):
    """rec, prec, ap = voc_eval(detpath,
                                annopath,
                                imagesetfile,
                                classname,
                                [ovthresh],
                                [use_07_metric])
    Top level function that does the PASCAL VOC evaluation.
    detpath: Path to detections
        detpath.format(classname) should produce the detection results file.
    annopath: Path to annotations
        annopath.format(imagename) should be the xml annotations file.
    imagesetfile: Text file containing the list of images, one image per line.
    classname: Category name (duh)
    cachedir: Directory for caching the annotations
    [ovthresh]: Overlap threshold (default = 0.5)
    [use_07_metric]: Whether to use VOC07's 11 point AP computation
        (default False)
    """
    # assumes detections are in detpath.format(classname)
    # assumes annotations are in annopath.format(imagename)
    # assumes imagesetfile is a text file with each line an image name
    # cachedir caches the annotations in a pickle file

    # first load gt
    #if not os.path.isdir(cachedir):
     #   os.mkdir(cachedir)
    #cachefile = os.path.join(cachedir, 'annots.pkl')
    # read list of images
    with open(imagesetfile, 'r') as f:
        lines = f.readlines()
    imagenames = [x.strip() for x in lines]
    #print('imagenames: ', imagenames)
    #if not os.path.isfile(cachefile):
        # load annots
    recs = {}
    for i, imagename in enumerate(imagenames):
        #print('parse_files name: ', annopath.format(imagename))
        recs[imagename] = parse_gt(annopath.format(imagename))
        #if i % 100 == 0:
         #   print ('Reading annotation for {:d}/{:d}'.format(
          #      i + 1, len(imagenames)) )
        # save
        #print ('Saving cached annotations to {:s}'.format(cachefile))
        #with open(cachefile, 'w') as f:
         #   cPickle.dump(recs, f)
    #else:
        # load
        #with open(cachefile, 'r') as f:
         #   recs = cPickle.load(f)

    # extract gt objects for this class
    class_recs = {}
    npos = 0
    for imagename in imagenames:
        R = [obj for obj in recs[imagename] if obj['name'] == classname]
        bbox = np.array([x['bbox'] for x in R])
        difficult = np.array([x['difficult'] for x in R]).astype(np.bool)
        det = [False] * len(R)
        npos = npos + sum(~difficult)
        class_recs[imagename] = {'bbox': bbox,
                                 'difficult': difficult,
                                 'det': det}

    # read dets
    detfile = detpath.format(classname)
    with open(detfile, 'r') as f:
        lines = f.readlines()

    splitlines = [x.strip().split(' ') for x in lines]
    image_ids = [x[0] for x in splitlines]
    confidence = np.array([float(x[1]) for x in splitlines])

    #print('check confidence: ', confidence)

    BB = np.array([[float(z) for z in x[2:]] for x in splitlines])

    # sort by confidence
    sorted_ind = np.argsort(-confidence)
    sorted_scores = np.sort(-confidence)

    #print('check sorted_scores: ', sorted_scores)
    #print('check sorted_ind: ', sorted_ind)
    BB = BB[sorted_ind, :]
    image_ids = [image_ids[x] for x in sorted_ind]
    #print('check imge_ids: ', image_ids)
    #print('imge_ids len:', len(image_ids))
    # go down dets and mark TPs and FPs
    nd = len(image_ids)
    tp = np.zeros(nd)
    fp = np.zeros(nd)
    for d in range(nd):
        R = class_recs[image_ids[d]]
        bb = BB[d, :].astype(float)
        ovmax = -np.inf
        BBGT = R['bbox'].astype(float)

        if BBGT.size > 0:
            # compute overlaps
            # intersection
            ixmin = np.maximum(BBGT[:, 0], bb[0])
            iymin = np.maximum(BBGT[:, 1], bb[1])
            ixmax = np.minimum(BBGT[:, 2], bb[2])
            iymax = np.minimum(BBGT[:, 3], bb[3])
            iw = np.maximum(ixmax - ixmin + 1., 0.)
            ih = np.maximum(iymax - iymin + 1., 0.)
            inters = iw * ih

            # union
            uni = ((bb[2] - bb[0] + 1.) * (bb[3] - bb[1] + 1.) +
                   (BBGT[:, 2] - BBGT[:, 0] + 1.) *
                   (BBGT[:, 3] - BBGT[:, 1] + 1.) - inters)

            overlaps = inters / uni
            ovmax = np.max(overlaps)
            ## if there exist 2
            jmax = np.argmax(overlaps)

        if ovmax > ovthresh:
            if not R['difficult'][jmax]:
                if not R['det'][jmax]:
                    tp[d] = 1.
                    R['det'][jmax] = 1
                else:
                    fp[d] = 1.
                   # print('filename:', image_ids[d])
        else:
            fp[d] = 1.

    # compute precision recall

    print('check fp:', fp)
    print('check tp', tp)


    print('npos num:', npos)
    fp = np.cumsum(fp)
    tp = np.cumsum(tp)

    rec = tp / float(npos)
    # avoid divide by zero in case the first detection matches a difficult
    # ground truth
    prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps)
    ap = voc_ap(rec, prec, use_07_metric)

    return rec, prec, ap

def main():
    detpath = r'/home/dingjian/Documents/ODAI_DOTA/DOAI_2019/doai2019_submit/gwf_Task2_merge_2/Task2_{:s}.txt'
    annopath = r'/home/dingjian/code/DOAI_server2/media/DOTA15_Task2_gt/{:s}.txt'
    imagesetfile = r'/home/dingjian/code/DOAI_server2/media/testset.txt'

    # detpath = r'PATH_TO_BE_CONFIGURED/Task2_{:s}.txt'
    # annopath = r'PATH_TO_BE_CONFIGURED/{:s}.txt'# change the directory to the path of val/labelTxt, if you want to do evaluation on the valset
    # imagesetfile = r'PATH_TO_BE_CONFIGURED/valset.txt'
    # For DOTA v1.5
    classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
                'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter', 'container-crane']
    # For DOTA v1.0
    # classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
    #             'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']
    classaps = []
    map = 0
    skippedClassCount = 0
    for classname in classnames:
        print('classname:', classname)
        detfile = detpath.format(classname)
        if not (os.path.exists(detfile)):
            skippedClassCount += 1
            print('This class is not be detected in your dataset: {:s}'.format(classname))
            continue
        rec, prec, ap = voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
             ovthresh=0.5,
             use_07_metric=True)
        map = map + ap
        #print('rec: ', rec, 'prec: ', prec, 'ap: ', ap)
        print('ap: ', ap)
        classaps.append(ap)

        # umcomment to show p-r curve of each category
        # plt.figure(figsize=(8,4))
        # plt.xlabel('recall')
        # plt.ylabel('precision')
        # plt.plot(rec, prec)
       # plt.show()
    map = map/(len(classnames)-skippedClassCount)
    print('map:', map)
    classaps = 100*np.array(classaps)
    print('classaps: ', classaps)
if __name__ == '__main__':
    main()


================================================
FILE: dota_evaluation_task1.py
================================================
# --------------------------------------------------------
# dota_evaluation_task1
# Licensed under The MIT License [see LICENSE for details]
# Written by Jian Ding, based on code from Bharath Hariharan
# --------------------------------------------------------

"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import xml.etree.ElementTree as ET
import os
#import cPickle
import numpy as np
import matplotlib.pyplot as plt
import polyiou
from functools import partial

def parse_gt(filename):
    """

    :param filename: ground truth file to parse
    :return: all instances in a picture
    """
    objects = []
    with  open(filename, 'r') as f:
        while True:
            line = f.readline()
            if line:
                splitlines = line.strip().split(' ')
                object_struct = {}
                if (len(splitlines) < 9):
                    continue
                object_struct['name'] = splitlines[8]

                if (len(splitlines) == 9):
                    object_struct['difficult'] = 0
                elif (len(splitlines) == 10):
                    object_struct['difficult'] = int(splitlines[9])
                object_struct['bbox'] = [float(splitlines[0]),
                                         float(splitlines[1]),
                                         float(splitlines[2]),
                                         float(splitlines[3]),
                                         float(splitlines[4]),
                                         float(splitlines[5]),
                                         float(splitlines[6]),
                                         float(splitlines[7])]
                objects.append(object_struct)
            else:
                break
    return objects
def voc_ap(rec, prec, use_07_metric=False):
    """ ap = voc_ap(rec, prec, [use_07_metric])
    Compute VOC AP given precision and recall.
    If use_07_metric is true, uses the
    VOC 07 11 point method (default:False).
    """
    if use_07_metric:
        # 11 point metric
        ap = 0.
        for t in np.arange(0., 1.1, 0.1):
            if np.sum(rec >= t) == 0:
                p = 0
            else:
                p = np.max(prec[rec >= t])
            ap = ap + p / 11.
    else:
        # correct AP calculation
        # first append sentinel values at the end
        mrec = np.concatenate(([0.], rec, [1.]))
        mpre = np.concatenate(([0.], prec, [0.]))

        # compute the precision envelope
        for i in range(mpre.size - 1, 0, -1):
            mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])

        # to calculate area under PR curve, look for points
        # where X axis (recall) changes value
        i = np.where(mrec[1:] != mrec[:-1])[0]

        # and sum (\Delta recall) * prec
        ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
    return ap


def voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
            # cachedir,
             ovthresh=0.5,
             use_07_metric=False):
    """rec, prec, ap = voc_eval(detpath,
                                annopath,
                                imagesetfile,
                                classname,
                                [ovthresh],
                                [use_07_metric])
    Top level function that does the PASCAL VOC evaluation.
    detpath: Path to detections
        detpath.format(classname) should produce the detection results file.
    annopath: Path to annotations
        annopath.format(imagename) should be the xml annotations file.
    imagesetfile: Text file containing the list of images, one image per line.
    classname: Category name (duh)
    cachedir: Directory for caching the annotations
    [ovthresh]: Overlap threshold (default = 0.5)
    [use_07_metric]: Whether to use VOC07's 11 point AP computation
        (default False)
    """
    # assumes detections are in detpath.format(classname)
    # assumes annotations are in annopath.format(imagename)
    # assumes imagesetfile is a text file with each line an image name
    # cachedir caches the annotations in a pickle file

    # first load gt
    #if not os.path.isdir(cachedir):
     #   os.mkdir(cachedir)
    #cachefile = os.path.join(cachedir, 'annots.pkl')
    # read list of images
    with open(imagesetfile, 'r') as f:
        lines = f.readlines()
    imagenames = [x.strip() for x in lines]
    #print('imagenames: ', imagenames)
    #if not os.path.isfile(cachefile):
        # load annots
    recs = {}
    for i, imagename in enumerate(imagenames):
        #print('parse_files name: ', annopath.format(imagename))
        recs[imagename] = parse_gt(annopath.format(imagename))
        #if i % 100 == 0:
         #   print ('Reading annotation for {:d}/{:d}'.format(
          #      i + 1, len(imagenames)) )
        # save
        #print ('Saving cached annotations to {:s}'.format(cachefile))
        #with open(cachefile, 'w') as f:
         #   cPickle.dump(recs, f)
    #else:
        # load
        #with open(cachefile, 'r') as f:
         #   recs = cPickle.load(f)

    # extract gt objects for this class
    class_recs = {}
    npos = 0
    for imagename in imagenames:
        R = [obj for obj in recs[imagename] if obj['name'] == classname]
        bbox = np.array([x['bbox'] for x in R])
        difficult = np.array([x['difficult'] for x in R]).astype(np.bool)
        det = [False] * len(R)
        npos = npos + sum(~difficult)
        class_recs[imagename] = {'bbox': bbox,
                                 'difficult': difficult,
                                 'det': det}

    # read dets from Task1* files
    detfile = detpath.format(classname)
    with open(detfile, 'r') as f:
        lines = f.readlines()

    splitlines = [x.strip().split(' ') for x in lines]
    image_ids = [x[0] for x in splitlines]
    confidence = np.array([float(x[1]) for x in splitlines])

    #print('check confidence: ', confidence)

    BB = np.array([[float(z) for z in x[2:]] for x in splitlines])

    # sort by confidence
    sorted_ind = np.argsort(-confidence)
    sorted_scores = np.sort(-confidence)

    #print('check sorted_scores: ', sorted_scores)
    #print('check sorted_ind: ', sorted_ind)

    ## note the usage only in numpy not for list
    BB = BB[sorted_ind, :]
    image_ids = [image_ids[x] for x in sorted_ind]
    #print('check imge_ids: ', image_ids)
    #print('imge_ids len:', len(image_ids))
    # go down dets and mark TPs and FPs
    nd = len(image_ids)
    tp = np.zeros(nd)
    fp = np.zeros(nd)
    for d in range(nd):
        R = class_recs[image_ids[d]]
        bb = BB[d, :].astype(float)
        ovmax = -np.inf
        BBGT = R['bbox'].astype(float)

        ## compute det bb with each BBGT

        if BBGT.size > 0:
            # compute overlaps
            # intersection

            # 1. calculate the overlaps between hbbs, if the iou between hbbs are 0, the iou between obbs are 0, too.
            # pdb.set_trace()
            BBGT_xmin =  np.min(BBGT[:, 0::2], axis=1)
            BBGT_ymin = np.min(BBGT[:, 1::2], axis=1)
            BBGT_xmax = np.max(BBGT[:, 0::2], axis=1)
            BBGT_ymax = np.max(BBGT[:, 1::2], axis=1)
            bb_xmin = np.min(bb[0::2])
            bb_ymin = np.min(bb[1::2])
            bb_xmax = np.max(bb[0::2])
            bb_ymax = np.max(bb[1::2])

            ixmin = np.maximum(BBGT_xmin, bb_xmin)
            iymin = np.maximum(BBGT_ymin, bb_ymin)
            ixmax = np.minimum(BBGT_xmax, bb_xmax)
            iymax = np.minimum(BBGT_ymax, bb_ymax)
            iw = np.maximum(ixmax - ixmin + 1., 0.)
            ih = np.maximum(iymax - iymin + 1., 0.)
            inters = iw * ih

            # union
            uni = ((bb_xmax - bb_xmin + 1.) * (bb_ymax - bb_ymin + 1.) +
                   (BBGT_xmax - BBGT_xmin + 1.) *
                   (BBGT_ymax - BBGT_ymin + 1.) - inters)

            overlaps = inters / uni

            BBGT_keep_mask = overlaps > 0
            BBGT_keep = BBGT[BBGT_keep_mask, :]
            BBGT_keep_index = np.where(overlaps > 0)[0]
            # pdb.set_trace()
            def calcoverlaps(BBGT_keep, bb):
                overlaps = []
                for index, GT in enumerate(BBGT_keep):

                    overlap = polyiou.iou_poly(polyiou.VectorDouble(BBGT_keep[index]), polyiou.VectorDouble(bb))
                    overlaps.append(overlap)
                return overlaps
            if len(BBGT_keep) > 0:
                overlaps = calcoverlaps(BBGT_keep, bb)

                ovmax = np.max(overlaps)
                jmax = np.argmax(overlaps)
                # pdb.set_trace()
                jmax = BBGT_keep_index[jmax]

        if ovmax > ovthresh:
            if not R['difficult'][jmax]:
                if not R['det'][jmax]:
                    tp[d] = 1.
                    R['det'][jmax] = 1
                else:
                    fp[d] = 1.
        else:
            fp[d] = 1.

    # compute precision recall

    print('check fp:', fp)
    print('check tp', tp)


    print('npos num:', npos)
    fp = np.cumsum(fp)
    tp = np.cumsum(tp)

    rec = tp / float(npos)
    # avoid divide by zero in case the first detection matches a difficult
    # ground truth
    prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps)
    ap = voc_ap(rec, prec, use_07_metric)

    return rec, prec, ap

def main():

    # ##TODO: wrap the code in the main
    # detpath = r'/home/dingjian/Documents/Research/experiments/light_head_faster_rotbox_best_point/Task1_results_0.1_nms_epoch18/results/Task1_{:s}.txt'
    # annopath = r'/home/dingjian/code/DOTA/DOTA/media/OrientlabelTxt-utf-8/{:s}.txt'# change the directory to the path of val/labelTxt, if you want to do evaluation on the valset
    # imagesetfile = r'/home/dingjian/code/DOTA/DOTA/media/testset.txt'
    # classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
    #             'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']

    detpath = r'PATH_TO_BE_CONFIGURED/Task1_{:s}.txt'
    annopath = r'PATH_TO_BE_CONFIGURED/{:s}.txt' # change the directory to the path of val/labelTxt, if you want to do evaluation on the valset
    imagesetfile = r'PATH_TO_BE_CONFIGURED/valset.txt'

    # For DOTA-v1.5
    # classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
    #             'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter', 'container-crane']
    # For DOTA-v1.0
    classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
                'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']
    classaps = []
    map = 0
    for classname in classnames:
        print('classname:', classname)
        rec, prec, ap = voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
             ovthresh=0.5,
             use_07_metric=True)
        map = map + ap
        #print('rec: ', rec, 'prec: ', prec, 'ap: ', ap)
        print('ap: ', ap)
        classaps.append(ap)

        # umcomment to show p-r curve of each category
        # plt.figure(figsize=(8,4))
        # plt.xlabel('recall')
        # plt.ylabel('precision')
        # plt.plot(rec, prec)
       # plt.show()
    map = map/len(classnames)
    print('map:', map)
    classaps = 100*np.array(classaps)
    print('classaps: ', classaps)
if __name__ == '__main__':
    main()

================================================
FILE: dota_evaluation_task2.py
================================================
# --------------------------------------------------------
# dota_evaluation_task1
# Licensed under The MIT License [see LICENSE for details]
# Written by Jian Ding, based on code from Bharath Hariharan
# --------------------------------------------------------

"""
    To use the code, users should to config detpath, annopath and imagesetfile
    detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
    search for PATH_TO_BE_CONFIGURED to config the paths
    Note, the evaluation is on the large scale images
"""
import xml.etree.ElementTree as ET
import os
#import cPickle
import numpy as np
import matplotlib.pyplot as plt

def parse_gt(filename):
    objects = []
    with open(filename, 'r') as f:
        lines = f.readlines()
        splitlines = [x.strip().split(' ')  for x in lines]
        for splitline in splitlines:
            object_struct = {}
            object_struct['name'] = splitline[8]
            if (len(splitline) == 9):
                object_struct['difficult'] = 0
            elif (len(splitline) == 10):
                object_struct['difficult'] = int(splitline[9])
            # object_struct['difficult'] = 0
            object_struct['bbox'] = [int(float(splitline[0])),
                                         int(float(splitline[1])),
                                         int(float(splitline[4])),
                                         int(float(splitline[5]))]
            w = int(float(splitline[4])) - int(float(splitline[0]))
            h = int(float(splitline[5])) - int(float(splitline[1]))
            object_struct['area'] = w * h
            #print('area:', object_struct['area'])
            # if object_struct['area'] < (15 * 15):
            #     #print('area:', object_struct['area'])
            #     object_struct['difficult'] = 1
            objects.append(object_struct)
    return objects
def voc_ap(rec, prec, use_07_metric=False):
    """ ap = voc_ap(rec, prec, [use_07_metric])
    Compute VOC AP given precision and recall.
    If use_07_metric is true, uses the
    VOC 07 11 point method (default:False).
    """
    if use_07_metric:
        # 11 point metric
        ap = 0.
        for t in np.arange(0., 1.1, 0.1):
            if np.sum(rec >= t) == 0:
                p = 0
            else:
                p = np.max(prec[rec >= t])
            ap = ap + p / 11.
    else:
        # correct AP calculation
        # first append sentinel values at the end
        mrec = np.concatenate(([0.], rec, [1.]))
        mpre = np.concatenate(([0.], prec, [0.]))

        # compute the precision envelope
        for i in range(mpre.size - 1, 0, -1):
            mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])

        # to calculate area under PR curve, look for points
        # where X axis (recall) changes value
        i = np.where(mrec[1:] != mrec[:-1])[0]

        # and sum (\Delta recall) * prec
        ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
    return ap

def voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
            # cachedir,
             ovthresh=0.5,
             use_07_metric=False):
    """rec, prec, ap = voc_eval(detpath,
                                annopath,
                                imagesetfile,
                                classname,
                                [ovthresh],
                                [use_07_metric])
    Top level function that does the PASCAL VOC evaluation.
    detpath: Path to detections
        detpath.format(classname) should produce the detection results file.
    annopath: Path to annotations
        annopath.format(imagename) should be the xml annotations file.
    imagesetfile: Text file containing the list of images, one image per line.
    classname: Category name (duh)
    cachedir: Directory for caching the annotations
    [ovthresh]: Overlap threshold (default = 0.5)
    [use_07_metric]: Whether to use VOC07's 11 point AP computation
        (default False)
    """
    # assumes detections are in detpath.format(classname)
    # assumes annotations are in annopath.format(imagename)
    # assumes imagesetfile is a text file with each line an image name
    # cachedir caches the annotations in a pickle file

    # first load gt
    #if not os.path.isdir(cachedir):
     #   os.mkdir(cachedir)
    #cachefile = os.path.join(cachedir, 'annots.pkl')
    # read list of images
    with open(imagesetfile, 'r') as f:
        lines = f.readlines()
    imagenames = [x.strip() for x in lines]
    #print('imagenames: ', imagenames)
    #if not os.path.isfile(cachefile):
        # load annots
    recs = {}
    for i, imagename in enumerate(imagenames):
        #print('parse_files name: ', annopath.format(imagename))
        recs[imagename] = parse_gt(annopath.format(imagename))
        #if i % 100 == 0:
         #   print ('Reading annotation for {:d}/{:d}'.format(
          #      i + 1, len(imagenames)) )
        # save
        #print ('Saving cached annotations to {:s}'.format(cachefile))
        #with open(cachefile, 'w') as f:
         #   cPickle.dump(recs, f)
    #else:
        # load
        #with open(cachefile, 'r') as f:
         #   recs = cPickle.load(f)

    # extract gt objects for this class
    class_recs = {}
    npos = 0
    for imagename in imagenames:
        R = [obj for obj in recs[imagename] if obj['name'] == classname]
        bbox = np.array([x['bbox'] for x in R])
        difficult = np.array([x['difficult'] for x in R]).astype(np.bool)
        det = [False] * len(R)
        npos = npos + sum(~difficult)
        class_recs[imagename] = {'bbox': bbox,
                                 'difficult': difficult,
                                 'det': det}

    # read dets
    detfile = detpath.format(classname)
    with open(detfile, 'r') as f:
        lines = f.readlines()

    splitlines = [x.strip().split(' ') for x in lines]
    image_ids = [x[0] for x in splitlines]
    confidence = np.array([float(x[1]) for x in splitlines])

    #print('check confidence: ', confidence)

    BB = np.array([[float(z) for z in x[2:]] for x in splitlines])

    # sort by confidence
    sorted_ind = np.argsort(-confidence)
    sorted_scores = np.sort(-confidence)

    #print('check sorted_scores: ', sorted_scores)
    #print('check sorted_ind: ', sorted_ind)
    BB = BB[sorted_ind, :]
    image_ids = [image_ids[x] for x in sorted_ind]
    #print('check imge_ids: ', image_ids)
    #print('imge_ids len:', len(image_ids))
    # go down dets and mark TPs and FPs
    nd = len(image_ids)
    tp = np.zeros(nd)
    fp = np.zeros(nd)
    for d in range(nd):
        R = class_recs[image_ids[d]]
        bb = BB[d, :].astype(float)
        ovmax = -np.inf
        BBGT = R['bbox'].astype(float)

        if BBGT.size > 0:
            # compute overlaps
            # intersection
            ixmin = np.maximum(BBGT[:, 0], bb[0])
            iymin = np.maximum(BBGT[:, 1], bb[1])
            ixmax = np.minimum(BBGT[:, 2], bb[2])
            iymax = np.minimum(BBGT[:, 3], bb[3])
            iw = np.maximum(ixmax - ixmin + 1., 0.)
            ih = np.maximum(iymax - iymin + 1., 0.)
            inters = iw * ih

            # union
            uni = ((bb[2] - bb[0] + 1.) * (bb[3] - bb[1] + 1.) +
                   (BBGT[:, 2] - BBGT[:, 0] + 1.) *
                   (BBGT[:, 3] - BBGT[:, 1] + 1.) - inters)

            overlaps = inters / uni
            ovmax = np.max(overlaps)
            ## if there exist 2
            jmax = np.argmax(overlaps)

        if ovmax > ovthresh:
            if not R['difficult'][jmax]:
                if not R['det'][jmax]:
                    tp[d] = 1.
                    R['det'][jmax] = 1
                else:
                    fp[d] = 1.
                   # print('filename:', image_ids[d])
        else:
            fp[d] = 1.

    # compute precision recall

    print('check fp:', fp)
    print('check tp', tp)


    print('npos num:', npos)
    fp = np.cumsum(fp)
    tp = np.cumsum(tp)

    rec = tp / float(npos)
    # avoid divide by zero in case the first detection matches a difficult
    # ground truth
    prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps)
    ap = voc_ap(rec, prec, use_07_metric)

    return rec, prec, ap

def main():
    # detpath = r'E:\documentation\OneDrive\documentation\DotaEvaluation\evluation_task2\evluation_task2\faster-rcnn-nms_0.3_task2\nms_0.3_task\Task2_{:s}.txt'
    # annopath = r'I:\dota\testset\ReclabelTxt-utf-8\{:s}.txt'
    # imagesetfile = r'I:\dota\testset\va.txt'

    detpath = r'PATH_TO_BE_CONFIGURED/Task2_{:s}.txt'
    annopath = r'PATH_TO_BE_CONFIGURED/{:s}.txt'# change the directory to the path of val/labelTxt, if you want to do evaluation on the valset
    imagesetfile = r'PATH_TO_BE_CONFIGURED/valset.txt'

    classnames = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
                'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']
    classaps = []
    map = 0
    for classname in classnames:
        print('classname:', classname)
        rec, prec, ap = voc_eval(detpath,
             annopath,
             imagesetfile,
             classname,
             ovthresh=0.5,
             use_07_metric=True)
        map = map + ap
        #print('rec: ', rec, 'prec: ', prec, 'ap: ', ap)
        print('ap: ', ap)
        classaps.append(ap)

        ## uncomment to plot p-r curve for each category
        # plt.figure(figsize=(8,4))
        # plt.xlabel('recall')
        # plt.ylabel('precision')
        # plt.plot(rec, prec)
        # plt.show()
    map = map/len(classnames)
    print('map:', map)
    classaps = 100*np.array(classaps)
    print('classaps: ', classaps)
if __name__ == '__main__':
    main()

================================================
FILE: dota_utils.py
================================================
# -*- coding: utf-8 -*-
import sys
import codecs
import numpy as np

import shapely.geometry as shgeo
import os
import re
import math
# import polyiou
"""
    some basic functions which are useful for process DOTA data
"""
# For DOTA v1.5
classnames_v1_5 = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
                'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter', 'container-crane']

wordname_15 = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
               'basketball-court', 'storage-tank',  'soccer-ball-field', 'roundabout', 'harbor', 'swimming-pool', 'helicopter']

def custombasename(fullname):
    return os.path.basename(os.path.splitext(fullname)[0])

def GetFileFromThisRootDir(dir,ext = None):
  allfiles = []
  needExtFilter = (ext != None)
  for root,dirs,files in os.walk(dir):
    for filespath in files:
      filepath = os.path.join(root, filespath)
      extension = os.path.splitext(filepath)[1][1:]
      if needExtFilter and extension in ext:
        allfiles.append(filepath)
      elif not needExtFilter:
        allfiles.append(filepath)
  return allfiles

def TuplePoly2Poly(poly):
    outpoly = [poly[0][0], poly[0][1],
                       poly[1][0], poly[1][1],
                       poly[2][0], poly[2][1],
                       poly[3][0], poly[3][1]
                       ]
    return outpoly

def parse_dota_poly(filename):
    """
        parse the dota ground truth in the format:
        [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
    """
    objects = []
    #print('filename:', filename)
    f = []
    if (sys.version_info >= (3, 5)):
        fd = open(filename, 'r')
        f = fd
    elif (sys.version_info >= 2.7):
        fd = codecs.open(filename, 'r')
        f = fd
    # count = 0
    while True:
        line = f.readline()
        # count = count + 1
        # if count < 2:
        #     continue
        if line:
            splitlines = line.strip().split(' ')
            object_struct = {}
            ### clear the wrong name after check all the data
            #if (len(splitlines) >= 9) and (splitlines[8] in classname):
            if (len(splitlines) < 9):
                continue
            if (len(splitlines) >= 9):
                    object_struct['name'] = splitlines[8]
            if (len(splitlines) == 9):
                object_struct['difficult'] = '0'
            elif (len(splitlines) >= 10):
                # if splitlines[9] == '1':
                # if (splitlines[9] == 'tr'):
                #     object_struct['difficult'] = '1'
                # else:
                object_struct['difficult'] = splitlines[9]
                # else:
                #     object_struct['difficult'] = 0
            object_struct['poly'] = [(float(splitlines[0]), float(splitlines[1])),
                                     (float(splitlines[2]), float(splitlines[3])),
                                     (float(splitlines[4]), float(splitlines[5])),
                                     (float(splitlines[6]), float(splitlines[7]))
                                     ]
            gtpoly = shgeo.Polygon(object_struct['poly'])
            object_struct['area'] = gtpoly.area
            # poly = list(map(lambda x:np.array(x), object_struct['poly']))
            # object_struct['long-axis'] = max(distance(poly[0], poly[1]), distance(poly[1], poly[2]))
            # object_struct['short-axis'] = min(distance(poly[0], poly[1]), distance(poly[1], poly[2]))
            # if (object_struct['long-axis'] < 15):
            #     object_struct['difficult'] = '1'
            #     global small_count
            #     small_count = small_count + 1
            objects.append(object_struct)
        else:
            break
    return objects

def parse_longsideformat(filename):  # filename=??.txt
    """
        parse the longsideformat ground truth in the format:
        objects[i] : [classid, x_c, y_c, longside, shortside, theta]
    """
    objects = []
    f = []
    if (sys.version_info >= (3, 5)):
        fd = open(filename, 'r')
        f = fd
    elif (sys.version_info >= 2.7):
        fd = codecs.open(filename, 'r')
        f = fd
    # count = 0
    while True:
        line = f.readline()
        if line:
            splitlines = line.strip().split(' ')
            object_struct = {}
            ### clear the wrong name after check all the data
            #if (len(splitlines) >= 9) and (splitlines[8] in classname):
            if (len(splitlines) < 6) or (len(splitlines) > 6):
                print('labels长度不为6,出现错误,与预定形式不符')
                continue
            object_struct = [int(splitlines[0]), float(splitlines[1]),
                             float(splitlines[2]), float(splitlines[3]),
                             float(splitlines[4]), float(splitlines[5])
                            ]
            objects.append(object_struct)
        else:
            break
    return objects

def parse_dota_poly2(filename):
    """
        parse the dota ground truth in the format:
        [x1, y1, x2, y2, x3, y3, x4, y4]
    """
    objects = parse_dota_poly(filename)
    for obj in objects:
        obj['poly'] = TuplePoly2Poly(obj['poly'])
        obj['poly'] = list(map(int, obj['poly']))
    return objects

def parse_dota_rec(filename):
    """
        parse the dota ground truth in the bounding box format:
        "xmin, ymin, xmax, ymax"
    """
    objects = parse_dota_poly(filename)
    for obj in objects:
        poly = obj['poly']
        bbox = dots4ToRec4(poly)
        obj['bndbox'] = bbox
    return objects
## bounding box transfer for varies format

def dots4ToRec4(poly):
    """
    求出poly四点的最小外接水平矩形
    @param poly: poly[4]  [x,y]
    @return: xmin,xmax,ymin,ymax
    """
    xmin, xmax, ymin, ymax = min(poly[0][0], min(poly[1][0], min(poly[2][0], poly[3][0]))), \
                            max(poly[0][0], max(poly[1][0], max(poly[2][0], poly[3][0]))), \
                             min(poly[0][1], min(poly[1][1], min(poly[2][1], poly[3][1]))), \
                             max(poly[0][1], max(poly[1][1], max(poly[2][1], poly[3][1])))
    return xmin, ymin, xmax, ymax
def dots4ToRec8(poly):
    xmin, ymin, xmax, ymax = dots4ToRec4(poly)
    return xmin, ymin, xmax, ymin, xmax, ymax, xmin, ymax
    #return dots2ToRec8(dots4ToRec4(poly))
def dots2ToRec8(rec):
    xmin, ymin, xmax, ymax = rec[0], rec[1], rec[2], rec[3]
    return xmin, ymin, xmax, ymin, xmax, ymax, xmin, ymax

def groundtruth2Task1(srcpath, dstpath):
    filelist = GetFileFromThisRootDir(srcpath)
    # names = [custombasename(x.strip())for x in filelist]
    filedict = {}
    for cls in wordname_15:
        fd = open(os.path.join(dstpath, 'Task1_') + cls + r'.txt', 'w')
        filedict[cls] = fd
    for filepath in filelist:
        objects = parse_dota_poly2(filepath)

        subname = custombasename(filepath)
        pattern2 = re.compile(r'__([\d+\.]+)__\d+___')
        rate = re.findall(pattern2, subname)[0]

        for obj in objects:
            category = obj['name']
            difficult = obj['difficult']
            poly = obj['poly']
            if difficult == '2':
                continue
            if rate == '0.5':
                outline = custombasename(filepath) + ' ' + '1' + ' ' + ' '.join(map(str, poly))
            elif rate == '1':
                outline = custombasename(filepath) + ' ' + '0.8' + ' ' + ' '.join(map(str, poly))
            elif rate == '2':
                outline = custombasename(filepath) + ' ' + '0.6' + ' ' + ' '.join(map(str, poly))

            filedict[category].write(outline + '\n')

def Task2groundtruth_poly(srcpath, dstpath):
    thresh = 0.1
    filedict = {}
    Tasklist = GetFileFromThisRootDir(srcpath, '.txt')

    for Taskfile in Tasklist:
        idname = custombasename(Taskfile).split('_')[-1]
        # idname = datamap_inverse[idname]
        f = open(Taskfile, 'r')
        lines = f.readlines()
        for line in lines:
            if len(line) == 0:
                continue
            # print('line:', line)
            splitline = line.strip().split(' ')
            filename = splitline[0]
            confidence = splitline[1]
            bbox = splitline[2:]
            if float(confidence) > thresh:
                if filename not in filedict:
                    # filedict[filename] = codecs.open(os.path.join(dstpath, filename + '.txt'), 'w', 'utf_16')
                    filedict[filename] = codecs.open(os.path.join(dstpath, filename + '.txt'), 'w')
                # poly = util.dots2ToRec8(bbox)
                poly = bbox
                #               filedict[filename].write(' '.join(poly) + ' ' + idname + '_' + str(round(float(confidence), 2)) + '\n')
            # print('idname:', idname)

            # filedict[filename].write(' '.join(poly) + ' ' + idname + '_' + str(round(float(confidence), 2)) + '\n')

                filedict[filename].write(' '.join(poly) + ' ' + idname + '\n')


def polygonToRotRectangle(bbox):
    """
    :param bbox: The polygon stored in format [x1, y1, x2, y2, x3, y3, x4, y4]
    :return: Rotated Rectangle in format [cx, cy, w, h, theta]
    """
    bbox = np.array(bbox,dtype=np.float32)
    bbox = np.reshape(bbox,newshape=(2,4),order='F')
    angle = math.atan2(-(bbox[0,1]-bbox[0,0]),bbox[1,1]-bbox[1,0])

    center = [[0],[0]]

    for i in range(4):
        center[0] += bbox[0,i]
        center[1] += bbox[1,i]

    center = np.array(center,dtype=np.float32)/4.0

    R = np.array([[math.cos(angle), -math.sin(angle)], [math.sin(angle), math.cos(angle)]], dtype=np.float32)

    normalized = np.matmul(R.transpose(),bbox-center)

    xmin = np.min(normalized[0,:])
    xmax = np.max(normalized[0,:])
    ymin = np.min(normalized[1,:])
    ymax = np.max(normalized[1,:])

    w = xmax - xmin + 1
    h = ymax - ymin + 1

    return [float(center[0]),float(center[1]),w,h,angle]

def cal_line_length(point1, point2):
    return math.sqrt( math.pow(point1[0] - point2[0], 2) + math.pow(point1[1] - point2[1], 2))

def get_best_begin_point(coordinate):
    x1 = coordinate[0][0]
    y1 = coordinate[0][1]
    x2 = coordinate[1][0]
    y2 = coordinate[1][1]
    x3 = coordinate[2][0]
    y3 = coordinate[2][1]
    x4 = coordinate[3][0]
    y4 = coordinate[3][1]
    xmin = min(x1, x2, x3, x4)
    ymin = min(y1, y2, y3, y4)
    xmax = max(x1, x2, x3, x4)
    ymax = max(y1, y2, y3, y4)
    combinate = [[[x1, y1], [x2, y2], [x3, y3], [x4, y4]], [[x2, y2], [x3, y3], [x4, y4], [x1, y1]],
                 [[x3, y3], [x4, y4], [x1, y1], [x2, y2]], [[x4, y4], [x1, y1], [x2, y2], [x3, y3]]]
    dst_coordinate = [[xmin, ymin], [xmax, ymin], [xmax, ymax], [xmin, ymax]]
    force = 100000000.0
    force_flag = 0
    for i in range(4):
        temp_force = cal_line_length(combinate[i][0], dst_coordinate[0]) + cal_line_length(combinate[i][1],
                                                                                           dst_coordinate[
                                                                                               1]) + cal_line_length(
            combinate[i][2], dst_coordinate[2]) + cal_line_length(combinate[i][3], dst_coordinate[3])
        if temp_force < force:
            force = temp_force
            force_flag = i
    if force_flag != 0:
        print("choose one direction!")
    return  combinate[force_flag]


def dots4ToRecC(poly, img_w, img_h):
    """
    求poly四点坐标的最小外接水平矩形,并返回yolo格式的矩形框表现形式xywh_center(归一化)
    @param poly: poly – poly[4] [x,y]
    @param img_w: 对应图像的width
    @param img_h: 对应图像的height
    @return: x_center,y_center,w,h(均归一化)
    """
    xmin, ymin, xmax, ymax = dots4ToRec4(poly)
    x = (xmin + xmax)/2
    y = (ymin + ymax)/2
    w = xmax - xmin
    h = ymax - ymin
    return x/img_w, y/img_h, w/img_w, h/img_h

================================================
FILE: evaluation_example/imgnamefile.txt
================================================
P0007
P0004
P0019
P0003


================================================
FILE: evaluation_example/result_classname/Task1_harbor.txt
================================================
P0019 0.64 2390.0 566.0 2381.0 380.0 2439.0 377.0 2448.0 563.0
P0019 0.626 5124.0 844.0 5058.0 844.0 5059.0 693.0 5125.0 693.0
P0019 0.609 1817.0 762.0 1759.0 759.0 1770.0 557.0 1828.0 560.0
P0019 0.604 718.0 2313.0 667.0 2299.0 695.0 2200.0 746.0 2214.0
P0019 0.596 4532.0 3283.0 4487.0 3281.0 4491.0 3190.0 4536.0 3192.0
P0019 0.591 3425.0 777.0 3390.0 770.0 3412.0 646.0 3447.0 653.0
P0019 0.586 5218.0 762.0 5178.0 759.0 5187.0 661.0 5227.0 664.0
P0019 0.586 4650.0 3320.0 4596.0 3313.0 4613.0 3193.0 4667.0 3200.0
P0019 0.579 4594.0 897.0 4585.0 757.0 4633.0 754.0 4642.0 894.0
P0019 0.566 3058.0 3462.0 3022.0 3459.0 3029.0 3351.0 3065.0 3354.0
P0019 0.565 3839.0 3406.0 3837.0 3286.0 3896.0 3285.0 3898.0 3405.0
P0019 0.562 3333.0 740.0 3279.0 734.0 3294.0 591.0 3348.0 597.0
P0019 0.562 5654.0 3545.0 5649.0 3433.0 5697.0 3430.0 5702.0 3542.0
P0019 0.562 2852.0 452.0 2820.0 450.0 2825.0 369.0 2857.0 371.0
P0019 0.561 3579.0 3487.0 3568.0 3366.0 3616.0 3362.0 3627.0 3483.0
P0019 0.561 478.0 2229.0 446.0 2211.0 505.0 2106.0 537.0 2124.0
P0019 0.546 1787.0 2727.0 1729.0 2704.0 1772.0 2594.0 1830.0 2617.0
P0019 0.541 4302.0 3275.0 4254.0 3274.0 4259.0 3160.0 4307.0 3161.0
P0019 0.538 1086.0 856.0 1042.0 752.0 1089.0 733.0 1133.0 837.0
P0019 0.533 4019.0 921.0 3951.0 909.0 3976.0 774.0 4044.0 786.0
P0019 0.527 5481.0 3570.0 5471.0 3365.0 5522.0 3363.0 5532.0 3568.0
P0019 0.523 359.0 1530.0 180.0 1514.0 184.0 1469.0 363.0 1485.0
P0019 0.523 391.0 1321.0 259.0 1273.0 278.0 1222.0 410.0 1270.0
P0019 0.51 5357.0 807.0 5319.0 802.0 5338.0 668.0 5376.0 673.0
P0019 0.508 469.0 1141.0 344.0 1059.0 370.0 1018.0 495.0 1100.0
P0019 0.508 2432.0 3107.0 2390.0 3096.0 2423.0 2964.0 2465.0 2975.0
P0019 0.507 6071.0 2214.0 6068.0 2152.0 6230.0 2143.0 6233.0 2205.0
P0019 0.505 6266.0 2873.0 6081.0 2866.0 6083.0 2822.0 6268.0 2829.0
P0019 0.499 6212.0 3122.0 6077.0 3056.0 6101.0 3007.0 6236.0 3073.0
P0019 0.491 6150.0 1772.0 5995.0 1771.0 5995.0 1703.0 6150.0 1704.0
P0019 0.489 3478.0 3490.0 3425.0 3485.0 3441.0 3303.0 3494.0 3308.0
P0019 0.486 6007.0 2058.0 6004.0 1992.0 6186.0 1983.0 6189.0 2049.0
P0019 0.48 5765.0 3464.0 5757.0 3340.0 5806.0 3337.0 5814.0 3461.0
P0019 0.475 206.0 1712.0 204.0 1674.0 353.0 1663.0 355.0 1701.0
P0019 0.468 6206.0 2640.0 6052.0 2635.0 6053.0 2587.0 6207.0 2592.0
P0019 0.467 842.0 854.0 818.0 852.0 827.0 717.0 851.0 719.0
P0019 0.444 577.0 2236.0 538.0 2210.0 586.0 2139.0 625.0 2165.0
P0019 0.442 5244.0 3470.0 5212.0 3470.0 5215.0 3355.0 5247.0 3355.0
P0019 0.438 574.0 997.0 464.0 886.0 483.0 868.0 593.0 979.0
P0019 0.436 3665.0 3463.0 3643.0 3410.0 3704.0 3386.0 3726.0 3439.0
P0019 0.419 4874.0 3361.0 4868.0 3260.0 4915.0 3258.0 4921.0 3359.0
P0019 0.379 3299.0 3501.0 3252.0 3476.0 3293.0 3394.0 3340.0 3419.0
P0019 0.376 4798.0 740.0 4795.0 693.0 4813.0 693.0 4816.0 740.0
P0019 0.364 635.0 899.0 602.0 767.0 656.0 754.0 689.0 886.0
P0019 0.362 1431.0 813.0 1397.0 813.0 1400.0 686.0 1434.0 686.0
P0019 0.357 378.0 2122.0 363.0 2099.0 441.0 2049.0 456.0 2072.0
P0019 0.336 961.0 832.0 935.0 830.0 942.0 733.0 968.0 735.0
P0019 0.333 4827.0 729.0 4825.0 700.0 4872.0 696.0 4874.0 725.0
P0019 0.332 5124.0 3471.0 5064.0 3470.0 5067.0 3332.0 5127.0 3333.0
P0019 0.312 1488.0 2551.0 1484.0 2470.0 1511.0 2468.0 1515.0 2549.0
P0019 0.296 2616.0 3222.0 2582.0 3210.0 2609.0 3133.0 2643.0 3145.0
P0019 0.277 5488.0 857.0 5460.0 850.0 5503.0 678.0 5531.0 685.0
P0019 0.271 6188.0 2434.0 6012.0 2430.0 6013.0 2405.0 6189.0 2409.0
P0019 0.27 2654.0 422.0 2639.0 420.0 2643.0 375.0 2658.0 377.0
P0019 0.265 6228.0 3266.0 5978.0 3221.0 5985.0 3177.0 6235.0 3222.0


================================================
FILE: evaluation_example/result_classname/Task1_large-vehicle.txt
================================================
P0007 0.724 1223.0 682.0 1073.0 573.0 1088.0 551.0 1238.0 660.0
P0007 0.722 957.0 688.0 924.0 686.0 934.0 513.0 967.0 515.0
P0007 0.721 854.0 1631.0 829.0 1610.0 945.0 1468.0 970.0 1489.0
P0007 0.714 1232.0 943.0 1103.0 823.0 1121.0 804.0 1250.0 924.0
P0007 0.701 1212.0 727.0 1067.0 609.0 1083.0 588.0 1228.0 706.0
P0007 0.693 1192.0 1022.0 1080.0 884.0 1101.0 867.0 1213.0 1005.0
P0007 0.69 1223.0 607.0 1066.0 509.0 1080.0 488.0 1237.0 586.0
P0007 0.679 1205.0 839.0 1066.0 723.0 1082.0 704.0 1221.0 820.0
P0007 0.675 1168.0 1259.0 1048.0 1146.0 1065.0 1128.0 1185.0 1241.0
P0007 0.675 1177.0 1232.0 1054.0 1095.0 1074.0 1077.0 1197.0 1214.0
P0007 0.672 1219.0 806.0 1078.0 695.0 1092.0 677.0 1233.0 788.0
P0007 0.671 965.0 483.0 939.0 482.0 948.0 308.0 974.0 309.0
P0007 0.669 1186.0 1069.0 1076.0 932.0 1095.0 916.0 1205.0 1053.0
P0007 0.666 1138.0 1632.0 966.0 1622.0 967.0 1599.0 1139.0 1609.0
P0007 0.666 849.0 1573.0 673.0 1564.0 674.0 1540.0 850.0 1549.0
P0007 0.649 997.0 485.0 966.0 485.0 970.0 304.0 1001.0 304.0
P0007 0.647 667.0 1424.0 493.0 1414.0 494.0 1391.0 668.0 1401.0
P0007 0.643 361.0 1289.0 183.0 1289.0 184.0 1264.0 362.0 1264.0
P0007 0.643 332.0 1854.0 153.0 1850.0 153.0 1825.0 332.0 1829.0
P0007 0.643 840.0 1661.0 664.0 1651.0 665.0 1626.0 841.0 1636.0
P0007 0.639 1235.0 344.0 1052.0 298.0 1058.0 275.0 1241.0 321.0
P0007 0.639 1157.0 1286.0 1027.0 1180.0 1044.0 1159.0 1174.0 1265.0
P0007 0.638 352.0 1379.0 174.0 1369.0 175.0 1344.0 353.0 1354.0
P0007 0.638 666.0 1538.0 488.0 1528.0 489.0 1505.0 667.0 1515.0
P0007 0.637 661.0 1594.0 481.0 1590.0 482.0 1565.0 662.0 1569.0
P0007 0.637 650.0 1647.0 474.0 1644.0 475.0 1620.0 651.0 1623.0
P0007 0.636 1151.0 1405.0 968.0 1395.0 970.0 1370.0 1153.0 1380.0
P0007 0.635 841.0 1630.0 660.0 1620.0 662.0 1595.0 843.0 1605.0
P0007 0.63 937.0 485.0 906.0 484.0 916.0 306.0 947.0 307.0
P0007 0.629 841.0 1514.0 673.0 1505.0 674.0 1483.0 842.0 1492.0
P0007 0.628 670.0 1480.0 491.0 1471.0 493.0 1447.0 672.0 1456.0
P0007 0.628 1197.0 1205.0 1069.0 1077.0 1086.0 1060.0 1214.0 1188.0
P0007 0.628 1145.0 1521.0 961.0 1511.0 962.0 1486.0 1146.0 1496.0
P0007 0.624 1081.0 1544.0 953.0 1542.0 954.0 1517.0 1082.0 1519.0
P0007 0.622 1191.0 1164.0 1070.0 1029.0 1088.0 1013.0 1209.0 1148.0
P0007 0.617 343.0 1666.0 161.0 1657.0 162.0 1633.0 344.0 1642.0
P0007 0.616 1152.0 1376.0 973.0 1367.0 975.0 1343.0 1154.0 1352.0
P0007 0.615 1248.0 258.0 1063.0 255.0 1063.0 231.0 1248.0 234.0
P0007 0.613 358.0 1348.0 175.0 1339.0 177.0 1315.0 360.0 1324.0
P0007 0.612 346.0 1549.0 168.0 1540.0 169.0 1518.0 347.0 1527.0
P0007 0.612 347.0 1522.0 167.0 1512.0 168.0 1489.0 348.0 1499.0
P0007 0.61 904.0 813.0 741.0 801.0 743.0 776.0 906.0 788.0
P0007 0.608 660.0 1676.0 481.0 1673.0 481.0 1649.0 660.0 1652.0
P0007 0.607 1135.0 1694.0 957.0 1684.0 958.0 1659.0 1136.0 1669.0
P0007 0.606 913.0 855.0 738.0 846.0 740.0 823.0 915.0 831.0
P0007 0.606 845.0 1485.0 667.0 1476.0 668.0 1452.0 846.0 1461.0
P0007 0.605 334.0 1809.0 158.0 1805.0 159.0 1782.0 335.0 1786.0
P0007 0.605 1145.0 1462.0 965.0 1453.0 966.0 1429.0 1146.0 1438.0
P0007 0.605 1248.0 294.0 1057.0 280.0 1059.0 255.0 1250.0 269.0
P0007 0.604 665.0 1567.0 488.0 1557.0 490.0 1532.0 667.0 1542.0
P0007 0.603 342.0 1435.0 172.0 1425.0 173.0 1402.0 343.0 1412.0
P0007 0.601 1243.0 445.0 1069.0 391.0 1076.0 368.0 1250.0 422.0
P0007 0.6 569.0 1037.0 380.0 1037.0 380.0 1006.0 569.0 1006.0
P0007 0.599 349.0 1404.0 171.0 1395.0 172.0 1371.0 350.0 1380.0
P0007 0.594 886.0 479.0 859.0 478.0 865.0 340.0 892.0 341.0
P0007 0.592 884.0 657.0 856.0 655.0 863.0 532.0 891.0 534.0
P0007 0.591 905.0 1124.0 743.0 1123.0 744.0 1097.0 906.0 1098.0
P0007 0.59 841.0 1456.0 667.0 1447.0 668.0 1423.0 842.0 1432.0
P0007 0.587 851.0 1370.0 676.0 1370.0 676.0 1347.0 851.0 1347.0
P0007 0.587 1137.0 1661.0 957.0 1651.0 958.0 1628.0 1138.0 1638.0
P0007 0.586 1248.0 229.0 1064.0 229.0 1065.0 204.0 1249.0 204.0
P0007 0.584 902.0 897.0 743.0 888.0 745.0 864.0 904.0 873.0
P0007 0.583 332.0 1578.0 176.0 1569.0 177.0 1547.0 333.0 1556.0
P0007 0.581 1198.0 973.0 1084.0 846.0 1105.0 828.0 1219.0 955.0
P0007 0.578 1414.0 1203.0 1389.0 1201.0 1393.0 1112.0 1418.0 1114.0
P0007 0.571 850.0 1398.0 680.0 1397.0 681.0 1373.0 851.0 1374.0
P0007 0.569 341.0 1695.0 157.0 1685.0 158.0 1662.0 342.0 1672.0
P0007 0.562 1236.0 379.0 1055.0 330.0 1061.0 306.0 1242.0 355.0
P0007 0.561 838.0 1718.0 652.0 1707.0 653.0 1681.0 839.0 1692.0
P0007 0.558 1226.0 498.0 1078.0 453.0 1085.0 433.0 1233.0 478.0
P0007 0.558 1148.0 1605.0 964.0 1595.0 965.0 1572.0 1149.0 1582.0
P0007 0.557 345.0 1462.0 171.0 1456.0 172.0 1433.0 346.0 1439.0
P0007 0.549 1180.0 160.0 1075.0 153.0 1077.0 129.0 1182.0 136.0
P0007 0.548 686.0 1367.0 491.0 1364.0 491.0 1340.0 686.0 1343.0
P0007 0.545 1150.0 1436.0 966.0 1426.0 967.0 1401.0 1151.0 1411.0
P0007 0.543 681.0 1397.0 495.0 1387.0 496.0 1364.0 682.0 1374.0
P0007 0.543 845.0 1342.0 659.0 1339.0 660.0 1315.0 846.0 1318.0
P0007 0.542 347.0 1491.0 169.0 1482.0 170.0 1460.0 348.0 1469.0
P0007 0.537 655.0 1623.0 473.0 1616.0 474.0 1594.0 656.0 1601.0
P0007 0.536 1249.0 199.0 1067.0 199.0 1068.0 174.0 1250.0 174.0
P0007 0.535 340.0 1719.0 152.0 1712.0 153.0 1688.0 341.0 1695.0
P0007 0.535 1212.0 765.0 1081.0 659.0 1095.0 642.0 1226.0 748.0
P0007 0.532 1197.0 1122.0 1072.0 997.0 1088.0 981.0 1213.0 1106.0
P0007 0.525 657.0 1709.0 473.0 1700.0 474.0 1674.0 658.0 1683.0
P0007 0.525 283.0 447.0 218.0 442.0 220.0 420.0 285.0 425.0
P0007 0.524 330.0 1605.0 162.0 1595.0 163.0 1572.0 331.0 1582.0
P0007 0.521 1126.0 1843.0 956.0 1834.0 957.0 1810.0 1127.0 1819.0
P0007 0.52 1135.0 1811.0 941.0 1800.0 942.0 1772.0 1136.0 1783.0
P0007 0.519 850.0 1090.0 838.0 1057.0 1017.0 995.0 1029.0 1028.0
P0007 0.518 1153.0 1349.0 972.0 1336.0 974.0 1312.0 1155.0 1325.0
P0007 0.512 1040.0 792.0 1000.0 792.0 1001.0 637.0 1041.0 637.0
P0007 0.503 666.0 1505.0 488.0 1502.0 489.0 1480.0 667.0 1483.0
P0007 0.492 1082.0 1573.0 948.0 1569.0 949.0 1544.0 1083.0 1548.0
P0007 0.479 555.0 1734.0 476.0 1733.0 476.0 1707.0 555.0 1708.0
P0007 0.475 344.0 1640.0 165.0 1630.0 167.0 1605.0 346.0 1615.0
P0007 0.473 362.0 1265.0 184.0 1256.0 185.0 1232.0 363.0 1241.0
P0007 0.471 334.0 1779.0 155.0 1778.0 155.0 1754.0 334.0 1755.0
P0007 0.468 696.0 1739.0 607.0 1735.0 609.0 1710.0 698.0 1714.0
P0007 0.468 1240.0 472.0 1064.0 418.0 1071.0 397.0 1247.0 451.0
P0007 0.467 1386.0 1197.0 1361.0 1195.0 1367.0 1114.0 1392.0 1116.0
P0007 0.466 796.0 1769.0 713.0 1765.0 715.0 1740.0 798.0 1744.0
P0007 0.449 1137.0 1781.0 945.0 1771.0 946.0 1746.0 1138.0 1756.0
P0007 0.439 639.0 766.0 543.0 760.0 544.0 739.0 640.0 745.0
P0007 0.427 628.0 958.0 526.0 955.0 527.0 933.0 629.0 936.0
P0007 0.426 56.0 1919.0 29.0 1916.0 37.0 1816.0 64.0 1819.0
P0007 0.425 359.0 1320.0 183.0 1310.0 184.0 1287.0 360.0 1297.0
P0007 0.387 704.0 194.0 678.0 192.0 683.0 127.0 709.0 129.0
P0007 0.36 287.0 1875.0 155.0 1875.0 156.0 1854.0 288.0 1854.0
P0007 0.334 834.0 394.0 832.0 331.0 855.0 331.0 857.0 394.0
P0007 0.327 294.0 1752.0 155.0 1742.0 157.0 1719.0 296.0 1729.0
P0007 0.306 489.0 198.0 467.0 198.0 468.0 155.0 490.0 155.0
P0007 0.294 1100.0 1714.0 1030.0 1714.0 1031.0 1693.0 1101.0 1693.0
P0007 0.285 555.0 194.0 527.0 193.0 530.0 129.0 558.0 130.0
P0007 0.281 1069.0 1747.0 961.0 1744.0 962.0 1718.0 1070.0 1721.0
P0007 0.275 617.0 192.0 592.0 191.0 596.0 135.0 621.0 136.0
P0007 0.26 654.0 193.0 628.0 191.0 633.0 126.0 659.0 128.0
P0007 0.258 623.0 1118.0 509.0 1113.0 510.0 1087.0 624.0 1092.0
P0007 0.254 734.0 189.0 708.0 187.0 713.0 122.0 739.0 124.0
P0003 0.713 301.0 524.0 211.0 474.0 224.0 453.0 314.0 503.0
P0003 0.711 573.0 329.0 552.0 229.0 576.0 224.0 597.0 324.0
P0003 0.701 659.0 309.0 638.0 209.0 662.0 204.0 683.0 304.0
P0003 0.7 398.0 358.0 378.0 256.0 403.0 251.0 423.0 353.0
P0003 0.693 539.0 333.0 522.0 234.0 546.0 230.0 563.0 329.0
P0003 0.688 769.0 574.0 762.0 550.0 860.0 521.0 867.0 545.0
P0003 0.688 499.0 342.0 475.0 239.0 498.0 233.0 522.0 336.0
P0003 0.668 372.0 365.0 351.0 265.0 375.0 260.0 396.0 360.0
P0003 0.662 779.0 903.0 754.0 901.0 758.0 814.0 783.0 816.0
P0003 0.661 602.0 325.0 582.0 221.0 607.0 216.0 627.0 320.0
P0003 0.648 339.0 362.0 320.0 272.0 344.0 267.0 363.0 357.0
P0003 0.646 323.0 629.0 226.0 575.0 238.0 554.0 335.0 608.0
P0003 0.646 817.0 899.0 810.0 798.0 836.0 796.0 843.0 897.0
P0003 0.636 306.0 356.0 290.0 272.0 313.0 267.0 329.0 351.0
P0003 0.622 328.0 664.0 229.0 612.0 241.0 591.0 340.0 643.0
P0003 0.604 635.0 523.0 572.0 518.0 574.0 494.0 637.0 499.0
P0003 0.592 629.0 606.0 531.0 606.0 532.0 581.0 630.0 581.0
P0003 0.582 240.0 329.0 190.0 300.0 201.0 280.0 251.0 309.0
P0003 0.566 537.0 488.0 473.0 487.0 474.0 463.0 538.0 464.0
P0003 0.562 239.0 390.0 188.0 364.0 198.0 343.0 249.0 369.0
P0003 0.551 255.0 462.0 202.0 437.0 212.0 415.0 265.0 440.0
P0003 0.545 247.0 429.0 197.0 401.0 208.0 380.0 258.0 408.0
P0003 0.54 331.0 850.0 272.0 844.0 274.0 821.0 333.0 827.0
P0003 0.532 317.0 822.0 265.0 794.0 276.0 773.0 328.0 801.0
P0003 0.527 790.0 894.0 786.0 832.0 811.0 831.0 815.0 893.0
P0003 0.505 838.0 628.0 828.0 606.0 883.0 583.0 893.0 605.0
P0003 0.493 692.0 960.0 631.0 958.0 631.0 935.0 692.0 937.0
P0003 0.488 624.0 549.0 566.0 549.0 567.0 526.0 625.0 526.0
P0003 0.487 500.0 550.0 499.0 524.0 561.0 521.0 562.0 547.0
P0003 0.464 548.0 517.0 486.0 516.0 487.0 492.0 549.0 493.0
P0003 0.463 659.0 575.0 597.0 575.0 598.0 552.0 660.0 552.0
P0003 0.443 304.0 709.0 252.0 684.0 261.0 664.0 313.0 689.0
P0003 0.412 181.0 275.0 157.0 161.0 182.0 156.0 206.0 270.0
P0003 0.38 868.0 904.0 843.0 902.0 847.0 843.0 872.0 845.0
P0003 0.377 737.0 906.0 714.0 905.0 718.0 849.0 741.0 850.0
P0003 0.325 5.0 885.0 4.0 865.0 44.0 862.0 45.0 882.0
P0003 0.306 157.0 89.0 142.0 5.0 168.0 0.0 183.0 84.0
P0003 0.288 305.0 782.0 265.0 759.0 276.0 739.0 316.0 762.0
P0003 0.281 231.0 264.0 221.0 207.0 244.0 203.0 254.0 260.0
P0003 0.253 236.0 77.0 222.0 6.0 253.0 0.0 267.0 71.0
P0004 0.695 511.0 918.0 510.0 895.0 594.0 889.0 595.0 912.0
P0004 0.626 152.0 523.0 148.0 501.0 257.0 480.0 261.0 502.0
P0004 0.619 620.0 574.0 488.0 565.0 489.0 543.0 621.0 552.0
P0004 0.617 607.0 526.0 507.0 518.0 508.0 497.0 608.0 505.0
P0004 0.612 624.0 500.0 508.0 499.0 509.0 477.0 625.0 478.0
P0004 0.611 337.0 1352.0 303.0 1351.0 306.0 1179.0 340.0 1180.0
P0004 0.611 457.0 954.0 455.0 930.0 626.0 919.0 628.0 943.0
P0004 0.61 434.0 1183.0 432.0 1161.0 561.0 1152.0 563.0 1174.0
P0004 0.606 167.0 678.0 167.0 656.0 286.0 655.0 286.0 677.0
P0004 0.6 519.0 475.0 518.0 454.0 602.0 452.0 603.0 473.0
P0004 0.577 515.0 196.0 497.0 181.0 560.0 107.0 578.0 122.0
P0004 0.577 141.0 469.0 137.0 445.0 258.0 425.0 262.0 448.0
P0004 0.555 604.0 1291.0 471.0 1291.0 471.0 1268.0 604.0 1268.0
P0004 0.545 174.0 605.0 173.0 583.0 271.0 578.0 272.0 600.0
P0004 0.543 247.0 187.0 232.0 91.0 256.0 88.0 271.0 184.0
P0004 0.542 480.0 1259.0 479.0 1237.0 579.0 1234.0 580.0 1256.0
P0004 0.54 274.0 758.0 156.0 757.0 157.0 735.0 275.0 736.0
P0004 0.535 148.0 1024.0 147.0 1003.0 277.0 1001.0 278.0 1022.0
P0004 0.534 133.0 500.0 129.0 477.0 256.0 455.0 260.0 478.0
P0004 0.529 381.0 685.0 356.0 682.0 366.0 586.0 391.0 589.0
P0004 0.528 151.0 580.0 146.0 558.0 262.0 531.0 267.0 553.0
P0004 0.527 612.0 548.0 507.0 541.0 509.0 521.0 614.0 528.0
P0004 0.527 629.0 622.0 500.0 613.0 502.0 591.0 631.0 600.0
P0004 0.526 167.0 440.0 164.0 418.0 260.0 405.0 263.0 427.0
P0004 0.525 163.0 548.0 159.0 526.0 260.0 505.0 264.0 527.0
P0004 0.505 606.0 686.0 523.0 680.0 525.0 657.0 608.0 663.0
P0004 0.505 148.0 393.0 145.0 372.0 243.0 356.0 246.0 377.0
P0004 0.502 146.0 415.0 143.0 394.0 241.0 382.0 244.0 403.0
P0004 0.501 376.0 710.0 319.0 710.0 319.0 689.0 376.0 689.0
P0004 0.498 479.0 1108.0 477.0 1087.0 596.0 1079.0 598.0 1100.0
P0004 0.483 125.0 325.0 123.0 304.0 222.0 290.0 224.0 311.0
P0004 0.483 271.0 878.0 150.0 878.0 150.0 857.0 271.0 857.0
P0004 0.48 156.0 830.0 155.0 810.0 275.0 803.0 276.0 823.0
P0004 0.478 155.0 633.0 154.0 612.0 272.0 604.0 273.0 625.0
P0004 0.477 150.0 951.0 149.0 930.0 279.0 924.0 280.0 945.0
P0004 0.475 415.0 186.0 412.0 90.0 434.0 89.0 437.0 185.0
P0004 0.474 481.0 1081.0 479.0 1059.0 606.0 1050.0 608.0 1072.0
P0004 0.471 327.0 181.0 312.0 84.0 334.0 80.0 349.0 177.0
P0004 0.469 511.0 223.0 507.0 200.0 620.0 182.0 624.0 205.0
P0004 0.468 149.0 1047.0 148.0 1026.0 278.0 1024.0 279.0 1045.0
P0004 0.462 150.0 999.0 150.0 978.0 279.0 976.0 279.0 997.0
P0004 0.454 155.0 977.0 154.0 956.0 282.0 950.0 283.0 971.0
P0004 0.451 158.0 804.0 157.0 784.0 273.0 779.0 274.0 799.0
P0004 0.451 138.0 368.0 136.0 347.0 239.0 335.0 241.0 356.0
P0004 0.448 391.0 186.0 384.0 90.0 406.0 89.0 413.0 185.0
P0004 0.438 491.0 1204.0 489.0 1183.0 620.0 1175.0 622.0 1196.0
P0004 0.43 516.0 452.0 515.0 431.0 627.0 425.0 628.0 446.0
P0004 0.423 260.0 714.0 148.0 713.0 149.0 691.0 261.0 692.0
P0004 0.422 152.0 1204.0 151.0 1182.0 283.0 1173.0 284.0 1195.0
P0004 0.421 509.0 428.0 508.0 406.0 636.0 399.0 637.0 421.0
P0004 0.42 286.0 183.0 272.0 87.0 293.0 84.0 307.0 180.0
P0004 0.412 167.0 653.0 166.0 634.0 274.0 628.0 275.0 647.0
P0004 0.411 102.0 979.0 98.0 924.0 119.0 922.0 123.0 977.0
P0004 0.409 149.0 927.0 148.0 907.0 278.0 900.0 279.0 920.0
P0004 0.408 156.0 1124.0 155.0 1103.0 285.0 1095.0 286.0
Download .txt
gitextract_2jlkibz9/

├── .idea/
│   ├── .gitignore
│   ├── DOTA_devkit-master.iml
│   ├── encodings.xml
│   ├── inspectionProfiles/
│   │   ├── Project_Default.xml
│   │   └── profiles_settings.xml
│   ├── misc.xml
│   └── modules.xml
├── .polyiou.cpp.swp
├── DOTA.py
├── DOTA2COCO.py
├── DOTA_demo/
│   └── labelTxt/
│       ├── P0003.txt
│       ├── P0004.txt
│       ├── P0005.txt
│       └── P1478__1__853___962.txt
├── Draw_DOTA_YOLO.py
├── ImgSplit.py
├── ImgSplit_multi_process.py
├── README.md
├── ResultMerge.py
├── ResultMerge_example/
│   └── 1.txt
├── ResultMerge_multi_process.py
├── SplitOnlyImage.py
├── SplitOnlyImage_multi_process.py
├── YOLO_Transform.py
├── build/
│   ├── temp.linux-x86_64-3.8/
│   │   ├── polyiou.o
│   │   └── polyiou_wrap.o
│   └── temp.win-amd64-3.8/
│       └── Release/
│           └── polyiou_wrap.obj
├── demo.ipynb
├── dota-v1.5_evaluation_task1.py
├── dota-v1.5_evaluation_task2.py
├── dota_evaluation_task1.py
├── dota_evaluation_task2.py
├── dota_utils.py
├── evaluation_example/
│   ├── imgnamefile.txt
│   ├── result_classname/
│   │   ├── Task1_harbor.txt
│   │   ├── Task1_large-vehicle.txt
│   │   ├── Task1_ship.txt
│   │   └── Task1_small-vehicle.txt
│   └── row_DOTA_labels/
│       ├── P0003.txt
│       ├── P0004.txt
│       ├── P0007.txt
│       └── P0019.txt
├── example/
│   └── labelTxt/
│       ├── P0706.txt
│       ├── P0770.txt
│       └── P1088.txt
├── poly_nms_gpu/
│   ├── Makefile
│   ├── __init__.py
│   ├── nms_wrapper.py
│   ├── poly_nms.hpp
│   ├── poly_nms.pyx
│   ├── poly_nms_kernel.cu
│   ├── poly_nms_test.py
│   ├── poly_overlaps.hpp
│   ├── poly_overlaps.pyx
│   ├── poly_overlaps_kernel.cu
│   └── setup.py
├── polyiou.cpp
├── polyiou.h
├── polyiou.i
├── polyiou.py
├── polyiou_wrap.cxx
├── requirements.txt
└── setup.py
Download .txt
Showing preview only (212K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (597 symbols across 20 files)

FILE: DOTA.py
  function _isArrayLike (line 15) | def _isArrayLike(obj):
  class DOTA (line 20) | class DOTA:
    method __init__ (line 21) | def __init__(self, basepath):
    method createIndex (line 31) | def createIndex(self):
    method getImgIds (line 40) | def getImgIds(self, catNms=[]):
    method loadAnns (line 58) | def loadAnns(self, catNms=[], imgId = None, difficult=None):
    method showAnns (line 70) | def showAnns(self, objects, imgId, range):
    method loadImgs (line 102) | def loadImgs(self, imgids=[]):

FILE: DOTA2COCO.py
  function DOTA2COCO (line 9) | def DOTA2COCO(srcpath, destfile):

FILE: Draw_DOTA_YOLO.py
  function rotateAugment (line 18) | def rotateAugment(angle, scale, image, labels):
  function drawLongsideFormatImg (line 89) | def drawLongsideFormatImg(imgpath, txtpath, dstpath, extractclassname, t...

FILE: ImgSplit.py
  function choose_best_pointorder_fit_another (line 11) | def choose_best_pointorder_fit_another(poly1, poly2):
  function cal_line_length (line 30) | def cal_line_length(point1, point2):
  class splitbase (line 34) | class splitbase():
    method __init__ (line 35) | def __init__(self,
    method polyorig2sub (line 78) | def polyorig2sub(self, left, up, poly):
    method calchalf_iou (line 85) | def calchalf_iou(self, poly1, poly2):
    method saveimagepatches (line 95) | def saveimagepatches(self, img, subimgname, left, up):
    method GetPoly4FromPoly5 (line 100) | def GetPoly4FromPoly5(self, poly):
    method savepatches (line 122) | def savepatches(self, resizeimg, objects, subimgname, left, up, right,...
    method SplitSingle (line 185) | def SplitSingle(self, name, rate, extent):
    method splitdata (line 232) | def splitdata(self, rate):

FILE: ImgSplit_multi_process.py
  function choose_best_pointorder_fit_another (line 19) | def choose_best_pointorder_fit_another(poly1, poly2):
  function cal_line_length (line 38) | def cal_line_length(point1, point2):
  function split_single_warp (line 42) | def split_single_warp(name, split_base, rate, extent):
  class splitbase (line 45) | class splitbase():
    method __init__ (line 46) | def __init__(self,
    method polyorig2sub (line 101) | def polyorig2sub(self, left, up, poly):
    method calchalf_iou (line 108) | def calchalf_iou(self, poly1, poly2):
    method saveimagepatches (line 118) | def saveimagepatches(self, img, subimgname, left, up):
    method GetPoly4FromPoly5 (line 129) | def GetPoly4FromPoly5(self, poly):
    method savepatches (line 151) | def savepatches(self, resizeimg, objects, subimgname, left, up, right,...
    method SplitSingle (line 214) | def SplitSingle(self, name, rate, extent):
    method splitdata (line 261) | def splitdata(self, rate):
    method __getstate__ (line 276) | def __getstate__(self):
    method __setstate__ (line 281) | def __setstate__(self, state):

FILE: ResultMerge.py
  function py_cpu_nms_poly (line 18) | def py_cpu_nms_poly(dets, thresh):
  function py_cpu_nms (line 51) | def py_cpu_nms(dets, thresh):
  function nmsbynamedict (line 83) | def nmsbynamedict(nameboxdict, nms, thresh):
  function poly2origpoly (line 112) | def poly2origpoly(poly, x, y, rate):
  function mergebase (line 121) | def mergebase(srcpath, dstpath, nms):
  function mergebyrec (line 173) | def mergebyrec(srcpath, dstpath):
  function mergebypoly (line 184) | def mergebypoly(srcpath, dstpath):

FILE: ResultMerge_multi_process.py
  function py_cpu_nms_poly (line 26) | def py_cpu_nms_poly(dets, thresh):
  function py_cpu_nms_poly_fast (line 63) | def py_cpu_nms_poly_fast(dets, thresh):
  function py_cpu_nms (line 126) | def py_cpu_nms(dets, thresh):
  function nmsbynamedict (line 159) | def nmsbynamedict(nameboxdict, nms, thresh):
  function poly2origpoly (line 176) | def poly2origpoly(poly, x, y, rate):
  function mergesingle (line 185) | def mergesingle(dstpath, nms, fullname):
  function mergebase_parallel (line 227) | def mergebase_parallel(srcpath, dstpath, nms):
  function mergebase (line 241) | def mergebase(srcpath, dstpath, nms):
  function mergebyrec (line 246) | def mergebyrec(srcpath, dstpath):
  function mergebypoly (line 257) | def mergebypoly(srcpath, dstpath):

FILE: SplitOnlyImage.py
  class splitbase (line 7) | class splitbase():
    method __init__ (line 8) | def __init__(self,
    method saveimagepatches (line 22) | def saveimagepatches(self, img, subimgname, left, up, ext='.png'):
    method SplitSingle (line 27) | def SplitSingle(self, name, rate, extent):
    method splitdata (line 59) | def splitdata(self, rate):

FILE: SplitOnlyImage_multi_process.py
  function split_single_warp (line 10) | def split_single_warp(name, split_base, rate, extent):
  class splitbase (line 12) | class splitbase():
    method __init__ (line 13) | def __init__(self,
    method saveimagepatches (line 35) | def saveimagepatches(self, img, subimgname, left, up, ext='.png'):
    method SplitSingle (line 46) | def SplitSingle(self, name, rate, extent):
    method splitdata (line 81) | def splitdata(self, rate):
    method __getstate__ (line 92) | def __getstate__(self):
    method __setstate__ (line 97) | def __setstate__(self, state):

FILE: YOLO_Transform.py
  function dota2Darknet (line 15) | def dota2Darknet(imgpath, txtpath, dstpath, extractclassname):
  function dota2LongSideFormat (line 59) | def dota2LongSideFormat(imgpath, txtpath, dstpath, extractclassname):
  function cvminAreaRect2longsideformat (line 155) | def cvminAreaRect2longsideformat(x_c, y_c, width, height, theta):
  function drawLongsideFormatimg (line 211) | def drawLongsideFormatimg(imgpath, txtpath, dstpath, extractclassname, t...
  function longsideformat2cvminAreaRect (line 259) | def longsideformat2cvminAreaRect(x_c, y_c, longside, shortside, theta_lo...
  function delete (line 291) | def delete(imgpath, txtpath):

FILE: dota-v1.5_evaluation_task1.py
  function parse_gt (line 22) | def parse_gt(filename):
  function voc_ap (line 56) | def voc_ap(rec, prec, use_07_metric=False):
  function voc_eval (line 90) | def voc_eval(detpath,
  function main (line 262) | def main():

FILE: dota-v1.5_evaluation_task2.py
  function parse_gt (line 19) | def parse_gt(filename):
  function voc_ap (line 45) | def voc_ap(rec, prec, use_07_metric=False):
  function voc_eval (line 78) | def voc_eval(detpath,
  function main (line 231) | def main():

FILE: dota_evaluation_task1.py
  function parse_gt (line 21) | def parse_gt(filename):
  function voc_ap (line 54) | def voc_ap(rec, prec, use_07_metric=False):
  function voc_eval (line 88) | def voc_eval(detpath,
  function main (line 272) | def main():

FILE: dota_evaluation_task2.py
  function parse_gt (line 19) | def parse_gt(filename):
  function voc_ap (line 45) | def voc_ap(rec, prec, use_07_metric=False):
  function voc_eval (line 78) | def voc_eval(detpath,
  function main (line 231) | def main():

FILE: dota_utils.py
  function custombasename (line 21) | def custombasename(fullname):
  function GetFileFromThisRootDir (line 24) | def GetFileFromThisRootDir(dir,ext = None):
  function TuplePoly2Poly (line 37) | def TuplePoly2Poly(poly):
  function parse_dota_poly (line 45) | def parse_dota_poly(filename):
  function parse_longsideformat (line 103) | def parse_longsideformat(filename):  # filename=??.txt
  function parse_dota_poly2 (line 136) | def parse_dota_poly2(filename):
  function parse_dota_rec (line 147) | def parse_dota_rec(filename):
  function dots4ToRec4 (line 160) | def dots4ToRec4(poly):
  function dots4ToRec8 (line 171) | def dots4ToRec8(poly):
  function dots2ToRec8 (line 175) | def dots2ToRec8(rec):
  function groundtruth2Task1 (line 179) | def groundtruth2Task1(srcpath, dstpath):
  function Task2groundtruth_poly (line 208) | def Task2groundtruth_poly(srcpath, dstpath):
  function polygonToRotRectangle (line 240) | def polygonToRotRectangle(bbox):
  function cal_line_length (line 271) | def cal_line_length(point1, point2):
  function get_best_begin_point (line 274) | def get_best_begin_point(coordinate):
  function dots4ToRecC (line 305) | def dots4ToRecC(poly, img_w, img_h):

FILE: poly_nms_gpu/nms_wrapper.py
  function poly_nms_gpu (line 11) | def poly_nms_gpu(dets, thresh, force_cpu=False):

FILE: poly_nms_gpu/setup.py
  function find_in_path (line 12) | def find_in_path(name, path):
  function locate_cuda (line 23) | def locate_cuda():
  function customize_compiler_for_nvcc (line 67) | def customize_compiler_for_nvcc(self):
  class custom_build_ext (line 106) | class custom_build_ext(build_ext):
    method build_extensions (line 107) | def build_extensions(self):

FILE: polyiou.cpp
  function sig (line 10) | int sig(double d){
  type Point (line 13) | struct Point{
    method Point (line 14) | Point(){}
    method Point (line 15) | Point(double x,double y):x(x),y(y){}
  function cross (line 20) | double cross(Point o,Point a,Point b){//叉积
  function area (line 23) | double area(Point* ps,int n){
  function lineCross (line 31) | int lineCross(Point a,Point b,Point c,Point d,Point&p){
  function polygon_cut (line 58) | void polygon_cut(Point*p,int&n,Point a,Point b, Point* pp){
  function intersectArea (line 74) | double intersectArea(Point a,Point b,Point c,Point d){
  function intersectArea (line 91) | double intersectArea(Point*ps1,int n1,Point*ps2,int n2){
  function iou_poly (line 108) | double iou_poly(vector<double> p, vector<double> q) {

FILE: polyiou.py
  function swig_import_helper (line 13) | def swig_import_helper():
  function _swig_setattr_nondynamic (line 39) | def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
  function _swig_setattr (line 58) | def _swig_setattr(self, class_type, name, value):
  function _swig_getattr_nondynamic (line 62) | def _swig_getattr_nondynamic(self, class_type, name, static=1):
  function _swig_getattr (line 73) | def _swig_getattr(self, class_type, name):
  function _swig_repr (line 77) | def _swig_repr(self):
  class _object (line 88) | class _object:
  class SwigPyIterator (line 93) | class SwigPyIterator(_object):
    method __init__ (line 99) | def __init__(self, *args, **kwargs):
    method value (line 105) | def value(self):
    method incr (line 108) | def incr(self, n=1):
    method decr (line 111) | def decr(self, n=1):
    method distance (line 114) | def distance(self, x):
    method equal (line 117) | def equal(self, x):
    method copy (line 120) | def copy(self):
    method next (line 123) | def next(self):
    method __next__ (line 126) | def __next__(self):
    method previous (line 129) | def previous(self):
    method advance (line 132) | def advance(self, n):
    method __eq__ (line 135) | def __eq__(self, x):
    method __ne__ (line 138) | def __ne__(self, x):
    method __iadd__ (line 141) | def __iadd__(self, n):
    method __isub__ (line 144) | def __isub__(self, n):
    method __add__ (line 147) | def __add__(self, n):
    method __sub__ (line 150) | def __sub__(self, *args):
    method __iter__ (line 152) | def __iter__(self):
  class VectorDouble (line 157) | class VectorDouble(_object):
    method iterator (line 164) | def iterator(self):
    method __iter__ (line 166) | def __iter__(self):
    method __nonzero__ (line 169) | def __nonzero__(self):
    method __bool__ (line 172) | def __bool__(self):
    method __len__ (line 175) | def __len__(self):
    method __getslice__ (line 178) | def __getslice__(self, i, j):
    method __setslice__ (line 181) | def __setslice__(self, *args):
    method __delslice__ (line 184) | def __delslice__(self, i, j):
    method __delitem__ (line 187) | def __delitem__(self, *args):
    method __getitem__ (line 190) | def __getitem__(self, *args):
    method __setitem__ (line 193) | def __setitem__(self, *args):
    method pop (line 196) | def pop(self):
    method append (line 199) | def append(self, x):
    method empty (line 202) | def empty(self):
    method size (line 205) | def size(self):
    method swap (line 208) | def swap(self, v):
    method begin (line 211) | def begin(self):
    method end (line 214) | def end(self):
    method rbegin (line 217) | def rbegin(self):
    method rend (line 220) | def rend(self):
    method clear (line 223) | def clear(self):
    method get_allocator (line 226) | def get_allocator(self):
    method pop_back (line 229) | def pop_back(self):
    method erase (line 232) | def erase(self, *args):
    method __init__ (line 235) | def __init__(self, *args):
    method push_back (line 242) | def push_back(self, x):
    method front (line 245) | def front(self):
    method back (line 248) | def back(self):
    method assign (line 251) | def assign(self, n, x):
    method resize (line 254) | def resize(self, *args):
    method insert (line 257) | def insert(self, *args):
    method reserve (line 260) | def reserve(self, n):
    method capacity (line 263) | def capacity(self):
  function iou_poly (line 271) | def iou_poly(p, q):

FILE: polyiou_wrap.cxx
  class SwigValueWrapper (line 21) | class SwigValueWrapper {
    type SwigMovePointer (line 22) | struct SwigMovePointer {
      method SwigMovePointer (line 24) | SwigMovePointer(T *p) : ptr(p) { }
      method SwigMovePointer (line 26) | SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ...
    method SwigValueWrapper (line 31) | SwigValueWrapper() : pointer(0) { }
    method SwigValueWrapper (line 32) | SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)...
    method T (line 34) | T *operator&() { return pointer.ptr; }
  function T (line 37) | T SwigValueInit() {
  function SWIGINTERNINLINE (line 337) | SWIGINTERNINLINE int SWIG_AddCast(int r) {
  function SWIGINTERNINLINE (line 340) | SWIGINTERNINLINE int SWIG_CheckState(int r) {
  type swig_type_info (line 356) | struct swig_type_info
    type swig_cast_info (line 363) | struct swig_cast_info
  type swig_type_info (line 359) | struct swig_type_info {
    type swig_cast_info (line 363) | struct swig_cast_info
  type swig_cast_info (line 369) | struct swig_cast_info {
    type swig_cast_info (line 372) | struct swig_cast_info
    type swig_cast_info (line 373) | struct swig_cast_info
  type swig_module_info (line 379) | struct swig_module_info {
    type swig_module_info (line 382) | struct swig_module_info
  function SWIGRUNTIME (line 395) | SWIGRUNTIME int
  function SWIGRUNTIME (line 410) | SWIGRUNTIME int
  function SWIGRUNTIME (line 429) | SWIGRUNTIME int
  function SWIGRUNTIME (line 437) | SWIGRUNTIME swig_cast_info *
  function SWIGRUNTIME (line 464) | SWIGRUNTIME swig_cast_info *
  function SWIGRUNTIMEINLINE (line 491) | SWIGRUNTIMEINLINE void *
  function SWIGRUNTIME (line 499) | SWIGRUNTIME swig_type_info *
  function SWIGRUNTIMEINLINE (line 513) | SWIGRUNTIMEINLINE const char *
  function SWIGRUNTIME (line 522) | SWIGRUNTIME const char *
  function SWIGRUNTIME (line 543) | SWIGRUNTIME void
  function SWIGRUNTIME (line 559) | SWIGRUNTIME void
  function SWIGRUNTIME (line 573) | SWIGRUNTIME swig_type_info *
  function SWIGRUNTIME (line 618) | SWIGRUNTIME swig_type_info *
  function SWIGRUNTIME (line 647) | SWIGRUNTIME char *
  function SWIGRUNTIME (line 663) | SWIGRUNTIME const char *
  function SWIGRUNTIME (line 691) | SWIGRUNTIME char *
  function SWIGRUNTIME (line 702) | SWIGRUNTIME const char *
  function SWIGRUNTIME (line 715) | SWIGRUNTIME char *
  function SWIGRUNTIME (line 730) | SWIGRUNTIME const char *
  function SWIGINTERN (line 800) | SWIGINTERN char*
  function SWIGINTERN (line 825) | SWIGINTERN PyObject*
  function PyObject (line 851) | static PyObject *
  function PyObject (line 904) | static
  function PyNumber_AsSsize_t (line 929) | static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  function SWIGRUNTIME (line 987) | SWIGRUNTIME PyObject*
  function SWIGRUNTIME (line 1031) | SWIGRUNTIME void
  class SWIG_Python_Thread_Block (line 1070) | class SWIG_Python_Thread_Block {
    method end (line 1074) | void end() { if (status) { PyGILState_Release(state); status = false;} }
    method SWIG_Python_Thread_Block (line 1075) | SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  class SWIG_Python_Thread_Allow (line 1078) | class SWIG_Python_Thread_Allow {
    method end (line 1082) | void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
    method SWIG_Python_Thread_Allow (line 1083) | SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  type swig_const_info (line 1138) | struct swig_const_info {
  function SWIGRUNTIME (line 1153) | SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM...
  function SWIGRUNTIME (line 1158) | SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM...
  function SWIGINTERN (line 1231) | SWIGINTERN void
  function SWIGINTERN (line 1239) | SWIGINTERN void
  function SWIGINTERN (line 1252) | SWIGINTERN void
  function SWIGINTERN (line 1259) | SWIGINTERN void
  function SWIGINTERN (line 1273) | SWIGINTERN void
  function SWIGINTERN (line 1287) | SWIGINTERN PyObject*
  function SWIGINTERN (line 1332) | SWIGINTERN Py_ssize_t
  function SWIGRUNTIMEINLINE (line 1426) | SWIGRUNTIMEINLINE PyObject *
  function SWIGRUNTIME (line 1433) | SWIGRUNTIME PyObject *
  function SWIGRUNTIMEINLINE (line 1443) | SWIGRUNTIMEINLINE PyObject *
  function SWIGRUNTIMEINLINE (line 1463) | SWIGRUNTIMEINLINE int
  function SWIGRUNTIMEINLINE (line 1470) | SWIGRUNTIMEINLINE PyObject *
  function SWIGRUNTIME (line 1478) | SWIGRUNTIME SwigPyClientData *
  function SWIGRUNTIME (line 1532) | SWIGRUNTIME void
  function SWIGRUNTIME (line 1555) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 1569) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 1575) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 1597) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 1603) | SWIGRUNTIME PyObject *
  function SwigPyObject_repr (line 1613) | SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  function SWIGRUNTIME (line 1636) | SWIGRUNTIME int
  function SWIGRUNTIME (line 1645) | SWIGRUNTIME PyObject*
  function SWIGRUNTIME (line 1662) | SWIGRUNTIME PyTypeObject*
  function SWIGRUNTIME (line 1672) | SWIGRUNTIME PyTypeObject*
  function SWIGRUNTIMEINLINE (line 1679) | SWIGRUNTIMEINLINE int
  function SWIGRUNTIME (line 1695) | SWIGRUNTIME void
  function SWIGRUNTIME (line 1746) | SWIGRUNTIME PyObject*
  function SwigPyObject_next (line 1768) | SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  function SwigPyObject_disown (line 1784) | SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  function SwigPyObject_acquire (line 1796) | SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  function SWIGINTERN (line 1866) | SWIGINTERN PyObject *
  function SWIGRUNTIME (line 1873) | SWIGRUNTIME PyTypeObject*
  function SWIGRUNTIME (line 2021) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2045) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2059) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2070) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2081) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2092) | SWIGRUNTIME PyTypeObject*
  function SWIGRUNTIMEINLINE (line 2098) | SWIGRUNTIMEINLINE int
  function SWIGRUNTIME (line 2104) | SWIGRUNTIME void
  function SWIGRUNTIME (line 2114) | SWIGRUNTIME PyTypeObject*
  function SWIGRUNTIME (line 2209) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2228) | SWIGRUNTIME swig_type_info *
  function SWIGRUNTIMEINLINE (line 2245) | SWIGRUNTIMEINLINE PyObject *
  function SWIGRUNTIME (line 2253) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2268) | SWIGRUNTIME SwigPyObject *
  function SWIGRUNTIME (line 2334) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2349) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2454) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2486) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2509) | SWIGRUNTIME PyObject*
  function SWIGRUNTIME (line 2584) | SWIGRUNTIME void
  function SWIGINTERN (line 2606) | SWIGINTERN PyObject *
  function SWIGRUNTIME (line 2624) | SWIGRUNTIME PyObject *
  function SWIGRUNTIMEINLINE (line 2678) | SWIGRUNTIMEINLINE PyObject *
  function SWIGRUNTIME (line 2691) | SWIGRUNTIME swig_module_info *
  function SWIGINTERN (line 2717) | SWIGINTERN int
  function SWIG_Python_DestroyModule (line 2748) | SWIG_Python_DestroyModule(void *vptr)
  function SWIGRUNTIME (line 2769) | SWIGRUNTIME void
  function SWIGRUNTIME (line 2796) | SWIGRUNTIME PyObject *
  function SWIGRUNTIME (line 2802) | SWIGRUNTIME swig_type_info *
  function SWIGRUNTIME (line 2839) | SWIGRUNTIME int
  function SWIGRUNTIME (line 2866) | SWIGRUNTIME int
  function SWIGRUNTIMEINLINE (line 2879) | SWIGRUNTIMEINLINE const char *
  function SWIGRUNTIME (line 2887) | SWIGRUNTIME void
  function SWIGRUNTIME (line 2926) | SWIGRUNTIME void *
  type swig (line 3058) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 3114) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 3153) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  function SWIGINTERN (line 3280) | SWIGINTERN int
  function SWIGINTERNINLINE (line 3332) | SWIGINTERNINLINE int
  function SWIGINTERN (line 3362) | SWIGINTERN int
  function SWIGINTERNINLINE (line 3410) | SWIGINTERNINLINE int
  function SWIGINTERNINLINE (line 3423) | SWIGINTERNINLINE PyObject *
  function SWIGINTERNINLINE (line 3430) | SWIGINTERNINLINE PyObject*
  function SWIGINTERN (line 3437) | SWIGINTERN int
  function SWIGINTERNINLINE (line 3480) | SWIGINTERNINLINE int
  type swig (line 3496) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 3565) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type std (line 3757) | namespace std {
    type less <PyObject *> (line 3759) | struct less <PyObject *>: public binary_function<PyObject *, PyObject ...
    type less <swig::SwigPtr_PyObject> (line 3784) | struct less <swig::SwigPtr_PyObject>: public binary_function<swig::Swi...
    type less <swig::SwigVar_PyObject> (line 3794) | struct less <swig::SwigVar_PyObject>: public binary_function<swig::Swi...
    type iterator_traits (line 4073) | struct iterator_traits {
    type iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > (line 4079) | struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Refer...
    type iterator_traits<T*> (line 4085) | struct iterator_traits<T*> {
    function distance (line 4091) | inline typename iterator_traits<_InputIterator>::difference_type
  type swig (line 3805) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 3836) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type std (line 4071) | namespace std {
    type less <PyObject *> (line 3759) | struct less <PyObject *>: public binary_function<PyObject *, PyObject ...
    type less <swig::SwigPtr_PyObject> (line 3784) | struct less <swig::SwigPtr_PyObject>: public binary_function<swig::Swi...
    type less <swig::SwigVar_PyObject> (line 3794) | struct less <swig::SwigVar_PyObject>: public binary_function<swig::Swi...
    type iterator_traits (line 4073) | struct iterator_traits {
    type iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > (line 4079) | struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Refer...
    type iterator_traits<T*> (line 4085) | struct iterator_traits<T*> {
    function distance (line 4091) | inline typename iterator_traits<_InputIterator>::difference_type
  type swig (line 4104) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 4278) | namespace swig
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 4515) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 4535) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 4615) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
  type swig (line 4632) | namespace swig {
    class SwigPtr_PyObject (line 3059) | class SwigPtr_PyObject {
      method SwigPtr_PyObject (line 3064) | SwigPtr_PyObject() :_obj(0)
      method SwigPtr_PyObject (line 3068) | SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
      method SwigPtr_PyObject (line 3075) | SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
      method SwigPtr_PyObject (line 3084) | SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
      method PyObject (line 3106) | PyObject *operator->() const
    type SwigVar_PyObject (line 3115) | struct SwigVar_PyObject : SwigPtr_PyObject {
      method SwigVar_PyObject (line 3116) | SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
      method SwigVar_PyObject (line 3118) | SwigVar_PyObject & operator = (PyObject* obj)
    type stop_iteration (line 3154) | struct stop_iteration {
    type SwigPyIterator (line 3157) | struct SwigPyIterator {
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function PyObject (line 3271) | inline PyObject* make_output_iterator_builtin (PyObject *pyself)
    type noconst_traits (line 3498) | struct noconst_traits {
    type noconst_traits<const Type> (line 3503) | struct noconst_traits<const Type> {
    type pointer_category (line 3510) | struct pointer_category { }
    type value_category (line 3511) | struct value_category { }
    type traits (line 3516) | struct traits { }
    type traits_info (line 3524) | struct traits_info {
      method swig_type_info (line 3525) | static swig_type_info *type_query(std::string name) {
      method swig_type_info (line 3529) | static swig_type_info *type_info() {
    function swig_type_info (line 3536) | inline swig_type_info *type_info() {
    type traits <Type *> (line 3543) | struct traits <Type *> {
      method make_ptr_name (line 3545) | static std::string make_ptr_name(const char* name) {
    type traits_as (line 3557) | struct traits_as { }
    type traits_check (line 3560) | struct traits_check { }
    type traits_from_ptr (line 3569) | struct traits_from_ptr {
      method PyObject (line 3570) | static PyObject *from(Type *val, int owner = 0) {
    type traits_from (line 3575) | struct traits_from {
      method PyObject (line 3576) | static PyObject *from(const Type& val) {
    type traits_from<Type *> (line 3581) | struct traits_from<Type *> {
      method PyObject (line 3582) | static PyObject *from(Type* val) {
    type traits_from<const Type *> (line 3587) | struct traits_from<const Type *> {
      method PyObject (line 3588) | static PyObject *from(const Type* val) {
    function PyObject (line 3595) | inline PyObject *from(const Type& val) {
    function PyObject (line 3600) | inline PyObject *from_ptr(Type* val, int owner) {
    type traits_asptr (line 3608) | struct traits_asptr {
      method asptr (line 3609) | static int asptr(PyObject *obj, Type **val) {
    function asptr (line 3620) | inline int asptr(PyObject *obj, Type **vptr) {
    type traits_asval (line 3625) | struct traits_asval {
      method asval (line 3626) | static int asval(PyObject *obj, Type *val) {
    type traits_asval<Type*> (line 3648) | struct traits_asval<Type*> {
      method asval (line 3649) | static int asval(PyObject *obj, Type **val) {
    function asval (line 3665) | inline int asval(PyObject *obj, Type *val) {
    type traits_as<Type, value_category> (line 3670) | struct traits_as<Type, value_category> {
      method Type (line 3671) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type, pointer_category> (line 3685) | struct traits_as<Type, pointer_category> {
      method Type (line 3686) | static Type as(PyObject *obj, bool throw_error) {
    type traits_as<Type*, pointer_category> (line 3711) | struct traits_as<Type*, pointer_category> {
      method Type (line 3712) | static Type* as(PyObject *obj, bool throw_error) {
    function Type (line 3728) | inline Type as(PyObject *obj, bool te = false) {
    type traits_check<Type, value_category> (line 3733) | struct traits_check<Type, value_category> {
      method check (line 3734) | static bool check(PyObject *obj) {
    type traits_check<Type, pointer_category> (line 3741) | struct traits_check<Type, pointer_category> {
      method check (line 3742) | static bool check(PyObject *obj) {
    function check (line 3749) | inline bool check(PyObject *obj) {
    type traits<PyObject *> (line 3806) | struct traits<PyObject *> {
    type traits_asval<PyObject * > (line 3811) | struct traits_asval<PyObject * > {
      method asval (line 3813) | static int asval(PyObject *obj, value_type *val) {
    type traits_check<PyObject *, value_category> (line 3820) | struct traits_check<PyObject *, value_category> {
      method check (line 3821) | static bool check(PyObject *) {
    type traits_from<PyObject *> (line 3826) | struct traits_from<PyObject *> {
      method PyObject (line 3828) | static PyObject *from(const value_type& val) {
    function check_index (line 3838) | inline size_t
    function slice_adjust (line 3852) | void
    function getpos (line 3888) | inline typename Sequence::iterator
    function cgetpos (line 3896) | inline typename Sequence::const_iterator
    function erase (line 3904) | inline void
    function Sequence (line 3910) | inline Sequence*
    function setslice (line 3953) | inline void
    function delslice (line 4019) | inline void
    class SwigPyIterator_T (line 4106) | class SwigPyIterator_T :  public SwigPyIterator
      method SwigPyIterator_T (line 4113) | SwigPyIterator_T(out_iterator curr, PyObject *seq)
      method out_iterator (line 4118) | const out_iterator& get_current() const
      method equal (line 4124) | bool equal (const SwigPyIterator &iter) const
      method distance (line 4134) | ptrdiff_t distance(const SwigPyIterator &iter) const
    type from_oper (line 4149) | struct from_oper
      method result_type (line 4153) | result_type operator()(argument_type v) const
    class SwigPyIteratorOpen_T (line 4162) | class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorOpen_T (line 4171) | SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      method PyObject (line 4176) | PyObject *value() const {
      method SwigPyIterator (line 4180) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4185) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4193) | SwigPyIterator *decr(size_t n = 1)
    class SwigPyIteratorClosed_T (line 4205) | class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
      method SwigPyIteratorClosed_T (line 4214) | SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_it...
      method PyObject (line 4219) | PyObject *value() const {
      method SwigPyIterator (line 4227) | SwigPyIterator *copy() const
      method SwigPyIterator (line 4232) | SwigPyIterator *incr(size_t n = 1)
      method SwigPyIterator (line 4244) | SwigPyIterator *decr(size_t n = 1)
    function SwigPyIterator (line 4262) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    function SwigPyIterator (line 4269) | inline SwigPyIterator*
      method SwigPyIterator (line 3162) | SwigPyIterator(PyObject *seq) : _seq(seq)
      method SwigPyIterator (line 3176) | virtual SwigPyIterator *decr(size_t /*n*/ = 1)
      method distance (line 3182) | virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
      method equal (line 3187) | virtual bool equal (const SwigPyIterator &/*x*/) const
      method PyObject (line 3195) | PyObject *next()
      method PyObject (line 3205) | PyObject *__next__()
      method PyObject (line 3210) | PyObject *previous()
      method SwigPyIterator (line 3219) | SwigPyIterator *advance(ptrdiff_t n)
      method SwigPyIterator (line 3234) | SwigPyIterator& operator += (ptrdiff_t n)
      method SwigPyIterator (line 3239) | SwigPyIterator& operator -= (ptrdiff_t n)
      method SwigPyIterator (line 3244) | SwigPyIterator* operator + (ptrdiff_t n) const
      method SwigPyIterator (line 3249) | SwigPyIterator* operator - (ptrdiff_t n) const
      method swig_type_info (line 3259) | static swig_type_info* descriptor() {
    type SwigPySequence_Ref (line 4281) | struct SwigPySequence_Ref
      method SwigPySequence_Ref (line 4283) | SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      method SwigPySequence_Ref (line 4305) | SwigPySequence_Ref& operator=(const T& v)
    type SwigPySequence_ArrowProxy (line 4317) | struct SwigPySequence_ArrowProxy
      method SwigPySequence_ArrowProxy (line 4319) | SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
      method T (line 4320) | const T* operator->() const { return &m_value; }
    type SwigPySequence_InputIterator (line 4326) | struct SwigPySequence_InputIterator
      method SwigPySequence_InputIterator (line 4336) | SwigPySequence_InputIterator()
      method SwigPySequence_InputIterator (line 4340) | SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      method reference (line 4345) | reference operator*() const
      method self (line 4365) | self& operator ++ ()
      method self (line 4371) | self& operator -- ()
      method self (line 4377) | self& operator += (difference_type n)
      method self (line 4383) | self operator +(difference_type n) const
      method self (line 4388) | self& operator -= (difference_type n)
      method self (line 4394) | self operator -(difference_type n) const
      method difference_type (line 4399) | difference_type operator - (const self& ri) const
      method reference (line 4409) | reference
    type SwigPySequence_Cont (line 4422) | struct SwigPySequence_Cont
      method SwigPySequence_Cont (line 4434) | SwigPySequence_Cont(PyObject* seq) : _seq(0)
      method size_type (line 4448) | size_type size() const
      method empty (line 4453) | bool empty() const
      method iterator (line 4458) | iterator begin()
      method const_iterator (line 4463) | const_iterator begin() const
      method iterator (line 4468) | iterator end()
      method const_iterator (line 4473) | const_iterator end() const
      method reference (line 4478) | reference operator[](difference_type n)
      method const_reference (line 4483) | const_reference operator[](difference_type n)  const
      method check (line 4488) | bool check(bool set_err = true) const
    type traits< double > (line 4516) | struct traits< double > {
    type traits_asval< double > (line 4520) | struct traits_asval< double > {
      method asval (line 4522) | static int asval(PyObject *obj, value_type *val) {
    type traits_from< double > (line 4526) | struct traits_from< double > {
      method PyObject (line 4528) | static PyObject *from(const value_type& val) {
    function assign (line 4537) | inline void
    type traits_asptr_stdseq (line 4548) | struct traits_asptr_stdseq {
      method asptr (line 4552) | static int asptr(PyObject *obj, sequence **seq) {
    type traits_from_stdseq (line 4585) | struct traits_from_stdseq {
      method PyObject (line 4591) | static PyObject *from(const sequence& seq) {
    type traits_asptr<std::vector<T> > (line 4617) | struct traits_asptr<std::vector<T> >  {
      method asptr (line 4618) | static int asptr(PyObject *obj, std::vector<T> **vec) {
    type traits_from<std::vector<T> > (line 4624) | struct traits_from<std::vector<T> > {
      method PyObject (line 4625) | static PyObject *from(const std::vector<T>& vec) {
    type traits<std::vector< double, std::allocator< double > > > (line 4633) | struct traits<std::vector< double, std::allocator< double > > > {
Condensed preview — 63 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (602K chars).
[
  {
    "path": ".idea/.gitignore",
    "chars": 47,
    "preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
  },
  {
    "path": ".idea/DOTA_devkit-master.iml",
    "chars": 579,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"PYTHON_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager"
  },
  {
    "path": ".idea/encodings.xml",
    "chars": 160,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\">\n    <file url=\"PROJECT\" chars"
  },
  {
    "path": ".idea/inspectionProfiles/Project_Default.xml",
    "chars": 503,
    "preview": "<component name=\"InspectionProjectProfileManager\">\n  <profile version=\"1.0\">\n    <option name=\"myName\" value=\"Project De"
  },
  {
    "path": ".idea/inspectionProfiles/profiles_settings.xml",
    "chars": 174,
    "preview": "<component name=\"InspectionProjectProfileManager\">\n  <settings>\n    <option name=\"USE_PROJECT_PROFILE\" value=\"false\" />\n"
  },
  {
    "path": ".idea/misc.xml",
    "chars": 310,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" project-"
  },
  {
    "path": ".idea/modules.xml",
    "chars": 288,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n   "
  },
  {
    "path": "DOTA.py",
    "chars": 4734,
    "preview": "# coding=gbk\n\n#The code is used for visulization, inspired from cocoapi\n#  Licensed under the Simplified BSD License [se"
  },
  {
    "path": "DOTA2COCO.py",
    "chars": 2826,
    "preview": "import dota_utils as util\nimport os\nimport cv2\nimport json\n\nwordname_15 = ['plane', 'baseball-diamond', 'bridge', 'groun"
  },
  {
    "path": "DOTA_demo/labelTxt/P0003.txt",
    "chars": 3539,
    "preview": "imagesource:GoogleEarth\ngsd:0.115726939386\n937.0 913.0 921.0 912.0 923.0 874.0 940.0 875.0 small-vehicle 0\n638.0 959.0 6"
  },
  {
    "path": "DOTA_demo/labelTxt/P0004.txt",
    "chars": 6928,
    "preview": "imagesource:GoogleEarth\ngsd:0.132459767176\n398.0 716.0 398.0 694.0 464.0 698.0 465.0 718.0 large-vehicle 0\n513.0 542.0 5"
  },
  {
    "path": "DOTA_demo/labelTxt/P0005.txt",
    "chars": 8215,
    "preview": "imagesource:GoogleEarth\ngsd:0.120384949364\n76.0 847.0 76.0 864.0 34.0 866.0 34.0 847.0 small-vehicle 0\n278.0 731.0 279.0"
  },
  {
    "path": "DOTA_demo/labelTxt/P1478__1__853___962.txt",
    "chars": 18280,
    "preview": "907.0 127.0 889.0 126.0 890.0 88.0 908.0 89.0 small-vehicle 1\n1.0 187.0 1.0 187.0 1.0 219.0 1.0 219.0 small-vehicle 2\n1."
  },
  {
    "path": "Draw_DOTA_YOLO.py",
    "chars": 7028,
    "preview": "# -*- coding: utf-8 -*-\nimport dota_utils as util\nimport os\nimport numpy as np\nfrom PIL import Image\nimport cv2\nimport r"
  },
  {
    "path": "ImgSplit.py",
    "chars": 10230,
    "preview": "import os\nimport codecs\nimport numpy as np\nimport math\nfrom dota_utils import GetFileFromThisRootDir\nimport cv2\nimport s"
  },
  {
    "path": "ImgSplit_multi_process.py",
    "chars": 12166,
    "preview": "# coding=gbk\n\"\"\"\n-------------\nThis is the multi-process version\n\"\"\"\nimport os\nimport codecs\nimport numpy as np\nimport m"
  },
  {
    "path": "README.md",
    "chars": 2622,
    "preview": "\n## Brief Introduction\nBased on [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit).  \nAdd some modules to trans D"
  },
  {
    "path": "ResultMerge.py",
    "chars": 7878,
    "preview": "# -*- coding: utf-8 -*-\n\"\"\"\n    To use the code, users should to config detpath, annopath and imagesetfile\n    detpath i"
  },
  {
    "path": "ResultMerge_example/1.txt",
    "chars": 7959,
    "preview": "P0770__1__0___0 0.9 856.0 696.0 1024.0 781.0 1024.0 1024.0 752.0 1006.0\nP0770__1__0___0 0.9 349.0 491.0 388.0 508.0 353."
  },
  {
    "path": "ResultMerge_multi_process.py",
    "chars": 9008,
    "preview": "\"\"\"\n    To use the code, users should to config detpath, annopath and imagesetfile\n    detpath is the path for 15 result"
  },
  {
    "path": "SplitOnlyImage.py",
    "chars": 2373,
    "preview": "import os\nimport numpy as np\nimport cv2\nimport copy\nimport dota_utils as util\n\nclass splitbase():\n    def __init__(self,"
  },
  {
    "path": "SplitOnlyImage_multi_process.py",
    "chars": 3523,
    "preview": "import os\nimport numpy as np\nimport cv2\nimport copy\nimport dota_utils as util\nfrom multiprocessing import Pool\nfrom func"
  },
  {
    "path": "YOLO_Transform.py",
    "chars": 13418,
    "preview": "# -*- coding: utf-8 -*-\nimport dota_utils as util\nimport os\nimport numpy as np\nfrom PIL import Image\nimport cv2\nimport r"
  },
  {
    "path": "dota-v1.5_evaluation_task1.py",
    "chars": 11679,
    "preview": "# --------------------------------------------------------\n# dota_evaluation_task1\n# Licensed under The MIT License [see"
  },
  {
    "path": "dota-v1.5_evaluation_task2.py",
    "chars": 10522,
    "preview": "# --------------------------------------------------------\n# dota_evaluation_task1\n# Licensed under The MIT License [see"
  },
  {
    "path": "dota_evaluation_task1.py",
    "chars": 12017,
    "preview": "# --------------------------------------------------------\n# dota_evaluation_task1\n# Licensed under The MIT License [see"
  },
  {
    "path": "dota_evaluation_task2.py",
    "chars": 9909,
    "preview": "# --------------------------------------------------------\n# dota_evaluation_task1\n# Licensed under The MIT License [see"
  },
  {
    "path": "dota_utils.py",
    "chars": 11967,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\nimport codecs\nimport numpy as np\n\nimport shapely.geometry as shgeo\nimport os\nimport r"
  },
  {
    "path": "evaluation_example/imgnamefile.txt",
    "chars": 24,
    "preview": "P0007\nP0004\nP0019\nP0003\n"
  },
  {
    "path": "evaluation_example/result_classname/Task1_harbor.txt",
    "chars": 3608,
    "preview": "P0019 0.64 2390.0 566.0 2381.0 380.0 2439.0 377.0 2448.0 563.0\nP0019 0.626 5124.0 844.0 5058.0 844.0 5059.0 693.0 5125.0"
  },
  {
    "path": "evaluation_example/result_classname/Task1_large-vehicle.txt",
    "chars": 14981,
    "preview": "P0007 0.724 1223.0 682.0 1073.0 573.0 1088.0 551.0 1238.0 660.0\nP0007 0.722 957.0 688.0 924.0 686.0 934.0 513.0 967.0 51"
  },
  {
    "path": "evaluation_example/result_classname/Task1_ship.txt",
    "chars": 2371,
    "preview": "P0019 0.698 5803.0 3656.0 5790.0 3638.0 5828.0 3613.0 5841.0 3631.0\nP0019 0.661 6157.0 2640.0 6129.0 2614.0 6140.0 2603."
  },
  {
    "path": "evaluation_example/result_classname/Task1_small-vehicle.txt",
    "chars": 8576,
    "preview": "P0019 0.646 3833.0 160.0 3830.0 140.0 3872.0 135.0 3875.0 155.0\nP0019 0.633 262.0 395.0 246.0 353.0 265.0 346.0 281.0 38"
  },
  {
    "path": "evaluation_example/row_DOTA_labels/P0003.txt",
    "chars": 3539,
    "preview": "imagesource:GoogleEarth\ngsd:0.115726939386\n937.0 913.0 921.0 912.0 923.0 874.0 940.0 875.0 small-vehicle 0\n638.0 959.0 6"
  },
  {
    "path": "evaluation_example/row_DOTA_labels/P0004.txt",
    "chars": 6928,
    "preview": "imagesource:GoogleEarth\ngsd:0.132459767176\n398.0 716.0 398.0 694.0 464.0 698.0 465.0 718.0 large-vehicle 0\n513.0 542.0 5"
  },
  {
    "path": "evaluation_example/row_DOTA_labels/P0007.txt",
    "chars": 10797,
    "preview": "imagesource:GoogleEarth\ngsd:0.127603145209\n1381.0 182.0 1375.0 168.0 1403.0 156.0 1408.0 171.0 small-vehicle 1\n950.0 183"
  },
  {
    "path": "evaluation_example/row_DOTA_labels/P0019.txt",
    "chars": 6985,
    "preview": "imagesource:GoogleEarth\ngsd:0.108079065446\n2762.0 305.0 2774.0 305.0 2772.0 335.0 2756.0 335.0 ship 0\n1109.0 3205.0 1130"
  },
  {
    "path": "example/labelTxt/P0706.txt",
    "chars": 21117,
    "preview": "imagesource:GoogleEarth\ngsd:0.255589285596\n1054 1028 1063 1011 1111 1040 1112 1062 ship 1\n807 331 800 324 817 309 823 31"
  },
  {
    "path": "example/labelTxt/P0770.txt",
    "chars": 1115,
    "preview": "imagesource:GoogleEarth\ngsd:0.266578848023\n856 696 1469 1008 1341 1298 716 988 ground-track-field 0\n1148 658 1255 711 12"
  },
  {
    "path": "example/labelTxt/P1088.txt",
    "chars": 1521,
    "preview": "imagesource:GoogleEarth\ngsd:0.1377814038\n226 738 225 756 191 756 191 739 small-vehicle 0\n1033 545 948 547 949 490 1032 4"
  },
  {
    "path": "poly_nms_gpu/Makefile",
    "chars": 56,
    "preview": "all:\n\tpython setup.py build_ext --inplace\n\trm -rf build\n"
  },
  {
    "path": "poly_nms_gpu/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "poly_nms_gpu/nms_wrapper.py",
    "chars": 560,
    "preview": "# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under "
  },
  {
    "path": "poly_nms_gpu/poly_nms.hpp",
    "chars": 298,
    "preview": "//\n// Created by dingjian on 18-5-24.\n//\n\n#ifndef DOTA_DEVKIT_POLY_NMS_HPP\n#define DOTA_DEVKIT_POLY_NMS_HPP\n\n\nvoid _poly"
  },
  {
    "path": "poly_nms_gpu/poly_nms.pyx",
    "chars": 875,
    "preview": "import numpy as np\ncimport numpy as np\n\nassert sizeof(int) == sizeof(np.int32_t)\n\ncdef extern from \"poly_nms.hpp\":\n    v"
  },
  {
    "path": "poly_nms_gpu/poly_nms_kernel.cu",
    "chars": 10793,
    "preview": "\n#include \"poly_nms.hpp\"\n#include <vector>\n#include <iostream>\n#include <cmath>\n#include <cstdio>\n#include<algorithm>\n\nu"
  },
  {
    "path": "poly_nms_gpu/poly_nms_test.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "poly_nms_gpu/poly_overlaps.hpp",
    "chars": 106,
    "preview": "void _overlaps(float* overlaps,const float* boxes,const float* query_boxes, int n, int k, int device_id);\n"
  },
  {
    "path": "poly_nms_gpu/poly_overlaps.pyx",
    "chars": 552,
    "preview": "import numpy as np\ncimport numpy as np\n\ncdef extern from \"poly_overlaps.hpp\":\n    void _overlaps(np.float32_t*, np.float"
  },
  {
    "path": "poly_nms_gpu/poly_overlaps_kernel.cu",
    "chars": 12656,
    "preview": "\n#include \"poly_overlaps.hpp\"\n#include <vector>\n#include <iostream>\n#include <cmath>\n#include <cstdio>\n#include<algorith"
  },
  {
    "path": "poly_nms_gpu/setup.py",
    "chars": 6036,
    "preview": "\"\"\"\n    setup.py file for SWIG example\n\"\"\"\nimport os\nfrom os.path import join as pjoin\nfrom setuptools import setup\nfrom"
  },
  {
    "path": "polyiou.cpp",
    "chars": 3790,
    "preview": "\n#include<cstdio>\n#include<iostream>\n#include<algorithm>\n#include<cmath>\n#include <vector>\nusing namespace std;\n#define "
  },
  {
    "path": "polyiou.h",
    "chars": 202,
    "preview": "//\n// Created by dingjian on 18-2-3.\n//\n\n#ifndef POLYIOU_POLYIOU_H\n#define POLYIOU_POLYIOU_H\n\n#include <vector>\ndouble i"
  },
  {
    "path": "polyiou.i",
    "chars": 258,
    "preview": "%module polyiou\n%include \"std_vector.i\"\n\nnamespace std {\n    %template(VectorDouble) vector<double>;\n};\n\n%{\n#define SWIG"
  },
  {
    "path": "polyiou.py",
    "chars": 7767,
    "preview": "# This file was automatically generated by SWIG (http://www.swig.org).\n# Version 3.0.8\n#\n# Do not make changes to this f"
  },
  {
    "path": "polyiou_wrap.cxx",
    "chars": 270111,
    "preview": "/* ----------------------------------------------------------------------------\n * This file was automatically generated"
  },
  {
    "path": "requirements.txt",
    "chars": 137,
    "preview": "# pip install -r requirements.txt\n\n# base ----------------------------------------\nnumpy==1.19.1\npillow==7.2.0\nopencv-py"
  },
  {
    "path": "setup.py",
    "chars": 445,
    "preview": "\"\"\"\n    setup.py file for SWIG example\n\"\"\"\nfrom distutils.core import setup, Extension\nimport numpy\n\npolyiou_module = Ex"
  }
]

// ... and 5 more files (download for full content)

About this extraction

This page contains the full source code of the hukaixuan19970627/DOTA_devkit_YOLO GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 63 files (11.5 MB), approximately 211.6k tokens, and a symbol index with 597 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!