# Remote URLs REMOTE_IMAGE_URL_FILE = "https://requestor-proxy.figure-eight.com/figure_eight_datasets/open-images/train-images" \ "-boxable.csv " REMOTE_GROUND_TRUTH_FILE = "https://requestor-proxy.figure-eight.com/figure_eight_datasets/open-images/train" \ "-annotations-bbox.csv " if __name__ == "__main__": # Load the project settings and required modules. Logger.log_special("Running Sample Creator", with_gap=True) settings = ProjectSettings("settings.yaml") loader: Loader = Loader() # Read in the source data, and create our own sample data. Logger.log_special("Begin Sample Initialization", with_gap=True) loader.check_and_load(settings.IMAGE_URL_FILE, REMOTE_IMAGE_URL_FILE) samples = loader.create_samples(settings.IMAGE_URL_FILE) # Now that we have sample IDs and URLs, we can associate them with the GT annotations. Logger.log_special("Begin Sample Association", with_gap=True) loader.check_and_load(settings.IMAGE_URL_FILE, REMOTE_GROUND_TRUTH_FILE) loader.associate_boxes_with_samples(samples, settings.GROUND_TRUTH_FILE) # Exporting the created samples. Logger.log_special("Begin Sample Export", with_gap=True) pather.create(settings.SAMPLES_DIRECTORY) loader.export_samples(samples, path=settings.SAMPLES_DIRECTORY, size=5000) # All done. Logger.log_header("Sample Creation Completed", with_gap=True)
from modules.data.slide import Slide from modules.scanner import Scanner from tools.util import pather from tools.util.logger import Logger __author__ = "Jakrin Juangbhanich" __email__ = "*****@*****.**" __version__ = "0.0.0" parser = argparse.ArgumentParser(description='<Script Info>') parser.add_argument('-i', '--input', default='test', type=str, help="<help>") parser.add_argument('-o', '--output', default='batch1', type=str, help="<help>") parser.add_argument('-f', '--flag', action="store_true", help="<help>") args = parser.parse_args() if __name__ == "__main__": input_path = os.path.join("input", args.input) output_path = os.path.join("output", args.output) pather.create(output_path, clear=True) Logger.log_header("Running Scanner", with_gap=True) Logger.log_field("Version", __version__) Logger.log_field("Input Path", input_path) Logger.log_field("Input Path", output_path) scanner = Scanner(output_path=output_path) slides: List[Slide] = loader.load_testing_slides(input_path) scanner.process(slides)
""" from __future__ import print_function from __future__ import division from __future__ import absolute_import import argparse import os from modules.ai.single_cell_classifier.scc_trainer import SCCTrainer from tools.util.logger import Logger __author__ = "Jakrin Juangbhanich" __email__ = "*****@*****.**" __version__ = "0.0.1" parser = argparse.ArgumentParser(description='<Script Info>') parser.add_argument('-i', '--input', default='data', type=str, help="<help>") parser.add_argument('-f', '--flag', action="store_true", help="<help>") args = parser.parse_args() if __name__ == "__main__": input_path = os.path.join("input", args.input) Logger.log_header("Running Cell-Scan Trainer", with_gap=True) Logger.log_field("Version", __version__) Logger.log_field("Input Folder", input_path) scc_trainer = SCCTrainer() scc_trainer.process(input_path)