Comments (5)
Hello, did you ensure you downloaded the correct model file, set the correct model type and set the correct model path to the model file you downloaded? Ensure all of this is done before running your python code.
from imageai.
This is python code, resnet50_coco_best_v2.0.1.h5 model file in models folder
from imageai.Detection import ObjectDetection
import os
execution_path = os.getcwd()
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
model_path = os.path.join(execution_path, "models\resnet50_coco_best_v2.0.1.h5")
print("model path : {}".format(model_path))
detector.setModelPath(model_path)
img_path = os.path.join(execution_path, "image\5.jpg")
print("img path : {}".format(img_path))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=img_path,
output_image_path=os.path.join(execution_path, "image2new.jpg"))
for eachObject in detections:
print(eachObject["name"] + " : " + eachObject["percentage_probability"])
print("--------------------------------")``
from imageai.
Please see discussion here #30
from imageai.
ok,thanks
from imageai.
i got this type of error anyone knows how to solve please tell me i searching about it's solution lasst 3 days , i applied all things but it didn't solved
TypeError Traceback (most recent call last)
in ()
83 (boxes, scores, classes, num) = sess.run(
84 [detection_boxes, detection_scores, detection_classes, num_detections],
---> 85 feed_dict={image_tensor: frame_expanded})
86
87 # Draw the results of the detection (aka 'visulaize the results')
2 frames
/usr/local/lib/python3.6/dist-packages/numpy/core/_asarray.py in asarray(a, dtype, order)
83
84 """
---> 85 return array(a, dtype, copy=False, order=order)
86
87
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
from imageai.
Related Issues (20)
- Error: cannot reshape array of size 134 into shape (5) HOT 1
- loadModel() got an unexpected keyword argument 'detection_speed' HOT 2
- Website gives 404 HOT 1
- Can't find this function,detectCustomObjectsFromImage. HOT 2
- Error when training custom detection: bounding box values should be in the range 0 - 1 HOT 1
- Multiple GPU support with pytorch backend HOT 1
- Custom image detection always returns one wrong result HOT 1
- File size reduction HOT 2
- ml
- How can I do to make that the processed video stream is playing in real-time to users in ImageAI? HOT 1
- How to run ImageAI on AMD GPU? HOT 1
- Custom Object Detection HOT 1
- ModuleNotFoundError: No module named 'imageai' HOT 2
- Custom Detection Model Training: Validation values schow always 0.000000 HOT 1
- TypeError
- theia-engine Link is not working
- For the classifier, what is the size image reduce to dimensions? HOT 1
- Multiple Errors HOT 2
- RetinaNet model tries to write to system directory
- recall: 0.000000 precision: 0.000000 [email protected]: 0.000000, [email protected]: 0.000000 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 imageai.