baseDirectory = "/mnt/storage/home/ja16475/sharks/detectron2/scratch/comparison_set/" trainDirectory = baseDirectory + "train/" valDirectory = baseDirectory + "val/" imageDirectory = baseDirectory + "images/" sourceJsonDirectory = baseDirectory + "data.json" actualJobID = parser.parse_args().jobid resumeID = 3380515 # print("parser.parse_args().jobid:",parser.parse_args().jobid) #-----------------------------------------------------# # Get Dicts #-----------------------------------------------------# myDictGetters = getters.DictionaryGetters(baseDirectory=baseDirectory, trainDirectory=trainDirectory, valDirectory=valDirectory) SharkClassDictionary = myDictGetters.getSharkClassDictionary() ClassList = myDictGetters.getClassList() #-----------------------------------------------------# # Register to Catalogs #-----------------------------------------------------# for d in ["train", "val"]: # Register shark_train and shark_val DatasetCatalog.register("shark_" + d, lambda d=d: myDictGetters.getSharkDicts(d)) MetadataCatalog.get("shark_" + d).set(thing_classes=ClassList) shark_metadata = MetadataCatalog.get("shark_train")
isShuffleData = False # If anti-curriculum if (parser.parse_args().curriculum == 2): curriculum_override = baseOutputDirectory + modelOutputFolderName + "/" + "output_" + str( currID) + "/sharkTrainDicts-anti-curriculum.pt" isShuffleData = False # If NO curriculum else: curriculum_override = None #-----------------------------------------------------# # Get Dicts/ Dict Getters #-----------------------------------------------------# myDictGetters = getters.DictionaryGetters( baseDirectory=baseDirectory, trainDirectory=trainDirectory, valDirectory=valDirectory, curriculum_override=curriculum_override) SharkClassDictionary = myDictGetters.getSharkClassDictionary() ClassList = myDictGetters.getClassList() #-----------------------------------------------------# # Register to Catalogs #-----------------------------------------------------# for d in ["train", "val"]: # Register shark_train and shark_val DatasetCatalog.register("shark_" + d, lambda d=d: myDictGetters.getSharkDicts(d)) MetadataCatalog.get("shark_" + d).set(thing_classes=ClassList)