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

Missing config : num_masks #515

Closed
lhkyyh opened this issue Jul 10, 2024 · 8 comments
Closed

Missing config : num_masks #515

lhkyyh opened this issue Jul 10, 2024 · 8 comments
Labels
Fixed question Further information is requested

Comments

@lhkyyh
Copy link

lhkyyh commented Jul 10, 2024

When I load my trained model, I encounter this problem:Missing config : num_masks
1720627168099

@CVHub520
Copy link
Owner

Hey there! @lhkyyh, 😄

It seems like you are encountering an issue that raises an error: Missing config: num_masks.

Perhaps you can resolve this by replacing your local YAML file with the following configuration:

type: yolov8_seg
name: yolov8hz
display_name: yolov8hz
model_path: hz.onnx
nms_threshold: 0.20
confidence_threshold: 0.20
classes:
  - '0'
  - '1'

Note:

  • Label names starting with numbers should be enclosed in single quotes (' ').
  • The anchors and stride fields are only allowed to be defined in the configuration file.

Finally, you can inspect the input and output nodes of your ONNX file using Netron and paste the details here.

@CVHub520 CVHub520 added the question Further information is requested label Jul 11, 2024
@lhkyyh
Copy link
Author

lhkyyh commented Jul 11, 2024

Thanks for the answer, the same issue occurs even though I followed the config file above, this is the input and output nodes of my ONNX file
Uploading 1720664431114.png…

@lhkyyh
Copy link
Author

lhkyyh commented Jul 11, 2024

input
images
name: images
tensor: float32[1,3,640,640]
output
output0
name: output0
tensor: float32[1,38,8400]
output1
name: output1
tensor: float32[1,32,160,160]

@CVHub520
Copy link
Owner

Thank you for your response. If you're still encountering issues, it's often helpful to try cloning the latest source code, as this can resolve many unknown errors that might be present in older versions.

After you've cloned and run the latest source code, if the problem persists, please prepare a compressed package including the ONNX file, the YAML configuration file, and an image that you're certain should be detectable by the model. You can then send this package to the following email address for further assistance: cv_hub@163.com.

Thank you for your cooperation!

@CVHub520
Copy link
Owner

After testing your sending file, it seems that everything is normal. As memtion above, please using the latest source code via git clone https://github.com/CVHub520/X-AnyLabeling.git, and make sure your GUI is looks like below:

image

Btw, an optimal piece of advice would be to set the classes as defined in your ONNX file, rather than using ‘0’ or ‘1’:

type: yolov8_seg
name: yolov8hz
display_name: yolov8hz
model_path: hz.onnx
nms_threshold: 0.20
confidence_threshold: 0.20
classes:
  - crack
  - blocky crack

@lhkyyh
Copy link
Author

lhkyyh commented Jul 11, 2024

Thanks for your help, it maybe my computer's problem , It runs well in other computer, good lucky to all of you

@CVHub520
Copy link
Owner

Thank you for the update. I believe I might have identified a potential cause for the issue on your computer. It's possible that your environment was contaminated, perhaps by accidentally installing AnyLabeling. This can be resolved by running pip uninstall anylabeling.

For the best practice, I recommend creating a new Conda environment and then reinstalling the dependencies with pip install -r requirements.txt. This ensures a clean setup and can help avoid such issues in the future.

I'm glad to hear that it's running well on another computer. Wishing you all the best too!

@lhkyyh
Copy link
Author

lhkyyh commented Jul 12, 2024

I get it,I create a new environment and replace a file named .anylabelingrc in my computer, it runs well now, Thanks so much again!

@CVHub520 CVHub520 added the Fixed label Aug 8, 2024
@CVHub520 CVHub520 closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants