Skip to content
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

update line 512 and line 1101 of utils/general.py #2

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

mo-traor3-ai
Copy link

Description

On the forum, it was noted that Scaled YOLOv4 notebook is broken. This change fixes the issue.

File “/content/gdrive/MyDrive/Marlene_PhD/obj_det/ScaledYOLOv4/utils/general.py”, line 556, in build_targets
indices.append((b, a, gj.clamp_(0, gain[3]), gi.clamp_(0, gain[2]))) # image, anchor, grid indices
RuntimeError: result type Float can’t be cast to the desired output type long int
targets.append([i, cls, float(x.cpu()),   
              float(y.cpu()),   
              float(w.cpu()),   
              float(h.cpu()),   
              float(conf.cpu())])
  • Original Line 1101 in utils/general.py:
targets.append([i, cls, x, y, w, h, conf])

Investigation of the issue:

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

Ran the full Colab notebook, myself:

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@SkalskiP
Copy link
Collaborator

@Jacobsolawetz / @yeldarby could you grant me write access to this repo?

@Jacobsolawetz
Copy link

@SkalskiP done!

@SkalskiP
Copy link
Collaborator

Thanks @Jacobsolawetz 🙏🏻! It took me a long to do it but I'm back. Tets finish fixing it.

@SkalskiP SkalskiP merged commit 5d3935f into roboflow:yolov4-large Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants