CannyLab / vdtk

Visual Description Dataset Analysis Toolkit
MIT License
10 stars 2 forks source link

robustness issues on commands: ngram_stats , coreset , qualitative_sample , clip_recall & content_recall #4

Closed bardout closed 1 year ago

bardout commented 1 year ago

I found VDTK quite usefull as implementation all semantic metrics at the dataset level, and used it to compare my dataset for Remote Sensing with previous, as RSICD and RSITMD. However there are a few robustess issues in VDTK. Often a simple test would allow to continue computing with partial results. I have only attempted correction for some of these. Did somebody also encounter issues and modified this code ?

Environment

$uname -a
Linux minds01.irtse-pf.ext 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
# conda install follows : vdtk_min.yaml

name: geo2
channels:
  - conda-forge
  - defaults

dependencies:
- pip=21.2.4
- pip:
  - flake8-black>=0.3.6
  - tensorflow==2.12.0
  - sentence-transformers==2.2.2
  - bert-score==0.3.13
  - spacy==3.5.2
  - vdtk==0.3.0
  - rich==13.3.4
  - python-levenshtein

Observations

I coded a simple converter to COCO format from the format used in RSICD , RSITMD and my own set. These datasets are attached in zip, directly usable with vdtk.

DavidMChan commented 1 year ago

Thanks! Sorry for not noticing these issues, since I haven't been monitoring the repo (I guess my watch settings were off). I'll try to take a look at some of this after the EMNLP deadline on Friday. That being said, this repo is definitely in need of a bit of TLC, since it's been a while since I've touched it.

DavidMChan commented 1 year ago

I've just pushed a new commit that resolves several of these issues.

_ngramstats fails on RSITMD in env geo2 This was caused by a missing command line argument. Fixed.

coreset fails all sets: division by zero coreset.py This is caused when the test split has length 0 (as is the case in this dataset), you can get stats by explicitly changing the split that the metric is running on (for example, changing to the train spit). I've fixed this bug, however, so it doesn't error, and instead reports 0s.

sample: on geotruth (OK RSICD, RSITMD) max() arg is an empty sequence This happens when there is no data to sample from. I've added checks which error earlier in this case.

_clip_recall on RSICD: No such file or directory: 'airport1.jpg' This happens when the paths in the dataset aren't relative to the local directory. You can use the command line argument --media-root to adjust the root directory for the images.

_cliprecall on RSICD : zero-size array to reduction operation maximum This happens because your datasets have no "candidates" i.e. predictions for the references

Content Recall : all nan . Why ? This happens because your datasets have no "candidates" i.e. predictions for the references

bardout commented 1 year ago

Bonjour David,

Thank you first for your reply, and your interests in these issues (Also for issue 3 about zombie processes). I found the application of semantic metrics to Dataset only in this place, and the tool is therefore very useful. I have not verified how the corrections and recommendations apply to our data. As soon as metrics will be completed, these will be checked.

Cordially, Yves De : David Chan @.> Envoyé : mardi 27 juin 2023 22:38 À : CannyLab/vdtk @.> Cc : BARDOUT Yves @.>; Author @.> Objet : Re: [CannyLab/vdtk] robustness issues on commands: ngram_stats , coreset , qualitative_sample , clip_recall & content_recall (Issue #4)

I've just pushed a new commit that resolves several of these issues.

ngram_stats fails on RSITMD in env geo2 This was caused by a missing command line argument. Fixed.

coreset fails all sets: division by zero coreset.py This is caused when the test split has length 0 (as is the case in this dataset), you can get stats by explicitly changing the split that the metric is running on (for example, changing to the train spit). I've fixed this bug, however, so it doesn't error, and instead reports 0s.

sample: on geotruth (OK RSICD, RSITMD) max() arg is an empty sequence This happens when there is no data to sample from. I've added checks which error earlier in this case.

clip_recall on RSICD: No such file or directory: 'airport_1.jpg' This happens when the paths in the dataset aren't relative to the local directory. You can use the command line argument --media-root to adjust the root directory for the images.

clip_recall on RSICD : zero-size array to reduction operation maximum This happens because your datasets have no "candidates" i.e. predictions for the references

Content Recall : all nan . Why ? This happens because your datasets have no "candidates" i.e. predictions for the references

— Reply to this email directly, view it on GitHubhttps://github.com/CannyLab/vdtk/issues/4#issuecomment-1610178401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACAWCFL5SOMSRCHXPQSRLRTXNNACDANCNFSM6AAAAAAZHVSSNI. You are receiving this because you authored the thread.Message ID: @.**@.>>