Comments (20)
I have the same issue when running the train script on openSUSE 42.3 using the published binary for Julia 0.6. It stops at the first image in the humans directory (./humans/per00001.ppm) with a message similar to the one reported.
ERROR: LoadError: BoundsError: attempt to access 9×16×8 Array{Float64,3} at index [10, 1, 1]
from imagefeatures.jl.
This bug is resolved on the master branch but a release was subsequently never tagged. Hence when you do Pkg.add("ImageFeatures") you currently don't get the latest version. If you checkout the master branch things will work as expected. It looks like tejus-gupta fixed the problem as part of commit #42. @Evizero could you please tag a release when you have a spare moment?
from imagefeatures.jl.
Thanks for the reminder
from imagefeatures.jl.
Thanks for this, which fixes that particular issue; now the process stops when trying to process the non_human images, finding an issue with incompatible images, the size of which must be a multiple of the cell size:
ERROR: LoadError: Height and Width of the image must be a multiple of cell_size.
Stacktrace:
[1] create_hog_descriptor(::Array{Float64,2}, ::Array{Float64,2}, ::ImageFeatures.HOG) at /home/colin/.julia/v0.6/ImageFeatures/src/hog.jl:67
[2] create_descriptor(::Array{ColorTypes.RGB{FixedPointNumbers.Normed{UInt8,8}},2}, ::ImageFeatures.HOG) at /home/colin/.julia/v0.6/ImageFeatures/src/hog.jl:56
[3] macro expansion at /home/colin/data/hog/train2.jl:18 [inlined]
[4] anonymous at ./<missing>:?
[5] include_from_node1(::String) at ./loading.jl:569
[6] include(::String) at ./sysimg.jl:14
[7] process_options(::Base.JLOptions) at ./client.jl:305
[8] _start() at ./client.jl:371
while loading /home/colin/data/hog/train2.jl, in expression starting on line 15
However there seems to be some confusion over sources of data for this tutorial addressed in other issues. The process stops with the first non_human image, which in my case is 1.jpg and is a 65x129 image of a brick wall with a barred window in top right quadrant. Anyone else find the same thing?
from imagefeatures.jl.
I'm surprised to hear that you are getting a 65 x 129 image. Did you try load the image using a different image editor to confirm the size? Might be worth validating to be sure its not a bug in Julia. Are all of the non-human images likes that? You could, of course, just re-size the images to be of size 64 by 128 as a workaround.
from imagefeatures.jl.
@zygmuntszpak Yes I opened in a couple other applications and all confirmed the odd image size. Resizing was the solution, now the tutorial runs to completion with the somewhat surprising result of 100% accuracy.
from imagefeatures.jl.
I can verify that most of the tutorial works if you Pkg.clone
the repo.
There is a detail though...
In the code it says:
#Split the dataset into train and test set. Train set = 2500 images, Test set = 294 images.
random_perm = randperm(n)
train_ind = random_perm[1:2500]
test_ind = random_perm[2501:end]
Nevertheless my train set has 924 images not 2500 !
Another detail: I get all scores as 0 (this is weird) Therefore the object locations part of the tutorial do not work.
scores[scores.>0] = 0
object_locations = findlocalminima(scores)
0-element Array{CartesianIndex{2},1}
from imagefeatures.jl.
Nevertheless my train set has 924 images not 2500 !
Hmm that is strange; the data looks ok to me:
julia> include("train2.jl")
[1]Accuracy: 100.00%
julia> size(data[:,train_ind])
(3780, 2500)
julia> size(data[:,test_ind])
(3780, 294)
from imagefeatures.jl.
@colbec where did you download the data? could you post the url here? thank you!
from imagefeatures.jl.
@davidbp David, see your comment in the other issue at #44 (comment) ; you should find it leads to a non-human set of images as one component. The collection contains images with a number of different sizes and some of these are not compatible with the cell size of the HOG analysis. All I have done so far is to resize all of them to a standard 64x128 but other solutions might lead to a more accurate result.
from imagefeatures.jl.
Thank you for comment, I've read all comments from the two issues but I still don't see what data are you referring to. I could only find 2 links:
- There is a link you posted that returns 404 Error.
- There is another link zygmuntszpak posted. This link works and contains tar file with images from
per00001.ppm
toper00923.ppm
. All images correspond to pedestrians and there are less than 1000 images (definetly not 2500).
from imagefeatures.jl.
Your comment in the other issue refers to https://github.com/mbeyeler/opencv-machine-learning/tree/78f5f6ecfbbae3f61b378060d60641420331115c/notebooks/data/chapter6 ; see pedestrians_neg file.
from imagefeatures.jl.
Thank you for your clarification Nevertheless the positive set of examples in the link you just posted doesn't have 2500 examples. So I assume that from the 50 negative examples and from the 940 positive examples you have generated a train set containing 2500 examples... right?
from imagefeatures.jl.
Oh I see, I must have obtained the positive examples from one of the other sources, and by luck ended up with an approximately right combination. I'm having a problem discovering where the data came from and will have to go back through my history to see which source it came from. I'll post back when I find it.
from imagefeatures.jl.
@davidbp OK it looks like the positive data came from @zygmuntszpak suggestion of the Wayback machine at #44 (comment)
from imagefeatures.jl.
@colbec that data from @zygmuntszpak has 924 images. The same images as in the link you provide above (which I provided in another thread). Anyway thank you for commenting the issue.
from imagefeatures.jl.
I think we should
1 - Clarify exactly what is the data (where to download it)
2 - Update the notebook.
3 - Write in the readme of the package that it should be installed with Pkg.clone
since the Pkg.add
did not allow us to use the HOG.
Then close this thread once we have a notebook with "reproducible" results.
from imagefeatures.jl.
@davidbp Yes you are right, evidently that is not the source, I will keep looking but am very puzzled where it might have come from - my browser history is not much help in this case. I just examined my not_humans directory and find that it contains 1870 items, which together with the 924 from humans totals 2794. When the tutorial takes the train set of 2500 this leaves 294 for the test set, given the count of files that I have. I did not do any image engineering to produce more examples.
from imagefeatures.jl.
I have redone the notebook from scratch changing some parts that didn't work.
https://github.com/davidbp/learn_julia/blob/master/JuliaImages/pedestrian_detection.ipynb
This notebook works with the data we already know where to get (we could even put it in a github repo since It is quite small). The negative samples I used are simply patches of the 50 negatives samples of the dataset we found.
I can close this issue anytime but it would be nice to merge/adapt this code that works.
from imagefeatures.jl.
Closed in #60
from imagefeatures.jl.
Related Issues (20)
- Build homography from array of matched points HOT 3
- HOG documentation
- GMS: Grid-based Motion Statistics for Fast, Ultra-robust Feature Correspondence
- Hog tutorial not working HOT 13
- Rationale for Vector of CartesianIndex{2} for output 'matches' of match_keypoints HOT 16
- Dependency on Images.jl directly HOT 5
- Error while trying to run the HOG example HOT 3
- Improving Hog allocations / Making a fast HOG version HOT 2
- Is it on the roadmap to support 1.0 in the near feature HOT 7
- Are there any plans to add sift and surf ?? HOT 12
- docstring missing HOT 3
- corner.jl: ERROR: MethodError: no method matching dotc(::RGBA{Float64}, ::RGBA{Float64}) HOT 1
- hough_circle_gradient: centers could hold 0 in CartesianIndex
- brief.jl:There is an error in the range HOT 3
- Getting the votes from the Hough transform HOT 5
- Images is downgraded
- TagBot trigger issue HOT 14
- coords_spatial not defined HOT 3
- Symmetry transform
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagefeatures.jl.