roboflow / notebooks

Examples and tutorials on using SOTA computer vision models and techniques. Learn everything from old-school ResNet, through YOLO and object-detection transformers like DETR, to the latest models like Grounding DINO and SAM.
https://roboflow.com/models
4.89k stars 759 forks source link

Exclude classes #130

Closed st43r closed 1 year ago

st43r commented 1 year ago

Search before asking

Description

Hey Piotr, could you please me? i want to try make object detection on pretrained YoloNasL model but i need to exclude some classes for example class person

/// model = models.get(MODEL_ARCH, pretrained_weights="coco").to(DEVICE)

image = cv2.imread(SOURCE_IMAGE_PATH) result = list(model.predict(image, conf=0.35))[0] ///

how can i set some properties of model like class_names at give array with class names to that property? i checked all properties but didnt find out where or how i can exclude some yolo classes

i would be extremely grateful if you try to help

thanks in advance!!

environment is google colab

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

👋 Hello @st43r, thank you for leaving an issue on Roboflow Notebooks.

🐞 Bug reports

If you are filing a bug report, please be as detailed as possible. This will help us more easily diagnose and resolve the problem you are facing. To learn more about contributing, check out our Contributing Guidelines.

If you require support with custom code that is not part of Roboflow Notebooks, please reach out on the Roboflow Forum or on the GitHub Discussions page associated with this repository.

💬 Get in touch

Do you have more questions about Roboflow that we haven't responded to yet? Feel free to ask them on the Roboflow Discuss forum. Our developer advocates and community team actively respond to questions there.

To ask questions about Notebooks, head over to the GitHub Discussions section of this repository.

SkalskiP commented 1 year ago

Duplicate of https://github.com/roboflow/notebooks/discussions/131