in src/get-feedback.py [0:0]
def generateOutput(self, finalManifestItems, labelVerificationJobName):
finalJobOutput = ""
for finalManifestItemKey in finalManifestItems:
finalLabels = finalManifestItems[finalManifestItemKey]
label = {
"source-ref": finalManifestItemKey
}
i = 0
for finalLabel in finalLabels:
label["label-{}".format(i)] = "0"
label["label-{}-metadata".format(i)] = {
"class-name": "{}".format(finalLabel["label"]),
"confidence": finalLabel["confidence"],
"type":"groundtruth/image-classification",
"job-name": labelVerificationJobName,
"human-annotated": "yes",
"creation-date": "2018-10-18T22:18:13.527256"
}
i += 1
finalJobOutput += json.dumps(label) + "\n"
S3Helper.writeToS3(finalJobOutput, self.inputParameters["outputBucket"], self.inputParameters["labelsOutputFile"])