shift[0]-1)left=random.randint(1,shift[1]-1)right=left+shapein[1]bottom=top+shapein[0]cvjpeg=classify2detect.merge(cvin,cvbg,[top,left])cv2.imwrite(jpeg,cvjpeg)xmlwriter=PascalVocWriter(foldername='./',filename=jpeg,imgSize=shapebg)xmlwriter.addBndBox(xmin=left,ymin...
class PascalVocWriter: def __init__(self, foldername, filename, imgSize,databaseSrc='Unknown', localImgPath=None): self.foldername = foldername self.filename = filename self.databaseSrc = databaseSrc self.imgSize = imgSize self.boxlist = [] self.roboxlist = [] self.localImgPath =...