cvat icon indicating copy to clipboard operation
cvat copied to clipboard

Check for an extra leading directory in the uploaded dataset archives

Open zhiltsov-max opened this issue 3 years ago • 3 comments

My actions before raising this issue

  • [ ] Read/searched the docs
  • [ ] Searched past issues

Expected Behaviour

Current Behaviour

Users often upload an archive with an extra leading directory, which is created by an archiver when a common approach is used: select files -> make archive in the file explorer menu. There is a problem with this approach that it prevents us from locating a dataset in multiple cases. Currently, the problem is partially mitigated by making search for datasets in Datumaro recursive, but in some formats we don't just call "detect dataset", but we also do some extra actions, involving file search, and these searches are not aligned with the recursive search logic.

Possible Solution

Maybe, we should check the extracted files to only contain a single directory, and make the following actions inside that directory.

Steps to Reproduce (for bugs)

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

zhiltsov-max avatar Nov 01 '21 11:11 zhiltsov-max

@kirill-sizov, @IRDonch

zhiltsov-max avatar Nov 01 '21 11:11 zhiltsov-max

Makes sense to me. I think it's a better approach than trying to recursively search the archive for a dataset.

IRDonch avatar Nov 01 '21 11:11 IRDonch

Related https://github.com/openvinotoolkit/datumaro/pull/623

zhiltsov-max avatar Jan 14 '22 12:01 zhiltsov-max