Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ImageNet preprocessing utilities #159

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ model = strip_softmax(model)
model = canonize(model)

# Load input
url = HTTP.URI("https://raw.githubusercontent.com/Julia-XAI/ExplainableAI.jl/gh-pages/assets/heatmaps/castle.jpg")
img = load(url)
input = preprocess_imagenet(img)
input = reshape(input, 224, 224, 3, :) # reshape to WHCN format
input = ... # input in WHCN format

# Run XAI method
composite = EpsilonPlusFlat()
Expand Down
5 changes: 0 additions & 5 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ NoiseAugmentation
InterpolationAugmentation
```

# Input preprocessing
```@docs
preprocess_imagenet
```

# Index
```@index
```
2 changes: 0 additions & 2 deletions src/ExplainableAI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ include("bibliography.jl")
include("utils.jl")
include("input_augmentation.jl")
include("gradient.jl")
include("preprocessing.jl")

export Gradient, InputTimesGradient
export NoiseAugmentation, SmoothGrad
export InterpolationAugmentation, IntegratedGradients
export preprocess_imagenet

end # module
32 changes: 0 additions & 32 deletions src/preprocessing.jl

This file was deleted.

4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ pseudorand(dims...) = rand(MersenneTwister(123), Float32, dims...)
@info "Testing input augmentation..."
include("test_input_augmentation.jl")
end
@testset "ImageNet preprocessing" begin
@info "Testing ImageNet preprocessing..."
include("test_imagenet.jl")
end
@testset "CNN" begin
@info "Testing analyzers on CNN..."
include("test_cnn.jl")
Expand Down
10 changes: 0 additions & 10 deletions test/test_imagenet.jl

This file was deleted.

Loading