New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labeling new class #130
Comments
@karthyyy you should play around with Grounding-SAM and Grounding-DINO on a huggingspace demo, that way you get an idea if you're classes can be located and what threshold values you should use before running the entire script. |
Thanks for the quick reply. Sure I will try it out. Is it like, there are a predefined set of classes in the Grounding-DINO model ? In that case, how to get those details ? Regards |
@karthyyy Unfortunately the paper does not give any info about the training data. But the model is evaluated on COCO, LVISBenchmark and ODinW. if your classes are present in one of these datasets, there is a chance you might get something |
@karthyyy also, many of these one-shot detection / instance segmentation foundational models will detect "things" in general. So depending on your class categories, you can always toggle the thresholds (text, box, and IoU) to get hits. |
I get an empty output when I use autodistill. I suspect that it is because my prompt class is unknown to the base model training data. The question now is: How can I use autodistill on my custom data that contains custom classes? |
@Davisonyeas please refer to the comment by @Jordan-Pierce, with autodistill the base model uses the default thresholds you can play around with thresholds in the HF spaces and add those arguments in your base model |
@lab176344 I have tested with the hf spaces thresholds, and it recognized my class. |
I have viewed the detection_base_model.py file, and neither confidence nor threshold are arguments in the label function |
I think currently you cannot pass the parameters directly when initialising the base model. One option might be you can modify it here https://github.com/autodistill/autodistill-grounding-dino/blob/c8991645a75ddb0d4f93a5a96968f0a08f1faef6/autodistill_grounding_dino/helpers.py#L71 if you are using Grounding DINO. I don't a clean way to do it. |
No. @Davisonyeas you're looking at the template class for all potential base models. Go to # Line 29
class GroundedSAM(DetectionBaseModel):
ontology: CaptionOntology
grounding_dino_model: Model
sam_predictor: SamPredictor
box_threshold: float
text_threshold: float
def __init__(
self, ontology: CaptionOntology, box_threshold=0.35, text_threshold=0.25
):
self.ontology = ontology
self.grounding_dino_model = load_grounding_dino()
self.sam_predictor = load_SAM()
self.box_threshold = box_threshold
self.text_threshold = text_threshold
... Each base model might have different input parameters; Dino and SAM both allow for threshold values, but not all other base models do. |
Sorry I overlooked code @Jordan-Pierce I was checking the load dino part my bad =( |
No worries, I did the same exact thing. Cheers. |
Search before asking
Question
Hi,
Whether Autodistill can be used for labeling new classes/objects which are not common like sockets, ICs etc ? I tried using the same but there is no images in the folder "images_labeled".
Regards
Karthik
Additional
No response
The text was updated successfully, but these errors were encountered: