Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
29467871
Commit
29467871
authored
Sep 13, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made this script more robust
parent
c7051ef6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
copy_imglab_dataset
tools/imglab/copy_imglab_dataset
+3
-3
No files found.
tools/imglab/copy_imglab_dataset
View file @
29467871
...
@@ -13,10 +13,10 @@ DEST=$2
...
@@ -13,10 +13,10 @@ DEST=$2
FILES
=
`
imglab
--files
$XML_FILE
| xargs perl
-e
'use File::Spec; foreach (@ARGV) {print File::Spec->abs2rel($_) . "\n"}'
|
sort
|
uniq
`
mkdir
-p
$DEST
mkdir
$DEST
# Get the list of files we need to copy, then build the cp statements with 1000 files at most in each statement, then tell bash to run them all.
cp
-a
--parents
$FILES
$DEST
imglab
--files
$XML_FILE
| xargs perl
-e
'use File::Spec; foreach (@ARGV) {print File::Spec->abs2rel($_) . "\n"}'
|
sort
|
uniq
| xargs
-L1000
echo
| xargs
-I
{}
echo cp
-a
--parents
{}
$DEST
| bash
convert_imglab_paths_to_relative
$XML_FILE
>
$DEST
/
$(
basename
$XML_FILE
)
convert_imglab_paths_to_relative
$XML_FILE
>
$DEST
/
$(
basename
$XML_FILE
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment