From the following code if the input is a directory then labels are written when all the files in the directory are processed.
How can I modify the code so that labels are immediately available after a file is processed ?
from autodistill_grounding_dino import GroundingDINO
from autodistill.detection import CaptionOntology
import sys
base_model = GroundingDINO(ontology=CaptionOntology({"person": "person"}))
folder_name = sys.argv[1]
base_model.label(input_folder=folder_name, output_folder='labels')
Hello,
From the following code if the input is a directory then labels are written when all the files in the directory are processed. How can I modify the code so that labels are immediately available after a file is processed ?
from autodistill_grounding_dino import GroundingDINO from autodistill.detection import CaptionOntology import sys base_model = GroundingDINO(ontology=CaptionOntology({"person": "person"})) folder_name = sys.argv[1] base_model.label(input_folder=folder_name, output_folder='labels')