single-multiple-custom-object-detection's People
Forkers
asr-engineering-consulting anuroop5891 washeb saiganesh-collab fmkunle zgle-fork chizere atkochi chethankumar18 manasmishra123 sounakc9 dwaraka007 shadmanaadeeb svakeczw bunbunbun777 azran2011 tonyby dummy-akyl sanaikram101 aideveloper-oz aditiayl sumit03guha shreeman1000 shivamjoshi11 himalaya-kaushik rahulpillai27 sudheeshsukumar manishkr03 durgesh-patel gulbaharyildiz aninda1994 ryan6732 ayushkabra aminaie supreeth20 rishupal-13 kazecoder skynet1-com madhurashet apoorvvats181 ellen-tuane maahi902 kartikml saikumar73128 amirunpri2018 jacobflaxman1 hiren8055 kokjix gunand12 kubraaaaa habk87 tabishkhan96 dilipkarki1998 skiinima kishankc123 udayzee05 gautam-mv trlitmo vamsi2108 adhishadi lixiang7610 suryakaduru usamamirza00 fatihcihant vishal-lb sonam-1112 hoothoot4 atul250603 khaleed2002 karankv26 qkrestechnologiessingle-multiple-custom-object-detection's Issues
Error while Training
Good evening Sir,
I tried to implement your code but during the training phase, execution stops at 608X608. I googled how to solve this issue, but nothing worked out for me. My train.txt file is empty and I guess because of this the weights are not getting stored
Can you please help me with this issue?
Image file : images.zip
Code : https://colab.research.google.com/drive/1uu9WkLEZPvdWsSyqtllyHtre1PBE82q-?usp=sharing
Thank You
NameError: name 'class_id' is not defined. Did you mean: 'class_ids'?
"C:\Users\Adimax Infoways\PycharmProjects\pythonProject\venv\Scripts\python.exe" "C:\Users\Adimax Infoways\PycharmProjects\pythonProject\main.py"
Traceback (most recent call last):
File "C:\Users\Adimax Infoways\PycharmProjects\pythonProject\main.py", line 27, in
confidence = scores[class_id]
^^^^^^^^
NameError: name 'class_id' is not defined. Did you mean: 'class_ids'?
I found this error in this code. What it means? and How can I fix it?
Issue while running cam
import cv2
import numpy as np
net = cv2.dnn.readNet('yolov3_training_last.weights', 'yolov3_testing.cfg')
classes = []
with open("classes.txt", "r") as f:
classes = f.read().splitlines()
cap = cv2.VideoCapture(0)
font = cv2.FONT_HERSHEY_PLAIN
colors = np.random.uniform(0, 255, size=(100, 3))
while True:
_, img = cap.read()
height, width, _ = img.shape
blob = cv2.dnn.blobFromImage(img, 1/255, (416, 416), (0,0,0), swapRB=True, crop=False)
net.setInput(blob)
output_layers_names = net.getUnconnectedOutLayersNames()
layerOutputs = net.forward(output_layers_names)
boxes = []
confidences = []
class_ids = []
for output in layerOutputs:
for detection in output:
scores = detection[5:]
class_id = np.argmax(scores)
confidence = scores[class_id]
if confidence > 0.2:
center_x = int(detection[0]*width)
center_y = int(detection[1]*height)
w = int(detection[2]*width)
h = int(detection[3]*height)
x = int(center_x - w/2)
y = int(center_y - h/2)
boxes.append([x, y, w, h])
confidences.append((float(confidence)))
class_ids.append(class_id)
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.2, 0.4)
if len(indexes)>0:
for i in indexes.flatten():
x, y, w, h = boxes[i]
label = str(classes[class_ids[i]])
confidence = str(round(confidences[i],2))
color = colors[i]
cv2.rectangle(img, (x,y), (x+w, y+h), color, 2)
cv2.putText(img, label + " " + confidence, (x, y+20), font, 2, (255,255,255), 2)
cv2.imshow('Image', img)
key = cv2.waitKey(1)
if key==27:
break
cap.release()
cv2.destroyAllWindows()
Error:-
color = colors[i]
IndexError: index 3133 is out of bounds for axis 0 with size 100
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.