1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00
nux-env/inc/labely.inc.sh
root a7b55553ad Nuweb drop
Signed-off-by: root <root@tdm-cloud.(none)>
2019-03-09 12:32:11 +01:00

22 lines
586 B
Bash
Executable file

##
## 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
}