Git Product home page Git Product logo

image-classification-python's People

Contributors

gogul09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

image-classification-python's Issues

Prediction

Why did you apply the global feature extraction again after splitting the data in order to predict?

Add Linux portability

The folder creation won't work on Linux. Consider renaming \\ for /. Otherwise, the result will be something like 'dataset\train\crocus'. It would be recommended to use pathlib. :)

Error::!ssize.empty() in function 'cv::resize'

Code::

read the image and resize it to a fixed-size

image = cv2.imread(file)
image = cv2.resize(image, fixed_size)

Error:::

error Traceback (most recent call last)
in
1 # read the image and resize it to a fixed-size
2 image = cv2.imread(file)
----> 3 image = cv2.resize(image, fixed_size)

error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

AttributeError: module 'mahotas' has no attribute 'features'

C:\Users\vcvis\Desktop\image-classification-python-master>python global.py
Could not import submodules (exact error was: DLL load failed: The specified module could not be found.).

There are many reasons for this error the most common one is that you have
either not built the packages or have built (using python setup.py build) or
installed them (using python setup.py install) and then proceeded to test
mahotas without changing the current directory.

Try installing and then changing to another directory before importing mahotas.
['bluebell', 'buttercup', 'coltsfoot', 'cowslip', 'crocus', 'daffodil', 'daisy', 'dandelion', 'fritillary', 'iris', 'lilyvalley', 'pansy', 'snowdrop', 'sunflower', 'tigerlily', 'tulip', 'windflower']
Traceback (most recent call last):
File "global.py", line 80, in
fv_haralick = fd_haralick(image)
File "global.py", line 33, in fd_haralick
haralick = mahotas.features.haralick(gray).mean(axis=0)
AttributeError: module 'mahotas' has no attribute 'features'

thank you

num_trees is not defined

In train_test.py, line 30 num_trees is assigned for n_estimators, which is not defined. Is it ok to use default value for n_estimators?

issue with saving the data as .h5

I am trying to save the output files as .h5 files as instructed, but I keep getting the error
"TypeError: Object dtype dtype('O') has no native HDF5 equivalent"

Anyone know how to fix it, or an alternative way of saving this data?

Number of features of the model must match the input

Hi,
I got this error in the prediction line. I tried to resize my predictions but doesn't seem to work. Also the shape of Global_feature is 532. Please help.
ValueError: Number of features of the model must match the input. Model n_features is 533 and input n_features is 532

Issue related to resizing of the images

Dear gogul,

I am having an error of "C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize" and " in ()" when I am executing this code.

Issue with saving the festure vectors using HDF5

Hi Sir Gogul,
thanks for such a detailed post on image classification.
Everything works fine in global.py till the code to save the feature vectors using HDF5
below is the error i get....And in output folder it doesn't create the two files with .h5 extension

File "c:/Users/VANESSA ANTAO/Anaconda3/python/image-classification-python-master/global.py", line 117, in
h5f_data = h5py.File(h5_data, 'w')
File "C:\Users\VANESSA ANTAO\Anaconda3\envs\opencv\lib\site-packages\h5py_hl\files.py", line 408, in init
swmr=swmr)
File "C:\Users\VANESSA ANTAO\Anaconda3\envs\opencv\lib\site-packages\h5py_hl\files.py", line 179, in make_fid
fid = h5f.create(name, h5f.ACC_TRUNC, fapl=fapl, fcpl=fcpl)
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 108, in h5py.h5f.create
OSError: Unable to create file (unable to open file: name = 'output/data.h5', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 302)

I really need the help for my current college project

Thanks in Anticipation

.h5 file error

When i run the code without adding any .h5 extended files in output directory i get below error:
OSError: Unable to open file (unable to open file: name = 'output/data.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

When i add .h5 extended files in output directory before i run the code i get below error:
OSError: Unable to open file (file signature not found)

How can i solve the problem? Thanks in advance.

SOLVED ERROR. ValueError: Expected 2D array, got 1D array instead

The following error:
ValueError: Expected 2D array, got 1D array instead
Using Python 3.7.3 was presented in the train_test.py code.
I solved this, adding the following sentence before obtaining rescaled_feature

global_feature= np.reshape(global_feature, (2, -1))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.