Closed naseemap47 closed 1 year ago
Hello, you can find class names here. Please, stop tagging every person here, and do some in-code investigation prior to opening issues that can be solved independently.
Sorry for tagging everyone. I think you didn't understand my problem. I am getting class names by
model = models.get(Models.YOLO_NAS_L, pretrained_weights="coco")
model = model.to("cuda" if torch.cuda.is_available() else "cpu")
preds = next(model.predict('dog.jpeg')._images_prediction_lst)
class_names = preds.class_names
print('Class Names: ', class_names)
I need to know about, there is any way to get the class names before prediction like yolov8 and yolov7 example:
model = YOLO(model_path)
class_names = model.names
You can reference this list and use it anytime.
print(COCO_DETECTION_CLASSES_LIST)
This is I understood, I need to get class names from model file. What if we have custom classes rather than COCO.
Its better to take class name after loading the model like YOLOv7 and YOLOv8. Rather than while predicting
In YOLOv7 and YOLOv8 we can take class names:
But in YOLO-NAS we can only take after predicting
If any know how to take class names after model loading rather than after passing image!! @shaydeci @ofrimasad @shairoz-deci @NatanBagrov @ranrubin @lotem-deci @lkdci @yurkovak @BloodAxe @oferbaratz @Louis-Dupont