Guest User

Untitled

a guest
Feb 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <annotation>
  2. <folder>Definitiva</folder>
  3. <filename>armas (1)</filename>
  4. <path>C:UsersRobDesktopDefinitivaarmas (1).jpg</path>
  5. <source>
  6. <database>Unknown</database>
  7. </source>
  8. <size>
  9. <width>240</width>
  10. <height>145</height>
  11. <depth>3</depth>
  12. </size>
  13. <segmented>0</segmented>
  14. <object>
  15. <name>pistol</name>
  16. <pose>Unspecified</pose>
  17. <truncated>0</truncated>
  18. <difficult>0</difficult>
  19. <bndbox>
  20. <xmin>3</xmin>
  21. <ymin>1</ymin>
  22. <xmax>128</xmax>
  23. <ymax>100</ymax>
  24. </bndbox>
  25. </object>
  26.  
  27. for name in *.xml; do X='/annotation/object/bndbox/xmin'
  28. Y='/annotation/size/width' Z=$X/$Y xmlstarlet ed --inplace -u
  29. '/annotation/object/bndbox/xmin' -v "$Z" "$name"; done
Add Comment
Please, Sign In to add comment