582 data sets, 224*224
Video web address: https://www.bilibili.com/video/BV1Ra4y1s7Ei
The code is as follows: - import sensor,image,lcd,time
-
import KPU as kpu
-
lcd.init(freq=15000000)
-
sensor.reset(dual_buff=1)
-
sensor.set_pixformat(sensor.RGB565)
-
sensor.set_framesize(sensor.QVGA)
-
sensor.set_hmirror(1)
-
sensor.set_vflip(0)
-
sensor.set_windowing((224, 224))
-
-
-
sensor.run(1)
-
clock = time.clock()
-
classes = ['person']
-
task = kpu.load(0x300000)
-
anchor = (0.76,1.98, 1.20,3.06, 1.51,4.30, 2.06,5.32, 2.87,6.02)
-
a = kpu.init_yolo2(task, 0.3, 0.3, 5, anchor)
-
while(True):
-
clock.tick()
-
img = sensor.snapshot()
-
code = kpu.run_yolo2(task, img)
-
print(clock.fps())
-
fps =clock.fps()
-
img.draw_string(2,2, ("%2.1ffps" %(fps)), color=(0,255,0), scale=2)
-
if code:
-
for i in code:
-
a=img.draw_rectangle(i.rect())
-
a = lcd.display(img)
-
print(i.classid(),i.value())
-
for i in code:
-
lcd.draw_string(i.x(), i.y(), classes[i.classid()], lcd.RED, lcd.WHITE)
-
lcd.draw_string(i.x(), i.y()+12, '%.2f'%i.value(), lcd.RED, lcd.WHITE)
-
else:
-
a = lcd.display(img)
-
a = kpu.deinit(task)
1 2890
Thank you for posting! This is pretty neat.
Is that the video of this AI function in action?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Fotios |
last post by:
Hi guys,
I have put together a flexible client-side user agent detector (written in
js). I thought that some of you may find it useful. Code is here:
http://fotios.cc/software/ua_detect.htm
...
|
by: Mickey Segal |
last post by:
On comp.lang.java.programmer we are discussing problems created for Java
programs by pop-up blockers (in the thread "showDocument blocked by new
microsoft pop-up blocker"). Our problem is that...
|
by: Stuart Ferguson |
last post by:
I am currently writing an application for the Windows CE Platform and
wish to add an admin only function to the main form which is hidden by
only being activated by a specific keypress for example...
|
by: The Eclectic Electric |
last post by:
I'm very noobish when it comes to Javascript, in fact I wasn't intending to
use it at all, but I've got myself distracted by this "problem". I want to
use an animated gif as my favicon. This...
|
by: origami.takarana |
last post by:
Intrusion Detection Strategies
-----------------------------------
Until now, we’ve primarily discussed monitoring in how it relates to
intrusion detection, but there’s more to an overall...
|
by: Gregor Kofler |
last post by:
What is the best practice for removing anonymous functions?
Something like
(function() { doSomething(); arguments.callee = null; })();
seems to work (at least it triggers no errors or...
|
by: souporpower |
last post by:
Hello All
I am trying to activate a link using Jquery. Here is my code;
<html>
<head>
<script type="text/javascript" src="../../resources/js/
jquery-1.2.6.js"</script>
<script...
|
by: Conrad Lender |
last post by:
In a recent thread in this group, I said that in some cases object
detection and feature tests weren't sufficient in the development of
cross-browser applications, and that there were situations...
|
by: NeoPa |
last post by:
Introduction
Many developers within Access need to be able to detect when the user has been inactive for a while. It's quite common to have a requirement to run something if/when the system's not...
|
by: twinnyfo |
last post by:
Re : Inactivity Detection in Access.
NeoPa,
I just encountered a very strange occurrence with this code (using Access 2010).
First off, this code works. Thanks much for the work you've...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
| |