Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show image names or video name in UI (now frame numbers only) #170

Closed
4sfaloth opened this issue Oct 31, 2018 · 12 comments
Closed

Show image names or video name in UI (now frame numbers only) #170

4sfaloth opened this issue Oct 31, 2018 · 12 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Milestone

Comments

@4sfaloth
Copy link

I have created a large task (thousands of images), and am trying to generate pre-annotations using an external program. The issue, I do not know which imageId corresponds to each image. I have tried to "Dump Annotations", but that only shows me the Ids for the frames that already have annotations.

Only workaround I can think of is to upload some dummy annotations' file with at least one object per image, and then dumping those annotations to check which imageId corresponds to each image.

Am I missing something? Is there an easier way to achieve this?

@nmanovic
Copy link
Contributor

Hi @4sfaloth,

Currently it works the following way: take all images, sort them by name. In the array first image will have id=0, second id=1, ...

@nmanovic nmanovic added the question Further information is requested label Oct 31, 2018
@4sfaloth
Copy link
Author

Hi @nmanovic ,

thank you for your fast reply. I was under the impression that might be the case, since I had noticed that in previous datasets.

However, in this one I have:

  • Several subfolders (In 'shared' I just selected all the folders, I believe it orders first by folder name then by filename?)
  • Unfortunately some of the folders and filenames have funny characters. In particular, there are some that start with a '. I believe this is messing up the ordering (or at least the order did not match the one I "guesses")

Is there really no way as of now to find out the id for each image, through its filename for instance?

@nmanovic
Copy link
Contributor

Hi @4sfaloth ,

ID for an image corresponds to assigned frame number. Code which calculates ID is very simple. It sorts all image paths in lexicographic order and assign ids in accordance with algorithm which I described above.

@4sfaloth
Copy link
Author

Alright, thank you. I'll close the issue

@4sfaloth 4sfaloth reopened this Dec 20, 2018
@4sfaloth
Copy link
Author

Just to clarify to anyone who might do the same errors as myself: 'lexicographic order' implies that all capital letters precede lowercase letters.
This is important because many file-explorer APIs will iterate over your files in (almost) lexicographic order, the almost being due to that many of them ignore capitalization

@4sfaloth 4sfaloth reopened this Dec 20, 2018
@4sfaloth
Copy link
Author

@nmanovic is it possible to dive into more detail into the sortering algorithm?
In particular I highly suspect (though I cannot prove it...) that it does not follow the same ordering as the python .sort method applied to a list of strings (which is also supposed to be lexicographic order). It seems to be the same in ALMOST all cases, but not always. Mind that I am talking about full filenames with complex paths, with special characters such as '_' , '.' and '+' in them

@nmanovic
Copy link
Contributor

@4sfaloth ,

There are no any details. It is just sort call for a python array of strings: https://github.com/opencv/cvat/blob/4aefbe2630908a7ad20f67e473e5b5e7015e4cec/cvat/apps/engine/task.py#L321

@4sfaloth
Copy link
Author

@4sfaloth ,

There are no any details. It is just sort call for a python array of strings:

cvat/cvat/apps/engine/task.py

Line 321 in 4aefbe2

filenames.sort()

@nmanovic thanks a lot. I am also using python to sort the filenames before uploading the annotations, so they should be matching now
There might be something weirder going on on my side then as well; I will try to debug it more exhaustively when I find the time.

@4sfaloth
Copy link
Author

@nmanovic
just one more question. Do you think it is possible python's sort yields different results when running under Windows and Linux?

@nmanovic
Copy link
Contributor

@4sfaloth ,

I don't think so.

@otten456
Copy link

@nmanovic I have an idea for a new feature related to this issue:
Once a task is created you have no information about the relation between the image-IDs and original filenames (except dumping the annotations). It would be nice to have some kind of overview / meta information regarding the created tasks, in order to be aware which images / image-sets are included in a specific task

@nmanovic nmanovic reopened this Apr 24, 2019
@nmanovic nmanovic changed the title Finding out images' Ids Show image names or video name in UI (now frame numbers only) Apr 24, 2019
@nmanovic nmanovic added enhancement New feature or request good first issue labels Apr 24, 2019
@nmanovic nmanovic added this to the 0.5.0 - Beta milestone Apr 24, 2019
@nmanovic nmanovic removed the question Further information is requested label Apr 24, 2019
@nmanovic
Copy link
Contributor

It makes sense to implement in new UI. Moved to v1.0.0 version.

@nmanovic nmanovic added the duplicate This issue or pull request already exists label Mar 21, 2020
@nmanovic nmanovic modified the milestones: 1.0.0 - Beta, 1.0.0 - Alpha Mar 21, 2020
TOsmanov pushed a commit to TOsmanov/cvat that referenced this issue Aug 23, 2021
…DAR, Datumaro) (cvat-ai#170)

* support etxs in camvid

* update coco format

* update icdar format

* update cvat format

* add datumaro format tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants