Skip to content

Commit 0e7ac30

Browse files
committed
Mix format
1 parent 3a0cb9a commit 0e7ac30

7 files changed

Lines changed: 16 additions & 7 deletions

File tree

config/dev.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ config :nx,
55

66
config :logger,
77
level: :warning
8-

config/test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ config :logger,
77
# preprocessing) through EXLA. This includes Apple Silicon — EXLA's
88
# XLA CPU path uses NEON/AMX and is significantly faster than the
99
# pure-Elixir Nx.Defn.Evaluator for both preprocessing and inference.
10-
config :nx, :default_defn_options, [compiler: EXLA]
10+
config :nx, :default_defn_options, compiler: EXLA

lib/detection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if ImageVision.ortex_configured?() do
6969
keyboard cell_phone microwave oven toaster sink refrigerator
7070
book clock vase scissors teddy_bear hair_drier toothbrush
7171
)
72-
|> Enum.map(&String.replace(&1, "_", " "))
72+
|> Enum.map(&String.replace(&1, "_", " "))
7373

7474
@typedoc """
7575
A single detected object.

lib/segmentation.ex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ if ImageVision.ortex_configured?() do
186186
encode_sam_prompt(prompt, orig_w, orig_h, input_scale)
187187

188188
{masks_raw, iou_preds} =
189-
sam_decode(decoder, image_embed, high_res_feats_0, high_res_feats_1,
189+
sam_decode(
190+
decoder,
191+
image_embed,
192+
high_res_feats_0,
193+
high_res_feats_1,
190194
point_coords,
191195
point_labels
192196
)
@@ -463,7 +467,11 @@ if ImageVision.ortex_configured?() do
463467
{coords, labels}
464468
end
465469

466-
defp sam_decode(decoder, image_embed, high_res_feats_0, high_res_feats_1,
470+
defp sam_decode(
471+
decoder,
472+
image_embed,
473+
high_res_feats_0,
474+
high_res_feats_1,
467475
point_coords,
468476
point_labels
469477
) do

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ defmodule ImageVision.MixProject do
103103
%{
104104
"GitHub" => "https://github.com/elixir-image/image_vision",
105105
"Readme" => "https://github.com/elixir-image/image_vision/blob/v#{@version}/README.md",
106-
"Changelog" => "https://github.com/elixir-image/image_vision/blob/v#{@version}/CHANGELOG.md",
106+
"Changelog" =>
107+
"https://github.com/elixir-image/image_vision/blob/v#{@version}/CHANGELOG.md",
107108
"image" => "https://hex.pm/packages/image",
108109
"libvips" => "https://www.libvips.org"
109110
}

test/classification_test.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ defmodule Image.ClassificationTest do
1919
describe "classify/2" do
2020
test "returns a predictions map with label and score keys" do
2121
image = Image.open!(Path.join(@images, "puppy.webp"))
22+
2223
assert %{predictions: [%{label: label, score: score} | _rest]} =
2324
Image.Classification.classify(image)
2425

test/segmentation_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ defmodule Image.SegmentationTest do
8484
median = ious |> Enum.sort() |> Enum.at(div(length(ious), 2))
8585

8686
assert median > 0.1,
87-
"median IoU across corpus is #{Float.round(median, 3)} — expected > 0.1 (per-image: #{inspect Enum.map(ious, &Float.round(&1, 3))})"
87+
"median IoU across corpus is #{Float.round(median, 3)} — expected > 0.1 (per-image: #{inspect(Enum.map(ious, &Float.round(&1, 3)))})"
8888
end
8989
end
9090

0 commit comments

Comments
 (0)