The Art of counting potatoes (with Linux) Ricardo Ribalda 1 2 - - PowerPoint PPT Presentation

the art of counting potatoes with linux
SMART_READER_LITE
LIVE PREVIEW

The Art of counting potatoes (with Linux) Ricardo Ribalda 1 2 - - PowerPoint PPT Presentation

The Art of counting potatoes (with Linux) Ricardo Ribalda 1 2 Initial Questions Why? Who? How? Agenda Potato Grader DSP FPGA GPU Conclusions Open Discussion 3 Why? 4 Why Potatoes? 368M tons per


slide-1
SLIDE 1

The Art of counting potatoes (with Linux)

Ricardo Ribalda

1
slide-2
SLIDE 2 2
slide-3
SLIDE 3

Agenda

  • Initial Questions

○ Why? ○ Who? ○ How?

  • Potato Grader

○ DSP ○ FPGA ○ GPU

  • Conclusions
  • Open Discussion
3
slide-4
SLIDE 4

Why?

4
slide-5
SLIDE 5

Why Potatoes?

368M tons per year [1]. Price per kg: 0.104 € [2]. Kg per capita: Europe: 88 World: 31

[1] FAOSTAT 2013 [2] Potato Weekly (yes this exists….) 19/01/2015 [3] International Year of the potato 2008 (I do not make up the names)

5
slide-6
SLIDE 6

Why Potatoes?

6
slide-7
SLIDE 7

Why Grade them?

7
slide-8
SLIDE 8

Why Grade them?

Delirium Diarrhea Dilated pupils Fever Hallucinations Headache Loss of sensation hypothermia Paralysis Shock Slow pulse Slowed breathing Abdominal pain Vision changes Vomiting

Solanine

Conclusion: Eat chocolate, not potatoes

8
slide-9
SLIDE 9

Why Grade them?

Black Spot Green Spot Scurf Golf Ball Grey Damage Rot Fresh Cut Potato Fruit

9
slide-10
SLIDE 10

Why?

3 reasons:

10
slide-11
SLIDE 11

Why?

$

3 reasons:

11
slide-12
SLIDE 12

Why?

$ €

3 reasons:

12
slide-13
SLIDE 13

Why?

$ € £

3 reasons:

13
slide-14
SLIDE 14

Who?

14
slide-15
SLIDE 15

Who?

15
slide-16
SLIDE 16

Who?

16
slide-17
SLIDE 17

How?

17
slide-18
SLIDE 18

How?

18
slide-19
SLIDE 19

How it is done? Computer Vision 101

19
slide-20
SLIDE 20

How it is done? Computer Vision 101

20
slide-21
SLIDE 21

How it is done? Computer Vision 101

?

21
slide-22
SLIDE 22

Potatoes like diversity

22
slide-23
SLIDE 23

How it is done? Potatoes

23
slide-24
SLIDE 24

Potato Grader

24
slide-25
SLIDE 25

Potato Grader: Initial Approach +

  • Noise
  • Latency
  • Framerate
  • Low level sensor access
25
slide-26
SLIDE 26

Potato Grader: Industrial Smart Cameras

  • Black Box
  • Limited selection sensors
  • Closed source image

processing software

26
slide-27
SLIDE 27

Potato Grader: Industrial Smart Cameras

  • Black Box
  • Limited selection sensors
  • Closed source image

processing software

27
slide-28
SLIDE 28

2002

28
slide-29
SLIDE 29

Potato Grader: Celox v2002

29
slide-30
SLIDE 30

Potato Grader: Celox v2002

30
slide-31
SLIDE 31

Potato Grader: Celox v2002

31
slide-32
SLIDE 32

Potato Grader: Celox v2002

32
slide-33
SLIDE 33

Potato Grader: Celox v2002

  • Barebone application
  • updates?
  • multithread?
  • Expensive
  • Complicated
33
slide-34
SLIDE 34

2005

34
slide-35
SLIDE 35

Potato Grader: Celox v2005

35
slide-36
SLIDE 36

Potato Grader: Celox v2005

36
slide-37
SLIDE 37

Potato Grader: Celox v2005

37
slide-38
SLIDE 38

Potato Grader: Celox v2005

38
slide-39
SLIDE 39

Potato Grader: Celox v2005

39
slide-40
SLIDE 40

Potato Grader: Celox v2005

  • Linux From Scratch
  • Strong Latency Requirements
  • All code in kernel-space
  • Difficult to debug
  • Difficult to update
  • Difficult to replicate
40
slide-41
SLIDE 41

2009

41
slide-42
SLIDE 42

Potato Grader: Celox v2009

42
slide-43
SLIDE 43

Potato Grader: Celox v2009

43
slide-44
SLIDE 44

Potato Grader: Celox v2009

44
slide-45
SLIDE 45

Potato Grader: Celox v2009

  • Hardware
  • Modularity
  • Low access to Sensor
  • Software
  • Build System
  • Userland
45
slide-46
SLIDE 46

Use case: U-boot

  • No upstream support for

Embedded PowerPC440

  • We managed to use it!
46
slide-47
SLIDE 47

Use case: U-boot

  • No upstream support for

Embedded PowerPC440

  • We managed to use it!
47
slide-48
SLIDE 48

Use case: U-boot

  • Bigger challenge than

expected

  • Need to allocate time
  • CodeStyle matters
  • Great Benefit
  • Support
48
slide-49
SLIDE 49

Lesson Learned

Remember you need to make this trivial to review in order to get it accepted. You have to do extra work because of this: our limited resource is reviewers and maintainers, not developers. Greg Kroah-Hartman

49
slide-50
SLIDE 50

2012

The Epiphany

50
slide-51
SLIDE 51

Potato Grader: Celox v2015

51
slide-52
SLIDE 52

Potato Grader: Celox v2015

52
slide-53
SLIDE 53

Potato Grader: Celox v2015

Credit to: Brendan D. Gregg 53
slide-54
SLIDE 54

Why Standard interfaces?

  • Pre documented code :)
  • Validation Tools
  • Easy to get help in work

peaks

54
slide-55
SLIDE 55

Potato Grader: Celox v2012

55
slide-56
SLIDE 56

Potato Grader: Celox v2012

  • Two track Strategy
  • Open Source
  • Upstream
56
slide-57
SLIDE 57

Why Upstream?

  • Support [1]
  • Training experience
  • Code Review
  • Distro Independent!

[1] Kernel Newbies Autoresponder: What changes are you making to the kernel that you are sticking with such an old version (X.Y is Z years old now, and over KKK thousand changes have happened to the kernel since then)?

57
slide-58
SLIDE 58

Use case: Kernel

  • Great Community
  • Infinite Patience
  • Port to last version

under 2 hours!!

58
slide-59
SLIDE 59

Use case: USB Gadget 3380

  • Upstream driver
  • Access to engineers

from:

  • Samsung
  • Texas Instruments
  • Intel
59
slide-60
SLIDE 60

Video Demo

60
slide-61
SLIDE 61 61
slide-62
SLIDE 62

Today

62
slide-63
SLIDE 63

Qtechnology Contributions

  • Linux Kernel: 172 patches. Including a 9+ year old bugfix.
  • U-boot: 25 patches. Maintainers of Virtex PowerPC boards.
  • Yocto project: 17 patches. Supporting organization of the project.
  • v4l-utils/libv4l2: 7 patches.
  • Flashrom: Support for the first board with EEprom memory.
  • Gerbil: 2 patches.
  • Clpeak: 2 patches.
  • Video Lan Client: 1 patch.
63
slide-64
SLIDE 64

More Machines

Batch analyzer Checkweigher Spectral Camera

64
slide-65
SLIDE 65

Conclusions

  • Upstreaming is extremely

beneficial. ○ Even for Small Companies! ○ But Allocate resources!

  • Use standard Interfaces
  • DO NOT reinvent the

wheel

  • 1st Portability

2nd Performance

65
slide-66
SLIDE 66

The Art of counting potatoes (with Linux)

Ricardo Ribalda

66