Comments (7)
Hey Sean,
This is a python error, not related to the matlab engine.
Can you try this fix:
In the file anTraX/antrax/classifier.py, change line 513 to:
cw = class_weight.compute_class_weight(class_weight='balanced', classes =np.unique(FL.classes), y=FL.classes)
Then update the python code with pip install -e .
I am unable to test this myself currently, so let me know what happens!
from antrax.
Hi your first solution helped the first issue, but I'm currently trialing your other datasets to get a sense of how long my tests were. However when I try and run train on the V25 sample, it keeps coming up with the same error:
Epoch 1/3
124/1000 [==>...........................] - ETA: 5:54 - loss: 3.5632 - acc: 0.3478Traceback (most recent call last):
File "/home/sean/anaconda3/envs/test/bin/antrax", line 33, in
sys.exit(load_entry_point('antrax', 'console_scripts', 'antrax')())
File "/home/sean/Documents/AntTrax/anTraX/antrax/cli.py", line 659, in main
""")
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/sigtools/modifiers.py", line 158, in call
return self.func(*args, **kwargs)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/clize/runner.py", line 363, in run
ret = cli(*args)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/clize/runner.py", line 220, in call
return func(*posargs, **kwargs)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/clize/runner.py", line 262, in _cli
return func('{0} {1}'.format(name, command), *args)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/clize/runner.py", line 220, in call
return func(*posargs, **kwargs)
File "/home/sean/Documents/AntTrax/anTraX/antrax/cli.py", line 447, in train
c.train(examplesdir, ne=ne, aug_options=aug_options)
File "/home/sean/Documents/AntTrax/anTraX/antrax/classifier.py", line 533, in train
verbose=verbose)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 1296, in fit_generator
steps_name='steps_per_epoch')
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_generator.py", line 221, in model_iteration
batch_data = _get_next_batch(generator)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_generator.py", line 363, in _get_next_batch
generator_output = next(generator)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/data_utils.py", line 789, in get
six.reraise(*sys.exc_info())
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/six.py", line 719, in reraise
raise value
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/data_utils.py", line 783, in get
inputs = self.queue.get(block=True).get()
File "/home/sean/anaconda3/envs/test/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
File "/home/sean/anaconda3/envs/test/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/data_utils.py", line 571, in get_index
return _SHARED_SEQUENCES[uid][i]
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/keras_preprocessing/image/iterator.py", line 65, in getitem
return self._get_batches_of_transformed_samples(index_array)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/keras_preprocessing/image/iterator.py", line 230, in _get_batches_of_transformed_samples
interpolation=self.interpolation)
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/keras_preprocessing/image/utils.py", line 114, in load_img
img = pil_image.open(io.BytesIO(f.read()))
File "/home/sean/anaconda3/envs/test/lib/python3.7/site-packages/PIL/Image.py", line 3009, in open
"cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f37b8629470>
from antrax.
Both errors are due to compatibility issue with 3rd party packages.
To fix your last error, reinstall the pillow
package:
pip uninstall pillow
pip install pillow==8.4.0
Thanks for bringing this to my attention, I will update the requirement file accordingly.
from antrax.
Uninstalling and installing pillow doesn't seem to have fixed the issue, any other ideas to what it might be?
from antrax.
Can you verify the pillow version?
In a python console:
import PIL
print(PIL.__version__)
from antrax.
This is the error I get:
(test) sean@seans-ants:~$ import PIL
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in
import apt_pkg
ImportError: /usr/local/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)
from antrax.
from antrax.
Related Issues (20)
- `Dot indexing is not supported for variables of this type` error when running `validate` HOT 2
- MATLAB:badsubscript error crashes solve step HOT 2
- MCR Interface scaling on high resolution displays HOT 4
- Many small non-ant objects still tracked and classified HOT 2
- Installation issue on m1 Mac HOT 6
- MATLAB:nonLogicalConditional during export HOT 5
- "ValueError: invalid literal for int() with base 10: 'images' " during classification step HOT 4
- [enhancement] Printing details of validation session
- Opening anTrax issue HOT 14
- Problems with compiling mex file HOT 1
- Extract Trainset Responding Slow HOT 3
- solve step 1 produce error contains `MATLAB:UndefinedFunction` HOT 4
- Solve step 2 Non-binary MAT file HOT 5
- The multi-colony masks do not get generated when using MATLAB full installation
- Potential graph corruption at solve 2 resulting three types of error messages in matlab_export_*.log HOT 5
- Classifying issues HOT 6
- problems with setting up the ffmpeg HOT 1
- Installation issue
- Problem with anTraX-MATLAB link HOT 1
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 antrax.