예제 #1
0
    def __init__(self, outputDir, ratio, points, radius):
        (trainSize, testSize) = ssdgen.getTrainTestSizes(ratio, points)

        super(CircleGen, self).__init__(outputDir, trainSize, testSize)

        self._radius = radius
        self._radiusPow = radius * radius
예제 #2
0
    def __init__(self, outputDir, ratio, points, radius):
        (trainSize, testSize) = ssdgen.getTrainTestSizes(ratio, points)

        super(CircleGen, self).__init__(outputDir, trainSize, testSize)

        self._radius = radius
        self._radiusPow = radius * radius
예제 #3
0
    def __init__(self, outputDir, ratio, ncols, nrows, pointsPerCell):
        total     = getTotalPoints(ncols, nrows, pointsPerCell)
        (trainSize, testSize) = ssdgen.getTrainTestSizes(ratio, total)

        super(ChessGen, self).__init__(outputDir, trainSize, testSize)
        self._COLORS  = [ 'W', 'B' ]
        self._ncols   = ncols
        self._nrows   = nrows
        self._pointsPerCell = pointsPerCell
예제 #4
0
    def __init__(self, outputDir, ratio, ncols, nrows, pointsPerCell):
        total = getTotalPoints(ncols, nrows, pointsPerCell)
        (trainSize, testSize) = ssdgen.getTrainTestSizes(ratio, total)

        super(ChessGen, self).__init__(outputDir, trainSize, testSize)
        self._COLORS = ['W', 'B']
        self._ncols = ncols
        self._nrows = nrows
        self._pointsPerCell = pointsPerCell
예제 #5
0
    def __init__(self, outputDir, ratio, points, minor, major, noise_ratio):
        (trainSize, testSize) = getTrainTestSizes(ratio, points)

        super(UnbalancedGen, self).__init__(outputDir, trainSize, testSize)

        self._minor = minor
        self._major = major
        self._minorCoef = 1. * minor / (minor + major)
        self._majorCoef = 1 - self._minorCoef
        self._length = minor + major
        self._noiseRatio = noise_ratio
        self._noiseInTrain = (self._majorCoef * self._trainSize) * noise_ratio
        self._noiseInTest = (self._majorCoef * self._testSize) * noise_ratio

        self._genTrainNoise = 0
        self._genTestNoise = 0
예제 #6
0
    def __init__(self, outputDir, ratio, points, minor, major, noise_ratio):
        (trainSize, testSize) = getTrainTestSizes(ratio, points)

        super(UnbalancedGen, self).__init__(outputDir, trainSize, testSize)

        self._minor      = minor
        self._major      = major
        self._minorCoef  = 1. * minor / (minor+major)
        self._majorCoef  = 1 - self._minorCoef
        self._length     = minor+major
        self._noiseRatio = noise_ratio
        self._noiseInTrain = (self._majorCoef * self._trainSize) * noise_ratio
        self._noiseInTest  = (self._majorCoef * self._testSize) * noise_ratio

        self._genTrainNoise = 0
        self._genTestNoise  = 0