Skip to content

dropimagesduetolackofannotation deletes all images when called on old CollectedData dataframes without multiindex - with fix  #2821

@aspence

Description

@aspence

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

dropimagesduetolackofannotation will delete all images in a labeled_data subfolder instead of only the ones that lack annotations when called on a folder with old style CollectedData that do not have the file path split across a multiindex.

was able to fix by adding:

    conversioncode.guarantee_multiindex_rows(DC)

before

annotatedimages = [fn[-1] for fn in DC.index]

between what are currently lines 225 adn 226 of trainingsetmanipulation.py.

I'm sorry i can't do a formal pull request - i haven't forked the code and gotten fully set up yet - will do.

Operating System

mac os ventura

DeepLabCut version

2.3.4 (fix line numbers above are for 2.3.9)

DeepLabCut mode

single animal

Device type

N/A

Steps To Reproduce

dlc.dropimagesduetolackofannotation(cfgp)

for a DLC project that has old style CollectedData.h5 without a multiindeex in the rows in labeled-data.

Relevant log output

No response

Anything else?

Thanks!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions