Open bhargavravat opened 4 years ago
Check if this helps you We need wpod-net.json file as well to load the model. I don't see any .json file being read in your code. I am able to load the wpod model successfully
Hi, I've encountered the same error. I was able to resolve it by simply re-downloading the models
ValueError: Tensor Tensor("concatenate_1/concat:0", shape=(?, ?, ?, 8), dtype=float32) is not an element of this graph.
I am trying to receive an image from using socket io and then trying to apply it to wpod net for number plate detection. But I am getting above mentioned error.
Here is the code snippet
output_dir = 'lp_images/' lp_threshold = .5 wpod_net_path = 'data/lp-detector/wpod-net_update1.h5' wpod_net = load_model(wpod_net_path) ocr_threshold = .4 ocr_weights = 'data/ocr/ocr-net.weights' ocr_netcfg = 'data/ocr/ocr-net.cfg' ocr_dataset = 'data/ocr/ocr-net.data' ocr_net = dn.load_net(ocr_netcfg.encode(), ocr_weights.encode(), 0) ocr_meta = dn.load_meta(ocr_dataset.encode())
` def anpr_detection(img_np, Rwidth , Rheight, sId , ske): print ("In Side anpr_detection ======>") frame = img_np w = frame.shape[0] h = frame.shape[1] ratio = float(max(frame.shape[:2]))/min(frame.shape[:2]) side = int(ratio*288.) bound_dim = min(side + (side%(2**4)),608) print ("bound_dim ==>",bound_dim) print (type(frame))wpod_net = load_model(wpod_net_path)