Hello, im trying to run this code: from mediapipe_model_maker import object_detectorimport jsonimport tensorflo - Pastebin.com
Initially i was getting this error:
Traceback (most recent call last):
File "c:/Users/froze/Desktop/poutses/kapota.py", line 1, in <module>
from mediapipe_model_maker import object_detector
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\__init__.py", line 17, in <module>
from mediapipe_model_maker.python.vision import image_classifier
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\python\vision\image_classifier\__init__.py", line 16, in <module>
from mediapipe_model_maker.python.vision.image_classifier import dataset
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\python\vision\image_classifier\dataset.py", line 21, in <module>
import tensorflow_datasets as tfds
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\__init__.py", line 43, in <module>
import tensorflow_datasets.core.logging as _tfds_logging
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\__init__.py", line 22, in <module>
from tensorflow_datasets.core import community
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\community\__init__.py", line 18, in <module>
from tensorflow_datasets.core.community.huggingface_wrapper import mock_builtin_to_use_gfile
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\community\huggingface_wrapper.py", line 31, in <module>
from tensorflow_datasets.core import dataset_builder
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\dataset_builder.py", line 34, in <module>
from tensorflow_datasets.core import dataset_info
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\dataset_info.py", line 47, in <module>
from tensorflow_datasets.core import file_adapters
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\file_adapters.py", line 29, in <module>
from array_record.python import array_record_module
ImportError: cannot import name 'array_record_module' from 'array_record.python' (C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\array_record\python\__init__.py)
so i did this pip install tensorflow-datasets==4.8.3
and now im getting this:
warnings.warn(
Traceback (most recent call last):
File "c:\Users\froze\Desktop\poutses\kapota.py", line 1, in <module>
from mediapipe_model_maker import object_detector
ImportError: cannot import name 'object_detector' from 'mediapipe_model_maker' (C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\mediapipe_model_maker\__init__.py)
im on python 3.10 also tested with 3.8. It seems to be working on google colab tho