AWS has errors processing certain images
When running MATLAB models without smoothing on the sample images provided, AWS model running fails on some images but not others.
The images that worked were flipped_person, cat_on_tower, cat_on_box, bar_colours, and O_Q. The images that did not work were repin, monkey, dalmatian, clowns, and shishkin.
The specific error message is
Index in position 3 exceeds array bounds (must not exceed 1).
Error in aws
Error in AWS_wrap (line 51)
[~, salmap] = evalc('aws(img,1,2.1)');
[AWS] Error processing image ./clowns.jpg.
Steps to reproduce: initialize the below as an experiment.yaml file within SMILER on MacOS, the run SMILER on said file:
experiment:
name: Simple Example
description: An illustrative example of how to set up SMILER YAML experiments.
input_path: ./SMILER/examples/input_images
base_output_path: /tmp/test_out
parameters:
do_smoothing: none
runs:
- algorithm: AWS
output_path: ./SMILER/smiler_tools/smiler_tools/exp_output/AWS
parameters:
do_smoothing: default
I've gotten this error too, but when I specify the parameters with params = struct("color_space", "HSV") and run AWS_map = AWS_wrap(img_path,params); I no longer get that error message.
When running without any parameters on my computer, bar_colours.png, cat_in_box.jpg, cat_on_tower.jpg, clowns.jpg, dalmatian.jpg, flipped_person.jpeg, and O_Q.png all succeed, but monkey.jpg, repin.jpg, and shishkin.jpg fail.
When I run with the parameters @richanghmc suggested on the ones that failed before, repin.jpg succeeds but monkey.jpg and shishkin.jpg still fail.
My error message is similar to @al1729's, but not quite the same. Specifically, I get
Index in position 3 exceeds array bounds. Index must not exceed 1.
Error in aws
Error in AWS_wrap (line 49)
[~, salmap] = evalc('aws(img,1,2.1)');
which has a different line number. My system is Windows 10 running MATLAB R2021b.
When running without any parameters on my computer the following images succeed: repin.jpg, O_Q.png, flipped_person.jpeg, cat_on_tower.jpg, cat_in_box.jpg, bar_colours.png. The images that fail are: clowns.jpg, dalmatian.jpg, monkey.jpg, and shishkin.jpg.
When I run with the suggested parameters on my previous failures I find that dalmatian.jpg, monkey.jpg, and shishkin.jpg still fail.
The error I get more or less matches @f-wright 's and is
Index in position 3 exceeds array bounds (must not exceed 1).
Error in aws
Error in AWS_wrap (line 49)
[~, salmap] = evalc('aws(img,1,2.1)');
My system is Windows 10 running MATLAB R2021a.
When running without any parameters on my computer, O_Q.png, bar_colours.png, cat_in_box.jpg, cat_on_tower.jpg, flipped_person.jpeg, and repin.jpg succeed. clowns.jpg, dalmatian.jpg, monkey.jpg, and shishkin.jpg fail.
When I run the suggested parameters on the previous failures, clowns.jpg now succeeds, but dalmatian.jpg, monkey.jpg, and shishkin.jpg still fail.
When running with parameters on the previous successes, cat_in_box.jpg and repin.jpg now fail.
The output images of the successes with and without parameters are also noticeably different for bar_colours.png, cat_on_tower.jpg, and flipped_person.jpg. With parameters, the differences (like the flipped person) are given more attention and there are fewer objects highlighted in general. O_Q.png looks the same with and without parameters.
The error message I get overall matches the previous ones:
Index in position 3 exceeds array bounds. Index must not exceed 1.
Error in aws
Error in AWS_wrap (line 49)
[~, salmap] = evalc('aws(img,1,2.1)');
Summary:
Succeeds with and without parameters: O_Q.png, bar_colours.png, cat_on_tower.jpg, flipped_person.jpg. Succeeds only with parameters: clowns.jpg Succeeds only without parameters: cat_in_box.jpg, repin.jpg Fails with and without parameters: dalmatian.jpg, monkey.jpg, shishkin.jpg
My system is Windows 11 running MATLAB R2022b.