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 2904
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: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |