umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
64 stars 5 forks source link

'Sort Behavior' wont show preview of behavior to sort #113

Closed mgamble1023 closed 6 months ago

mgamble1023 commented 6 months ago

Hello!,

I seem to have run into issue with the sort behavior. When I follow the directions and set-up to run the pop up box to showcase the image gives me nothing and I get error pasted below. I have tried multiple times to no avail. Incidentally, when I chose the wrong folder the first time it did load the extracted background image in the preview box without an issue.

Thanks!

image

yujiahu415 commented 6 months ago

@rohansatapathy Can you take a look into this? Thanks!

rohansatapathy commented 6 months ago

@mgamble1023 Sorry to hear you're running into issues with the sort behavior function! Could you please send the following information to help me debug the issue:

mgamble1023 commented 6 months ago

No need to apologize, I appreciate the help!

Operating system is Windows and LabGym version is 2.3.4. Image of the folder and command output is below. Interestingly, I cannot find that image specified. All the filenames start with that header, but as you can see in the attached image the name continues. If I search for that image nothing shows up.

image

Package                      Version            Editable project location
---------------------------- ------------------ --------------------------
absl-py                      2.1.0
antlr4-python3-runtime       4.9.3
astunparse                   1.6.3
black                        24.2.0
cachetools                   5.3.2
certifi                      2024.2.2
charset-normalizer           3.3.2
click                        8.1.7
cloudpickle                  3.0.0
colorama                     0.4.6
contourpy                    1.2.0
cycler                       0.12.1
detectron2                   0.6                c:\users\gamblm\detectron2
et-xmlfile                   1.1.0
filelock                     3.13.1
flatbuffers                  23.5.26
fonttools                    4.48.1
fsspec                       2024.2.0
fvcore                       0.1.5.post20221221
gast                         0.4.0
google-auth                  2.27.0
google-auth-oauthlib         0.4.6
google-pasta                 0.2.0
grpcio                       1.60.1
h5py                         3.10.0
hydra-core                   1.3.2
idna                         3.6
imageio                      2.34.0
iopath                       0.1.9
Jinja2                       3.1.3
joblib                       1.3.2
keras                        2.10.0
Keras-Preprocessing          1.1.2
kiwisolver                   1.4.5
LabGym                       2.3.4
lazy_loader                  0.3
libclang                     16.0.6
Markdown                     3.5.2
MarkupSafe                   2.1.5
matplotlib                   3.8.2
ml-dtypes                    0.2.0
mpmath                       1.3.0
mypy-extensions              1.0.0
networkx                     3.2.1
numpy                        1.26.4
oauthlib                     3.2.2
omegaconf                    2.3.0
opencv-contrib-python        4.9.0.80
opencv-python                4.9.0.80
openpyxl                     3.1.2
opt-einsum                   3.3.0
packaging                    23.2
pandas                       2.2.0
pathspec                     0.12.1
patsy                        0.5.6
pillow                       10.2.0
pip                          24.0
platformdirs                 4.2.0
portalocker                  2.8.2
protobuf                     3.19.6
pyasn1                       0.5.1
pyasn1-modules               0.3.0
pycocotools                  2.0.7
pyparsing                    3.1.1
python-dateutil              2.8.2
pytz                         2024.1
pywin32                      306
PyYAML                       6.0.1
requests                     2.31.0
requests-oauthlib            1.3.1
rsa                          4.9
scikit-image                 0.22.0
scikit-learn                 1.4.0
scikit-posthocs              0.8.1
scipy                        1.12.0
seaborn                      0.13.2
setuptools                   65.5.0
six                          1.16.0
statsmodels                  0.14.1
sympy                        1.12
tabulate                     0.9.0
tensorboard                  2.10.1
tensorboard-data-server      0.6.1
tensorboard-plugin-wit       1.8.1
tensorflow                   2.10.1
tensorflow-estimator         2.10.0
tensorflow-intel             2.15.0
tensorflow-io-gcs-filesystem 0.31.0
termcolor                    2.4.0
threadpoolctl                3.2.0
tifffile                     2024.2.12
tomli                        2.0.1
torch                        2.2.0
torchvision                  0.17.0
tqdm                         4.66.2
typing_extensions            4.9.0
tzdata                       2024.1
urllib3                      2.2.0
Werkzeug                     3.0.1
wheel                        0.42.0
wrapt                        1.14.1
wxPython                     4.2.1
XlsxWriter                   3.1.9
yacs                         0.1.8
rohansatapathy commented 6 months ago

Thanks for the info! It looks like this issue is being caused by a bug in how LabGym searches for pattern images and animations -- it seems like the period in the 60.0-420.0 part of the filename is causing LabGym to truncate the file name early when loading it. I'll get started on a fix for this bug right away, and you should be able to upgrade to a new version of LabGym in a day or two.

In the meanwhile, there might be a way for you to continue working on the current version of LabGym. By any chance, did you use the Preprocessing Module to trim the video between 60 and 420 seconds? If so, you should be able to avoid the error in behavior example sorting by removing the 60.0-420.0 section of the preprocessed video file name and regenerating your behavior examples.

mgamble1023 commented 6 months ago

That did indeed solve problem. Removing the 60-420 seconds (which was indeed created using the preprocessing module) made it work like a charm!