sovit-123 / fasterrcnn-pytorch-training-pipeline

PyTorch Faster R-CNN Object Detection on Custom Dataset
MIT License
223 stars 77 forks source link

Training on a custom dataset - qt.qpa.plugin: Could not load the Qt platform plugin "xcb" even though it was found. #87

Closed utility-aagrawal closed 1 year ago

utility-aagrawal commented 1 year ago

Hi,

I was able to set up and run the smoke detection experiment on my machine. It's an Ubuntu 20.04 virtual machine. Now when I try to train the model on a custom dataset, I am getting the following error -

image

Can you advise? I am using the same virtual environment that I ran the smoke experiment on. I just changed the dataset and class names in .yaml file. I would really appreciate your help with this! Thanks!

sovit-123 commented 1 year ago

If this is a cloud env, then please do this: pip uninstall opencv-python pip uninstall opencv-python-headless pip install -U opencv-python-headless

In case, you are facing on a system where a screen (monitor is connected): pip uninstall opencv-python pip uninstall opencv-python-headless pip install -U opencv-python

However, that error really depends on the system and sometimes we may need to uninstall all the pyqt related packages and install OpenCV again.

utility-aagrawal commented 1 year ago

Thanks @sovit-123! I am in a cloud env, your recommendation worked but I am now getting another error -

image

I don't have a screen connected to this environment. Is that causing the issue? I notice that this is happening only when I use --vis-transformed during the training. I am able to resume training without that argument. Is there a way to visualize transformed images on a linux environment? I wanted to have a look at what is fed to the model.

sovit-123 commented 1 year ago

Yes, --vis-transformed expects a screen connected. Basically, that shows the transformed inputs before the training begins so that the user can go through a visual debug that all the transforms are correct.

If this solves the issue, please consider closing it.

Thanks.

utility-aagrawal commented 1 year ago

Thanks @sovit-123! Makes sense! I'll try it on a machine where a screen is also connected.

utility-aagrawal commented 1 year ago

Resolved.