File tree Expand file tree Collapse file tree 3 files changed +26
-16
lines changed Expand file tree Collapse file tree 3 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 22 "cells" : [
33 {
44 "cell_type" : " code" ,
5- "execution_count" : 3 ,
5+ "execution_count" : 1 ,
66 "metadata" : {},
77 "outputs" : [],
88 "source" : [
2121 },
2222 {
2323 "cell_type" : " code" ,
24- "execution_count" : 4 ,
24+ "execution_count" : 2 ,
2525 "metadata" : {},
2626 "outputs" : [],
2727 "source" : [
5151 " def update(self, detections):\n " ,
5252 " \n " ,
5353 " if len(detections) == 0: # if no object detected in the frame\n " ,
54- " for objectID in self.lost.keys():\n " ,
54+ " lost_ids = list(self.lost.keys())\n " ,
55+ " for objectID in lost_ids:\n " ,
5556 " self.lost[objectID] +=1\n " ,
5657 " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n " ,
5758 " \n " ,
127128 },
128129 {
129130 "cell_type" : " code" ,
130- "execution_count" : 5 ,
131+ "execution_count" : 3 ,
131132 "metadata" : {},
132133 "outputs" : [],
133134 "source" : [
148149 },
149150 {
150151 "cell_type" : " code" ,
151- "execution_count" : 6 ,
152+ "execution_count" : 4 ,
152153 "metadata" : {},
153154 "outputs" : [],
154155 "source" : [
169170 },
170171 {
171172 "cell_type" : " code" ,
172- "execution_count" : 7 ,
173+ "execution_count" : 5 ,
173174 "metadata" : {},
174175 "outputs" : [],
175176 "source" : [
186187 },
187188 {
188189 "cell_type" : " code" ,
189- "execution_count" : 8 ,
190+ "execution_count" : null ,
190191 "metadata" : {
191192 "scrolled" : true
192193 },
238239 " cv.destroyWindow(\" image\" )"
239240 ]
240241 },
242+ {
243+ "cell_type" : " code" ,
244+ "execution_count" : null ,
245+ "metadata" : {},
246+ "outputs" : [],
247+ "source" : []
248+ },
241249 {
242250 "cell_type" : " code" ,
243251 "execution_count" : null ,
262270 "name" : " python" ,
263271 "nbconvert_exporter" : " python" ,
264272 "pygments_lexer" : " ipython3" ,
265- "version" : " 3.6.8 "
273+ "version" : " 3.6.9 "
266274 }
267275 },
268276 "nbformat" : 4 ,
Original file line number Diff line number Diff line change 5151 " def update(self, detections):\n " ,
5252 " \n " ,
5353 " if len(detections) == 0: # if no object detected in the frame\n " ,
54- " for objectID in self.lost.keys():\n " ,
54+ " lost_ids = list(self.lost.keys())\n " ,
55+ " for objectID in lost_ids:\n " ,
5556 " self.lost[objectID] +=1\n " ,
5657 " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n " ,
5758 " \n " ,
318319 ],
319320 "metadata" : {
320321 "kernelspec" : {
321- "display_name" : " drlnd " ,
322+ "display_name" : " Python 3 " ,
322323 "language" : " python" ,
323- "name" : " drlnd "
324+ "name" : " python3 "
324325 },
325326 "language_info" : {
326327 "codemirror_mode" : {
332333 "name" : " python" ,
333334 "nbconvert_exporter" : " python" ,
334335 "pygments_lexer" : " ipython3" ,
335- "version" : " 3.6.8 "
336+ "version" : " 3.6.9 "
336337 }
337338 },
338339 "nbformat" : 4 ,
Original file line number Diff line number Diff line change 5151 " def update(self, detections):\n " ,
5252 " \n " ,
5353 " if len(detections) == 0: # if no object detected in the frame\n " ,
54- " for objectID in self.lost.keys():\n " ,
54+ " lost_ids = list(self.lost.keys())\n " ,
55+ " for objectID in lost_ids:\n " ,
5556 " self.lost[objectID] +=1\n " ,
5657 " if self.lost[objectID] > self.maxLost: self.removeObject(objectID)\n " ,
5758 " \n " ,
311312 ],
312313 "metadata" : {
313314 "kernelspec" : {
314- "display_name" : " drlnd " ,
315+ "display_name" : " Python 3 " ,
315316 "language" : " python" ,
316- "name" : " drlnd "
317+ "name" : " python3 "
317318 },
318319 "language_info" : {
319320 "codemirror_mode" : {
325326 "name" : " python" ,
326327 "nbconvert_exporter" : " python" ,
327328 "pygments_lexer" : " ipython3" ,
328- "version" : " 3.6.8 "
329+ "version" : " 3.6.9 "
329330 }
330331 },
331332 "nbformat" : 4 ,
You can’t perform that action at this time.
0 commit comments