Package: vdtk
vdtk: Visual Description Evaluation ToolsThis tool is designed to allow for a deep investigation of diversity in visual description datasets, and to help users
understand their data at a token, n-gram, description, and dataset level.InstallationTo use this tool, you can easily pip install withpip install vdtk.Data formatIn order to prepare datasets to work with this tool, datasets must be formatted as JSON files with the following schema:# List of samples in the dataset[# JSON object for each sample{"_id":"string",# A string ID for each sample. This can help keep track of samples during use."split":"string",# A string corresponding to the split of the data. Default splits are "train", "validate" and "test""references":[# List of string references"reference 1...","reference 2...",],"candidates":[# List of string candidates (Optional)"candidate 1...","candidate 2...",],"media_path":"string",# (Optional) Path to the image/video (for image/video based metrics, recall experiemnts, etc.)"metadata":{}# Any JSON object. This field is not used by the toolkit at this time.}]UsageAfter installation, the basic menu of commands can be accessed withvdtk --help. We make several experiments/tools
available for use:CommandDetailsvocab-statsRun withvdtk vocab-stats DATASET_JSON_PATH. Compute basic token-level vocab statisticsngram-statsRun withvdtk ngram-stats DATASET_JSON_PATH. Compute n-gram statistics, EVS@N and ED@Ncaption-statsRun withvdtk caption-stats DATASET_JSON_PATH. Compute caption-level dataset statisticssemantic-varianceRun withvdtk semantic-variance DATASET_JSON_PATH. Compute within-sample BERT embedding semantic variancecoresetRun withvdtk coreset DATASET_JSON_PATH. Compute the caption coreset from the training split needed to solve the validation splitconcept-overlapRun withvdtk concept-overlap DATASET_JSON_PATH. Compute the concept overlap between popular feature extractors, and the datasetconcept-leave-one-outRun withvdtk concept-leave-one-out DATASET_JSON_PATH. Compute the performance with a coreset of concept captionsleave-one-outRun withvdtk leave-one-out DATASET_JSON_PATH. Compute leave-one-out ground truth performance on a dataset with multiple ground truthsAdditionally, several commands take multiple dataset JSONs, which can be used to compare different runs, or different datasets. Appending (:baseline) to any
of the JSON file paths will treat this run as a baseline, and compute relative values and coloring accordingly (example:vdtk score cider-d ./baseline.json:baseline ./model.json).CommandDetailsscoreRun withvdtk score [metric] DATASET_JSON_PATH_1, DATASET_JSON_PATH_2.... Compute BLEU/METEOR/CIDEr-D/ROUGE/BERTScore/MAUVE/etc. Guaranteed to be consistent with the COCO captioning tools (for use externally).clip-recallRun withvdtk clip-recall DATASET_JSON_PATH_1, DATASET_JSON_PATH_2.... Compute the MRR, and Recall@K values for candidate/reference captions based on the CLIP model.content-recallRun withvdtk content-recall DATASET_JSON_PATH_1, DATASET_JSON_PATH_2.... Compute Noun/Verb recall for the candidates against the references.For more details and options, see the--helpcommand for any of the commands above. Note that some tools are relatively
compute intensive. This toolkit will make use of a GPU if available and necessary, as well as a large number of CPU cores
and RAM depending on the task.Copyright 2021, Regents of the University of CaliforniaPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.