neetness
This commit is contained in:
parent
d27d659dad
commit
ffaf281385
|
|
@ -30,7 +30,6 @@ class ContourExtractor:
|
||||||
def getExtractedMasks(self):
|
def getExtractedMasks(self):
|
||||||
return self.extractedMasks
|
return self.extractedMasks
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.frameBuffer = Queue(16)
|
self.frameBuffer = Queue(16)
|
||||||
self.extractedContours = dict()
|
self.extractedContours = dict()
|
||||||
|
|
|
||||||
6
main.py
6
main.py
|
|
@ -12,7 +12,6 @@ from Application.Classifiers import *
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
startTotal = time.time()
|
startTotal = time.time()
|
||||||
start = startTotal
|
|
||||||
config = Config()
|
config = Config()
|
||||||
|
|
||||||
fileName = "x23.mp4"
|
fileName = "x23.mp4"
|
||||||
|
|
@ -21,14 +20,11 @@ def main():
|
||||||
|
|
||||||
config["inputPath"] = os.path.join(dirName, fileName)
|
config["inputPath"] = os.path.join(dirName, fileName)
|
||||||
config["outputPath"] = os.path.join(outputPath, fileName)
|
config["outputPath"] = os.path.join(outputPath, fileName)
|
||||||
|
|
||||||
config["importPath"] = os.path.join(outputPath, fileName.split(".")[0] + ".txt")
|
config["importPath"] = os.path.join(outputPath, fileName.split(".")[0] + ".txt")
|
||||||
|
|
||||||
config["w"], config["h"] = VideoReader(config).getWH()
|
config["w"], config["h"] = VideoReader(config).getWH()
|
||||||
|
|
||||||
if not os.path.exists(config["importPath"]):
|
if not os.path.exists(config["importPath"]):
|
||||||
contours, masks = ContourExtractor(config).extractContours()
|
contours, masks = ContourExtractor(config).extractContours()
|
||||||
|
|
||||||
layerFactory = LayerFactory(config)
|
layerFactory = LayerFactory(config)
|
||||||
layers = layerFactory.extractLayers(contours, masks)
|
layers = layerFactory.extractLayers(contours, masks)
|
||||||
else:
|
else:
|
||||||
|
|
@ -48,9 +44,7 @@ def main():
|
||||||
exporter = Exporter(config)
|
exporter = Exporter(config)
|
||||||
print(f"Exporting {len(contours)} Contours and {len(layers)} Layers")
|
print(f"Exporting {len(contours)} Contours and {len(layers)} Layers")
|
||||||
exporter.export(layers, contours, masks, raw=True, overlayed=True)
|
exporter.export(layers, contours, masks, raw=True, overlayed=True)
|
||||||
|
|
||||||
print("Total time: ", time.time() - startTotal)
|
print("Total time: ", time.time() - startTotal)
|
||||||
exit(0)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue