-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Error in importing #115
Comments
ipazc
pushed a commit
that referenced
this issue
Oct 7, 2024
…tch processing support - Completely refactored the MTCNN implementation following best coding practices. - Optimized code by removing unnecessary transpositions, resulting in faster computation. Fixes #22. - Transposed convolutional layer weights to eliminate the need for additional transpositions during preprocessing and postprocessing, improving overall efficiency. - Converted preprocessing and postprocessing functions into matrix operations to accelerate computation. Fixes #14, #110. - Added batch processing support to enhance performance for multiple input images. Fixes #9, #71. - Migrated network architecture to TensorFlow >= 2.12 for improved compatibility and performance. Fixes #80, #82, #90, #91, #93, #98, #104, #112, #114, #115, #116. - Extensively documented the project with detailed explanations of thresholds and parameters. Fixes #12, #41, #52, #57, #99, #122, #117. - Added support for selecting computation backends (CPU, GPU, etc.) with the `device` parameter. Fixes #23. - Added new parameters to control the result format (support for x1, y1, x2, y2 instead of x1, y1, width, height) and the ability to return tensors instead of dictionaries. Fixes #72. - Configured PyLint support to ensure code quality and style adherence. - Organized functions into specific modules (`mtcnn.utils.*` and `mtcnn.stages.*`) for better modularity. - Created Jupyter notebooks for visualization and ablation studies of each stage, allowing detailed exploration of layers, weights, and intermediate results. Fixes #88, #102. - Added a comprehensive training guide for the model. Fixes #35, #39. - Updated README with information on the new version, including the complete Read the Docs documentation that describes the process, theoretical background, and usage examples. Fixes #53, #73. - Configured GitHub Actions for continuous integration and delivery (CI/CD). - Fixed memory leak by switching to a more efficient TensorFlow method (`model(tensor)` instead of `model.predict(tensor)`). Fixes #87, #109, #121, #125, #128. - Made TensorFlow an optional dependency to prevent conflicts with user-installed versions. Fixes #95. - Added comprehensive unit tests for increased reliability and coverage.
Closed
ipazc
pushed a commit
that referenced
this issue
Oct 8, 2024
…tch processing support - Completely refactored the MTCNN implementation following best coding practices. - Optimized code by removing unnecessary transpositions, resulting in faster computation. Fixes #22. - Transposed convolutional layer weights to eliminate the need for additional transpositions during preprocessing and postprocessing, improving overall efficiency. - Converted preprocessing and postprocessing functions into matrix operations to accelerate computation. Fixes #14, #110. - Added batch processing support to enhance performance for multiple input images. Fixes #9, #71. - Migrated network architecture to TensorFlow >= 2.12 for improved compatibility and performance. Fixes #80, #82, #90, #91, #93, #98, #104, #112, #114, #115, #116. - Extensively documented the project with detailed explanations of thresholds and parameters. Fixes #12, #41, #52, #57, #99, #122, #117. - Added support for selecting computation backends (CPU, GPU, etc.) with the `device` parameter. Fixes #23. - Added new parameters to control the result format (support for x1, y1, x2, y2 instead of x1, y1, width, height) and the ability to return tensors instead of dictionaries. Fixes #72. - Configured PyLint support to ensure code quality and style adherence. - Organized functions into specific modules (`mtcnn.utils.*` and `mtcnn.stages.*`) for better modularity. - Created Jupyter notebooks for visualization and ablation studies of each stage, allowing detailed exploration of layers, weights, and intermediate results. Fixes #88, #102. - Added a comprehensive training guide for the model. Fixes #35, #39. - Updated README with information on the new version, including the complete Read the Docs documentation that describes the process, theoretical background, and usage examples. Fixes #53, #73. - Configured GitHub Actions for continuous integration and delivery (CI/CD). - Fixed memory leak by switching to a more efficient TensorFlow method (`model(tensor)` instead of `model.predict(tensor)`). Fixes #87, #109, #121, #125, #128. - Made TensorFlow an optional dependency to prevent conflicts with user-installed versions. Fixes #95. - Added comprehensive unit tests for increased reliability and coverage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting following error on importing MTCNN class although I have installed it correctly.
from mtcnn import MTCNN
Traceback (most recent call last):
File "", line 1, in
from mtcnn import MTCNN
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn_init_.py", line 26, in
from mtcnn.mtcnn import MTCNN
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn\mtcnn.py", line 37, in
from mtcnn.network.factory import NetworkFactory
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn\network\factory.py", line 26, in
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, PReLU, Flatten, Softmax
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\keras_init_.py", line 3, in
from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python_init_.py", line 45, in
from tensorflow.python import data
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data_init_.py", line 25, in
from tensorflow.python.data import experimental
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental_init_.py", line 96, in
from tensorflow.python.data.experimental import service
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\service_init_.py", line 21, in
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 25, in
from tensorflow.python.data.experimental.ops import compression_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 20, in
from tensorflow.python.data.util import structure
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\util\structure.py", line 33, in
from tensorflow.python.ops import tensor_array_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\ops\tensor_array_ops.py", line 38, in
from tensorflow.python.ops import array_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1475, in
_NON_AUTOPACKABLE_TYPES = set(np.core.numerictypes.ScalarType)
AttributeError: module 'numpy.core' has no attribute 'numerictypes'
from mtcnn import MTCNN
Traceback (most recent call last):
File "", line 1, in
from mtcnn import MTCNN
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn_init_.py", line 26, in
from mtcnn.mtcnn import MTCNN
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn\mtcnn.py", line 37, in
from mtcnn.network.factory import NetworkFactory
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\mtcnn\network\factory.py", line 26, in
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, PReLU, Flatten, Softmax
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\keras_init_.py", line 3, in
from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python_init_.py", line 45, in
from tensorflow.python import data
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data_init_.py", line 25, in
from tensorflow.python.data import experimental
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental_init_.py", line 96, in
from tensorflow.python.data.experimental import service
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\service_init_.py", line 21, in
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 25, in
from tensorflow.python.data.experimental.ops import compression_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 20, in
from tensorflow.python.data.util import structure
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\data\util\structure.py", line 33, in
from tensorflow.python.ops import tensor_array_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\ops\tensor_array_ops.py", line 38, in
from tensorflow.python.ops import array_ops
File "C:\Users\Jagdeep\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1475, in
_NON_AUTOPACKABLE_TYPES = set(np.core.numerictypes.ScalarType)
AttributeError: module 'numpy.core' has no attribute 'numerictypes'
The text was updated successfully, but these errors were encountered: