Install and ImageSegmentation.jl

I’m working with Image Segmentation.jl

I have problems installing or adding said package

julia> import Pkg

julia> Pkg.add("ImageSegmentation")
  Updating registry at `C:\Users\gerso\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SIUnits [b9d75638]:
 SIUnits [b9d75638] log:
 ├─possible versions are: [0.0.1-0.0.6, 0.1.0] or uninstalled
 ├─restricted by julia compatibility requirements to versions: uninstalled
 └─restricted by compatibility requirements with Images [916415d5] to versions: [0.0.1-0.0.6, 0.1.0] — no versions left
   └─Images [916415d5] log:
     ├─possible versions are: [0.2.0-0.2.50, 0.3.0-0.3.3, 0.4.0-0.4.50, 0.5.0-0.5.14, 0.6.0-0.6.1, 0.7.0, 0.8.0, 0.9.0-0.9.1, 0.10.0-0.10.1, 0.11.0-0.11.5, 0.12.0, 0.13.0, 0.14.0, 0.15.0-0.15.1, 0.16.0-0.16.1, 0.17.0-0.17.3] or uninstalled
     └─restricted to versions 0.17.2 by an explicit requirement, leaving only versions 0.17.2

It looks like you’ve pinned the version of Images you’re using somehow.

apparently yes, but I want to install or add that package but I think it’s an error

What does ]status show?

julia> Pkg.status()
    Status `C:\Users\gerso\.julia\environments\v1.1\Project.toml`
  [5ae59095] Colors v0.9.5
  [150eb455] CoordinateTransformations v0.5.0
  [5789e2e9] FileIO v1.0.6
  [4c0ca9eb] Gtk v0.16.5
  [27996c0f] GtkReactive v0.5.3
  [2803e5a7] ImageAxes v0.5.0
  [4381153b] ImageDraw v0.1.0
  [6a3955dd] ImageFiltering v0.5.4
  [6218d12a] ImageMagick v0.7.1
  [bc367c6b] ImageMetadata v0.6.1
  [02fcd773] ImageTransformations v0.7.2
  [86fae568] ImageView v0.8.2
  [916415d5] Images v0.17.3
  [91a5bcdd] Plots v0.24.0
  [2913bbd2] StatsBase v0.29.0
  [5e47fb64] TestImages v0.4.1
  [bd07be1c] Winston v0.14.1

Are any of them pinned in the manifest file C:\Users\gerso\.julia\environments\v1.1\Manifest.toml?

Some of them are fixed in the manifest file.

and how do I know if it is fixed or not?

Excuse my ignorance but I’m just starting to use Julia.

now I get this


julia> img = load("src/assets/segmentation/horse.jpg")
[ Info: Recompiling stale cache file C:\Users\gerso\.julia\compiled\v1.1\ImageMagick\0LbNX.ji for ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1]
Error encountered while loading "src/assets/segmentation/horse.jpg".
Fatal error:
ERROR: UnableToOpenBlob `src/assets/segmentation/horse.jpg': No such file or directory @ error/blob.c/OpenBlob/2873
Stacktrace:
 [1] handle_error(::ErrorException, ::FileIO.File{FileIO.DataFormat{:JPEG}}) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\error_handling.jl:80
 [2] handle_exceptions(::Array{Any,1}, ::String) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\error_handling.jl:75 [3] #load#27(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::FileIO.File{FileIO.DataFormat{:JPEG}}) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\loadsave.jl:193
 [4] load(::FileIO.File{FileIO.DataFormat{:JPEG}}) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\loadsave.jl:172
 [5] #load#13(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\loadsave.jl:118
 [6] load(::String) at C:\Users\gerso\.julia\packages\FileIO\e8FNK\src\loadsave.jl:118
 [7] top-level scope at none:0

Hmm, looks like the docs omit the fact that you’d have to issue that from the relevant directory. Try cloning GitHub - JuliaImages/juliaimages.github.io: Documentation For JuliaImages and then issue that command from the docs/ directory (which has the path you’re asking about).

There are many easy-to-access images in the TestImages package, where you can use testimage("lighthouse") from any directory.

Could you help me teaching how to do it? please

and the docs at

https://testimages.juliaimages.org/