How to get bounding box from custom trained model detection?
See original GitHub issueHi,
I’ve trained a custom model with one object, converted it into graph model and using on the browser. Here is my code:
async function predict() {
const model = await tf.loadGraphModel('./model/model.json');
let img = document.getElementById('test');
var example = tf.browser.fromPixels(img);
example = example.expandDims(0);
const output = await model.executeAsync(example);
output.forEach(val=>{
console.log(val);
});
}
It’s giving these values:
t {kept: false, isDisposedInternal: false, shape: Array(3), dtype: "float32", size: 1200, …}
t {kept: false, isDisposedInternal: false, shape: Array(3), dtype: "float32", size: 600, …}
t {kept: false, isDisposedInternal: false, shape: Array(1), dtype: "float32", size: 1, …}
t {kept: false, isDisposedInternal: false, shape: Array(3), dtype: "float32", size: 600, …}
t {kept: false, isDisposedInternal: false, shape: Array(3), dtype: "float32", size: 1200, …}
t {kept: false, isDisposedInternal: false, shape: Array(5), dtype: "float32", size: 4915200, …}
t {kept: false, isDisposedInternal: false, shape: Array(2), dtype: "float32", size: 300, …}
t {kept: false, isDisposedInternal: false, shape: Array(2), dtype: "float32", size: 300, …}
How can I know is there any mathces/predictions on the image? And if is there, how can I get the bounding box of it?
The pretrained models have these options. But how can we do it on our own models?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Object detection: Bounding box regression with Keras ...
In this tutorial you will learn how to train a custom deep learning model to perform object detection via bounding box regression with...
Read more >Building an object detector in TensorFlow using bounding-box ...
I achieved this by grabbing the base layers and the localisation branch layers using their respective prefixes and setting the trainable ...
Read more >Bounding Box Prediction from Scratch using PyTorch
Object detection is a very popular task in Computer Vision, where, given an image, you predict (usually rectangular) boxes around objects ...
Read more >14.3. Object Detection and Bounding Boxes
In object detection, we usually use a bounding box to describe the spatial location of an object. The bounding box is rectangular, which...
Read more >Labeling objects with bounding boxes - Rekognition
If you want your model to detect the location of objects within an image, you must identify what the object is and where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to close this issue since the original problem has been solved. But if you are looking for more general “how can I do X” tips. I would suggest using StackOverFlow, there is both a tensorflow tag and a tensorflow.js that may have some helpful pointers. You might also find some of the online courses listed on this page helpful.
I’ve now trained with AutoML and it works fine. But don’t know why can’t I use it with tensorflow training.