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

Attribute error nonetype object has no attribute copy in detection_base_model.py #101

Open
2 tasks done
froth0203 opened this issue Dec 18, 2023 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@froth0203
Copy link

froth0203 commented Dec 18, 2023

Search before asking

  • I have searched the Autodistill issues and found no similar bug report.

Bug

During the loading of images, an AttributeError may be thrown. There is supposedly a file in the folder, but it does not exist. An attempt is made to copy it.
I implemented following to prevent:

for f_path in progress_bar:
progress_bar.set_description(desc=f"Labeling {f_path}", refresh=True)
image = cv2.imread(f_path)
if image is not None:
f_path_short = os.path.basename(f_path)
images_map[f_path_short] = image.copy()
detections = self.predict(f_path)
detections_map[f_path_short] = detections

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@froth0203 froth0203 added the bug Something isn't working label Dec 18, 2023
@capjamesg
Copy link
Member

Hello! Would you be able to submit a PR with your contribution? We have guidance on how to contribute to Autodistill that you can use to get started!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants