roboflow / roboflow/notebooks

Issue in running the Yolo NAS notebook

Open
#301 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
9.7k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

          Thanks @arrafi-musabbir 🙏🏻 I just updated our YOLO-NAS notebook.

Originally posted by @SkalskiP in https://github.com/roboflow/notebooks/issues/172#issuecomment-1754866035

I wanted to reopen this issue, as i get error for the following code:

import cv2

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

I get the following error:

TypeError                                 Traceback (most recent call last)
[<ipython-input-8-71f83f1aa3bd>](https://localhost:8080/#) in <cell line: 4>()
      2 
      3 image = cv2.imread(SOURCE_IMAGE_PATH)
----> 4 result = list(model.predict(image, conf=0.35))[0]

TypeError: 'ImageDetectionPrediction' object is not iterable

I ran the following notebook: https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolo-nas-on-custom-dataset.ipynb in colab

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the linked train-yolo-nas-on-custom-dataset.ipynb notebook in Colab and running the cell containing cv2.imread and model.predict. Inspect the prediction API at the failing call and confirm the notebook's usage matches the returned object. Done means the notebook runs that cell without the TypeError and produces the expected prediction result.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, opencv, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.