Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LarvaTagger.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
LarvaTagger.jl
Commits
971f7155
Commit
971f7155
authored
3 years ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
initial larvatagger.jl command
parent
51cea8b1
No related branches found
No related tags found
No related merge requests found
Pipeline
#82488
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Manifest.toml
+7
-1
7 additions, 1 deletion
Manifest.toml
Project.toml
+1
-0
1 addition, 0 deletions
Project.toml
scripts/larvatagger.jl
+88
-0
88 additions, 0 deletions
scripts/larvatagger.jl
with
96 additions
and
1 deletion
Manifest.toml
+
7
−
1
View file @
971f7155
...
@@ -203,6 +203,12 @@ git-tree-sha1 = "5a4168170ede913a2cd679e53c2123cb4b889795"
...
@@ -203,6 +203,12 @@ git-tree-sha1 = "5a4168170ede913a2cd679e53c2123cb4b889795"
uuid
=
"31c24e10-a181-5473-b8eb-7969acd0382f"
uuid
=
"31c24e10-a181-5473-b8eb-7969acd0382f"
version
=
"0.25.53"
version
=
"0.25.53"
[[deps.DocOpt]]
deps
=
[
"Dates"
,
"Printf"
]
git-tree-sha1
=
"866efe767d646ee8c66b15ff22520c03a1200ca7"
uuid
=
"968ba79b-81e4-546f-ab3a-2eecfa62a9db"
version
=
"0.4.2"
[[deps.DocStringExtensions]]
[[deps.DocStringExtensions]]
deps
=
[
"LibGit2"
]
deps
=
[
"LibGit2"
]
git-tree-sha1
=
"b19534d1895d702889b219c382a6e18010797f0b"
git-tree-sha1
=
"b19534d1895d702889b219c382a6e18010797f0b"
...
@@ -858,7 +864,7 @@ version = "0.1.1"
...
@@ -858,7 +864,7 @@ version = "0.1.1"
[[deps.PlanarLarvae]]
[[deps.PlanarLarvae]]
deps
=
[
"DelimitedFiles"
,
"JSON3"
,
"MAT"
,
"Meshes"
,
"OrderedCollections"
,
"SHA"
,
"StaticArrays"
,
"StructTypes"
]
deps
=
[
"DelimitedFiles"
,
"JSON3"
,
"MAT"
,
"Meshes"
,
"OrderedCollections"
,
"SHA"
,
"StaticArrays"
,
"StructTypes"
]
git-tree-sha1
=
"
34279a2e3f91bc7dff05d7d02c8710eadd76fdaf
"
git-tree-sha1
=
"
20a9e95162e6226283a7024ab2352f9d08822d4a
"
repo-rev
=
"dev"
repo-rev
=
"dev"
repo-url
=
"https://gitlab.pasteur.fr/nyx/planarlarvae.jl"
repo-url
=
"https://gitlab.pasteur.fr/nyx/planarlarvae.jl"
uuid
=
"c2615984-ef14-4d40-b148-916c85b43307"
uuid
=
"c2615984-ef14-4d40-b148-916c85b43307"
...
...
This diff is collapsed.
Click to expand it.
Project.toml
+
1
−
0
View file @
971f7155
...
@@ -6,6 +6,7 @@ version = "0.3.0"
...
@@ -6,6 +6,7 @@ version = "0.3.0"
[deps]
[deps]
Colors
=
"5ae59095-9a9b-59fe-a467-6f913c188581"
Colors
=
"5ae59095-9a9b-59fe-a467-6f913c188581"
Dates
=
"ade2ca70-3891-5945-98fb-dc099432e06a"
Dates
=
"ade2ca70-3891-5945-98fb-dc099432e06a"
DocOpt
=
"968ba79b-81e4-546f-ab3a-2eecfa62a9db"
Formatting
=
"59287772-0a20-5a39-b81b-1366585eb4c0"
Formatting
=
"59287772-0a20-5a39-b81b-1366585eb4c0"
JSON3
=
"0f8b85d8-7281-11e9-16c2-39a750bddbf1"
JSON3
=
"0f8b85d8-7281-11e9-16c2-39a750bddbf1"
JSServe
=
"824d6782-a2ef-11e9-3a09-e5662e0c26f9"
JSServe
=
"824d6782-a2ef-11e9-3a09-e5662e0c26f9"
...
...
This diff is collapsed.
Click to expand it.
scripts/larvatagger.jl
0 → 100755
+
88
−
0
View file @
971f7155
#!/bin/bash
#=
PROJECT_DIR=$(dirname $(dirname $(realpath "${BASH_SOURCE[0]}")))
if [ "$1" == "open" ]; then FLAGS="-iq "; fi
exec julia --project="$PROJECT_DIR" --color=yes --startup-file=no $FLAGS\
"${BASH_SOURCE[0]}" "$@"
=#
using
DocOpt
using
PlanarLarvae
.
Datasets
,
PlanarLarvae
.
Formats
using
LarvaTagger
using
JSServe
:
JSServe
,
Server
usage
=
"""Larva Tagger.
Usage:
larvatagger.jl import <input-path> [<output-file>] [--id=<id>] [--framerate=<fps>]
larvatagger.jl open <input-path> [--backends=<path>] [--port=<number>] [--quiet]
larvatagger.jl open <input-path> [--viewer] [--browser]
larvatagger.jl train <backend-path> <data-repository> [--instance=<name>]
larvatagger.jl -h | --help
Options:
-h --help Show this screen.
-q --quiet Do not show instructions.
--id=<id> Run ID, e.g. `date_time`.
--framerate=<fps> Camera frame rate, in frames per second.
--backends=<path> Path to backend repository.
--port=<number> Port number the server listens to.
--viewer Disable editing capabilities.
--browser Automatically open a browser tab at the served location.
--instance=<name> Name of the trained model.
"""
function
main
()
parsed_args
=
docopt
(
usage
)
if
parsed_args
[
"import"
]
infile
=
parsed_args
[
"<input-path>"
]
outfile
=
parsed_args
[
"<output-file>"
]
kwargs
=
Dict
{
Symbol
,
Any
}()
framerate
=
parsed_args
[
"--framerate"
]
if
!
isnothing
(
framerate
)
kwargs
[
:
framerate
]
=
parse
(
Float64
,
framerate
)
end
file
=
load
(
infile
;
kwargs
...
)
runid
=
parsed_args
[
"--id"
]
run
=
Run
(
isnothing
(
runid
)
?
file
.
run
.
id
:
runid
,
Track
[];
file
.
run
.
attributes
[
:
metadata
]
...
)
run
.
attributes
[
:
labels
]
=
String
[]
Datasets
.
pushdependency!
(
run
,
infile
)
if
isnothing
(
outfile
)
Datasets
.
write_json
(
stdout
,
run
)
else
Datasets
.
to_json_file
(
outfile
,
run
)
end
elseif
parsed_args
[
"open"
]
verbose
=
!
parsed_args
[
"--quiet"
]
infile
=
parsed_args
[
"<input-path>"
]
if
parsed_args
[
"--viewer"
]
app
=
larvaviewer
(
infile
)
else
kwargs
=
Dict
{
Symbol
,
Any
}()
backends
=
parsed_args
[
"--backends"
]
if
!
isnothing
(
backends
)
kwargs
[
:
backend_directory
]
=
backends
end
app
=
larvaeditor
(
infile
;
kwargs
...
)
end
#
port
=
parsed_args
[
"--port"
]
port
=
isnothing
(
port
)
?
9284
:
parse
(
Int
,
port
)
server
=
Server
(
app
,
"0.0.0.0"
,
port
)
if
parsed_args
[
"--browser"
]
JSServe
.
openurl
(
"http://127.0.0.1:
$(port)
"
)
#display(JSServe.BrowserDisplay(), app)
elseif
verbose
@info
"The server is listening to http://127.0.0.1:
$(port)
"
end
if
verbose
@info
"Press Ctrl+D to kill the server"
end
elseif
parsed_args
[
"train"
]
@error
"not implemented yet"
end
end
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment