Skip to content
Snippets Groups Projects
Commit d6001093 authored by François  LAURENT's avatar François LAURENT
Browse files

version increment

parent 838d7a22
No related branches found
No related tags found
No related merge requests found
Pipeline #82661 failed
# This file is machine-generated - editing it directly is not advised # This file is machine-generated - editing it directly is not advised
julia_version = "1.7.1" julia_version = "1.7.0"
manifest_format = "2.0" manifest_format = "2.0"
[[deps.AbstractFFTs]] [[deps.AbstractFFTs]]
...@@ -864,11 +864,11 @@ version = "0.1.1" ...@@ -864,11 +864,11 @@ 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 = "20a9e95162e6226283a7024ab2352f9d08822d4a" git-tree-sha1 = "d231f3b1d82d26c4d4ce6077db95ddeb2e8236f0"
repo-rev = "dev" repo-rev = "main"
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"
version = "0.4.0" version = "0.5.0"
[[deps.PlotUtils]] [[deps.PlotUtils]]
deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"]
......
name = "LarvaTagger" name = "LarvaTagger"
uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d" uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d"
authors = ["François Laurent", "Institut Pasteur"] authors = ["François Laurent", "Institut Pasteur"]
version = "0.3.0" version = "0.4.0"
[deps] [deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
......
...@@ -9,43 +9,60 @@ To run `LarvaTagger.jl`, you will need [`julia>=1.6`](https://julialang.org/down ...@@ -9,43 +9,60 @@ To run `LarvaTagger.jl`, you will need [`julia>=1.6`](https://julialang.org/down
An example install procedure can be found in `scripts/make_demontrator.sh`. An example install procedure can be found in `scripts/make_demontrator.sh`.
## Install ## Install
In a fresh directory:
``` ```
git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger
cd LarvaTagger
julia --project=. -e 'using Pkg; Pkg.instantiate()' julia --project=. -e 'using Pkg; Pkg.instantiate()'
``` ```
## Run ## Run
In the same directory as above, launch the Julia interpreter:
### Using the Julia interpreter
In the `LarvaTagger` directory created above, launch the Julia interpreter:
``` ```
julia --project=. julia --project=.
``` ```
In the interpreter, to launch the editor, type: In the interpreter, to launch the editor, type:
``` ```
julia> using LarvaTagger; larvaeditor("path/to/file") julia> using LarvaTagger; larvaeditor("path/to/data/file")
``` ```
The first time the editor is loaded, it may take a while for a window in your webbrowser to open, and the data to be plotted. The first time the editor is loaded, it may take a while for a window in your webbrowser to open, and the data to be plotted.
The Firefox webbrowser showed better performance than Chrome-like webbrowsers. The Firefox web browser showed better performance than Chrome-like browsers.
To exit the interpreter, type `exit()` or press Ctrl+D.
### Using the `larvatagger.jl` script
To exit the interpreter, type `exit()`. The `LarvaTagger/scripts` directory contains a `larvatagger.jl` executable file.
To launch the editor, type:
```
scripts/larvatagger.jl open path/to/data/file
```
## Automatic tagging ## Automatic tagging
To extend the editor with `MaggotUBA` automatic tagging, still in the same directory: To extend the editor with `MaggotUBA` automatic tagging:
``` ```
git clone https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA -b 20220418 git clone https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA -b 20220418
cd MaggotUBA cd MaggotUBA
poetry install poetry install -vvv
cd .. cd ..
julia --project=.
``` ```
To let *larvaeditor* know about MaggotUBA, in the Julia interpreter, type:
The last command launches the Julia interpreter again. There, you can type: The last command launches the Julia interpreter again. There, you can type:
``` ```
julia> using LarvaTagger; larvaeditor("path/to/file"; backend_directory=".") julia> using LarvaTagger; larvaeditor("path/to/data/file"; backend_directory="path/to/MaggotUBA's/parent/directory")
```
Similarly, to let *larvatagger.jl* know about MaggotUBA:
```
scripts/larvatagger.jl open "path/to/data/file" --backends="path/to/MaggotUBA's/parent/directory"
``` ```
Note however that [`MaggotUBA-adapter`](https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter) requires the actual [`MaggotUBA`](https://gitlab.pasteur.fr/les-larves/structured-temporal-convolution/-/tree/dev-branch) code that is not open access. Note however that [`MaggotUBA-adapter`](https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter) requires the actual [`MaggotUBA`](https://gitlab.pasteur.fr/les-larves/structured-temporal-convolution/-/tree/dev-branch) code that is not open access yet.
As a consequence, it is likely the installation step fails. As a consequence, it is likely the installation step fails.
`MaggotUBA` and a supervised variant will be released in the near future. The `MaggotUBA` tagging core will be fully released in the near future.
...@@ -37,6 +37,10 @@ function main() ...@@ -37,6 +37,10 @@ function main()
parsed_args = docopt(usage) parsed_args = docopt(usage)
if parsed_args["import"] if parsed_args["import"]
infile = parsed_args["<input-path>"] infile = parsed_args["<input-path>"]
if !isfile(infile)
@error "File not found" $infile
return
end
outfile = parsed_args["<output-file>"] outfile = parsed_args["<output-file>"]
kwargs = Dict{Symbol, Any}() kwargs = Dict{Symbol, Any}()
framerate = parsed_args["--framerate"] framerate = parsed_args["--framerate"]
...@@ -52,11 +56,16 @@ function main() ...@@ -52,11 +56,16 @@ function main()
if isnothing(outfile) if isnothing(outfile)
Datasets.write_json(stdout, run) Datasets.write_json(stdout, run)
else else
outfile = joinpath(dirname(infile), outfile)
Datasets.to_json_file(outfile, run) Datasets.to_json_file(outfile, run)
end end
elseif parsed_args["open"] elseif parsed_args["open"]
verbose = !parsed_args["--quiet"] verbose = !parsed_args["--quiet"]
infile = parsed_args["<input-path>"] infile = parsed_args["<input-path>"]
if !isfile(infile)
@error "File not found" $infile
return
end
if parsed_args["--viewer"] if parsed_args["--viewer"]
app = larvaviewer(infile) app = larvaviewer(infile)
else else
...@@ -81,7 +90,7 @@ function main() ...@@ -81,7 +90,7 @@ function main()
@info "Press Ctrl+D to kill the server" @info "Press Ctrl+D to kill the server"
end end
elseif parsed_args["train"] elseif parsed_args["train"]
@error "not implemented yet" @error "Not implemented yet"
end end
end end
......
...@@ -16,42 +16,52 @@ fi ...@@ -16,42 +16,52 @@ fi
# make the `julia` command available on the commandline # make the `julia` command available on the commandline
export PATH=~/.local/bin:$PATH export PATH=~/.local/bin:$PATH
# get LarvaTagger.jl source # get LarvaTagger.jl source
git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger # (the dev branch is used here for testing before release)
git clone https://gitlab.pasteur.fr/nyx/larvatagger.jl LarvaTagger -b dev
cd LarvaTagger cd LarvaTagger
# install LarvaTagger.jl # install LarvaTagger.jl
julia --project=. -e 'using Pkg; Pkg.instantiate()' julia --project=. -e 'using Pkg; Pkg.instantiate()'
if ! [ -x ~/.local/bin/larvatagger.jl ]; then
pushd ~/.local/bin
ln -s ~/LarvaTagger/scripts/larvatagger.jl .
popd
fi
# get MaggotUBA source and trained models - open-source part # get MaggotUBA source and trained models - open-source part
git clone https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA -b 20220418 git clone https://gitlab.pasteur.fr/nyx/MaggotUBA-adapter MaggotUBA -b 20220418
cd MaggotUBA cd MaggotUBA
# install Poetry # install Poetry
python3 -m pip install poetry python3 -m pip install poetry
# copy MaggotUBA source - "firmware" part # install MaggotUBA; this step requires access to a private repo;
cp -r /home/share/structured-temporal-convolution . # for a new user with no ssh or gpg keys, this is done logging in with `ssh -A` instead of `su`
# install MaggotUBA
python3 -m poetry add ./structured-temporal-convolution
python3 -m poetry install python3 -m poetry install
cd .. cd
# copy sample data # copy sample data
cp -r /home/share/t15 . cp -r /home/share/t15 .
# autolaunch `larvaeditor` on starting `julia` example_file="$HOME/t15/GMR_SS02113@UAS_Chrimson_Venus_X_0070/r_LED100_30s2x15s30s#n#n#n@100/20140918_170215/20140918_170215@GMR_SS02113@UAS_Chrimson_Venus_X_0070@t15@r_LED100_30s2x15s30s#n#n#n@100.spine"
mkdir -p ~/.julia/config
cat <<"EOT" > ~/.julia/config/startup.jl
if endswith(pwd(), "LarvaTagger")
using JSServe
port = occursin("anzhou", pwd()) ? 9285 : 9286
JSServe.configure_server!(listen_port=port)
using LarvaTagger
app = larvaeditor("t15/GMR_SS02113@UAS_Chrimson_Venus_X_0070/r_LED100_30s2x15s30s#n#n#n@100/20140918_170215/20140918_170215@GMR_SS02113@UAS_Chrimson_Venus_X_0070@t15@r_LED100_30s2x15s30s#n#n#n@100.spine"; backend_directory=".")
println("As soon as the `julia>` prompt appears below, in your web browser")
println("you can go to: http://127.0.0.1:$port/browser-display")
display(app)
end
EOT
# make a `larvatagger` command # make a `larvatagger` command
if [ -z "$(grep 'alias larvatagger=' ~/.bash_aliases)" ]; then if [ $USER = anzhou ]; then
echo "alias larvatagger='cd ~/LarvaTagger; julia --project=. --banner=no'" >> ~/.bash_aliases # for user 1
port=9285
else
# for user 2
port=9286
fi
if ! [ -f ~/.bash_aliases ] || [ -z "$(grep 'alias larvatagger=' ~/.bash_aliases)" ]; then
echo "alias larvatagger='$HOME/LarvaTagger/scripts/larvatagger.jl open \"${example_file}\" --port=${port} --backends=\"$HOME/LarvaTagger\"'" >> ~/.bash_aliases
fi fi
# let the user know about the latter command on every login # let the user know about the latter command on every login
if [ -z "$(grep 'echo start the Nyx' ~/.bashrc)" ]; then if [ -z "$(grep 'echo start the Nyx' ~/.bashrc)" ]; then
echo "echo start the Nyx tagging UI with command: larvatagger" >> ~/.bashrc cat <<EOT >> ~/.bashrc
echo start the Nyx tagging UI with command: larvatagger
echo or, for a richer interface, type: larvatagger.jl
echo
echo more changes with v0.4:
echo \* no need to add \"/browser-display\" after http://localhost:$port
echo \* step forward/backward with the right/left arrow keys on your keyboard
echo \* simultaneously tag individual time steps with buttons at the bottom
echo
echo a few tips:
echo \* pan the larva view holding the right mouse button
echo \* to properly refresh the page, press Ctrl+F5 instead of F5 alone
EOT
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment