mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Introduced new libraries for mime, thumbnails, labels
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
0ab8c73e07
commit
e173c4613c
4 changed files with 219 additions and 0 deletions
22
inc/labely.inc.sh
Normal file
22
inc/labely.inc.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
##
|
||||
## Set of support functions for labelImg Xmls
|
||||
|
||||
labely.labels.get() {
|
||||
local path="$1"
|
||||
local filename=$(basename "$1")
|
||||
local dirname=$(dirname "$1")
|
||||
local labelXml="$dirname/.labely/${filename%.*}.xml"
|
||||
nux.log info Looking for $labelXml
|
||||
if [ -e $labelXml ] ; then
|
||||
xmlstarlet sel -T -t \
|
||||
-m "/annotation/object" \
|
||||
-v "name" -o " " \
|
||||
-m "bndbox" \
|
||||
-v "/annotation/size/width" -o " " \
|
||||
-v "/annotation/size/height" -o " " \
|
||||
-v "xmin" -o " " \
|
||||
-v "ymin" -o " " \
|
||||
-v "xmax" -o " " \
|
||||
-v "ymax" -n $labelXml
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue