Project-AgML / AgML

AgML is a centralized framework for agricultural machine learning. AgML provides access to public agricultural datasets for common agricultural deep learning tasks, with standard benchmarks and pretrained models, as well the ability to generate synthetic data and annotations.
Apache License 2.0
176 stars 28 forks source link

Failed to initialize GLFW in Synthetic output #37

Closed Vincent-WangCH closed 1 year ago

Vincent-WangCH commented 1 year ago

Error_AgML_Synthetic_1 I was running the AgML-Synthetic.ipynb notebook under examples folder. I encounter this error from this command: generator.generate(name = 'tomato_sample2', num_images = 3, clear_existing_files = True)

I have checked the generator.py in synthetic folder, but I fail to understand which sub process caused this -6 return code.

I am using the Ubuntu-20.04 from WSL2 on windown 11 to run this file. I am not sure whether my platform caused this issue

dariojavo commented 1 year ago

Hi @Vincent-WangCH,

When using trough ssh or in this case with wsl you need to enable X11 display server protocol. Try something like:

xvfb-run -a -s "-screen 0 1400x900x24" bash

I tested in on my wsl/windows machine and works fine.