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

Video file name / url in output file #56

Closed
BrunoLansacSBD opened this issue Sep 13, 2018 · 7 comments
Closed

Video file name / url in output file #56

BrunoLansacSBD opened this issue Sep 13, 2018 · 7 comments
Assignees
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request
Milestone

Comments

@BrunoLansacSBD
Copy link

Hi,
First of all, thanks for the tool. It works great!

When I annotate video files, and for that purpose I create an annotation task per video, I cannot seem to find any reference to the original video name / path / url inside the task itself. Moreover, inside the output XML file generated after annotating, there are no references to that information at all. The only thing I can find is the url of the corresponding task, but I don't think I can extract from that url the information I'm looking for (i.e. the name of the video).

The only workaround I can think of is naming the annotation task after the video itself, and do the same for the xml file. However, I don't really like that solution. The ideal solution for me would be to have video file name inside the xml file.

Am I missing something? Please point me in the right direction.

Thank you very much

@nmanovic
Copy link
Contributor

Hi @BrunoLansacSBD ,

I believe it can be useful information. Could you please prepare a merge request for the feature?

@nmanovic nmanovic added enhancement New feature or request good first issue Easy to fix The issue is easy to fix and probably it will be release in a next minor release labels Sep 18, 2018
@nmanovic nmanovic added this to the Release 0.3.0 milestone Sep 18, 2018
@BrunoLansacSBD
Copy link
Author

Hi @nmanovic ,

Could you please give me a hint on where in the code should I implement that? I'm sure it is by far easier for you to point me in the right direction than me going through all the code.

Thanks

@nmanovic
Copy link
Contributor

Hi @BrunoLansacSBD ,

I believe you need to modify 'dump' function here: https://github.com/opencv/cvat/blob/develop/cvat/apps/engine/annotation.py#L1636

Also it seems that we don't have name of video file into DB. There are two solutions:

@nmanovic nmanovic modified the milestones: Release 0.3.0, Alpha 0.3.0 Sep 25, 2018
@nmanovic nmanovic self-assigned this Oct 17, 2018
nmanovic added a commit that referenced this issue Oct 24, 2018
Fix #56
* Added extra field into meta section of a dump file.
* Add SafeCharField.
@edumotya
Copy link
Contributor

edumotya commented May 7, 2019

Still cannot find video filename at dumped xml annotations:

<?xml version="1.0" encoding="utf-8"?>
<annotations>
  <version>1.1</version>
  <meta>
    <task>
      <id>17</id>
      <name>TASK_NAME</name>
      <size>780</size>
      <mode>interpolation</mode>
      <overlap>5</overlap>
      <bugtracker></bugtracker>
      <flipped>False</flipped>
      <created>2019-05-07 17:18:40.352595+03:00</created>
      <updated>2019-05-07 17:18:40.352623+03:00</updated>
      <labels>
        <label>
          <name>car</name>
          <attributes>
            <attribute>
              <name>color</name>
              <mutable>False</mutable>
              <input_type>select</input_type>
              <default_value>blue</default_value>
              <values>blue
</values>
            </attribute>
          </attributes>
        </label>
        <label>
          <name>red</name>
          <attributes>
          </attributes>
        </label>
      </labels>
      <segments>
        <segment>
          <id>25</id>
          <start>0</start>
          <stop>779</stop>
          <url>http://xxxxxx:8080/?id=25</url>
        </segment>
      </segments>
      <owner>
        <username>ADMIN</username>
        <email>[email protected]</email>
      </owner>
      <original_size>
        <width>1920</width>
        <height>1080</height>
      </original_size>
    </task>
    <dumped>2019-05-07 17:47:21.629405+03:00</dumped>
  </meta>
</annotations>

@nmanovic
Copy link
Contributor

@azhavoro , could you please slightly improve your patch and implement the feature?

@nmanovic
Copy link
Contributor

nmanovic commented Aug 2, 2019

It is already fixed in develop branch.

    </task>
    <dumped>2019-08-02 17:16:00.652366+03:00</dumped>
    <source>zy4VPKKrS+2t4XQYOM28jQ.MOV</source>
  </meta>

@nmanovic nmanovic closed this as completed Aug 2, 2019
@johan-sightic
Copy link

johan-sightic commented Mar 17, 2022

@nmanovic is this solved? I can't see the name of the file anywhere in a "CVAT for video 1.1" export.
Are people using CVAT with out this feature? I don't understand how that is possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants