f rom r esearch t o i ndustry
play

F ROM R ESEARCH T O I NDUSTRY M OBILE EDITION (Or, How I Learned - PowerPoint PPT Presentation

F ROM R ESEARCH T O I NDUSTRY M OBILE EDITION (Or, How I Learned To Stop Worrying about Papers and Start Building Smartphone Apps) Stephen Miller, Co-Founder and SVP Engineering Fyusion, Inc T HIS TALK IS ABOUT How to


  1. F ROM “R ESEARCH ” T O “I NDUSTRY ” M OBILE EDITION (Or, How I Learned To Stop Worrying about Papers and Start Building Smartphone Apps) Stephen Miller, Co-Founder and SVP Engineering Fyusion, Inc

  2. T HIS TALK IS ABOUT … • How to future-proof your research code • How to transition from academia to industry • Hard things I’ve learned growing from a team of ~4 to a team of >50 • A few tricks for porting desktop code to mobile • Just enough shameless company promotion to justify reimbursing the fl ight

  3. T HIS TALK IS NOT ABOUT … • In-depth technical details 
 • Any particular library 
 • Science 
 • Computer Vision, really, except insofar as it informs certain challenges

  4. Y OU ARE …?

  5. 
 R OUGH OUTLINE 1: Context (~5 min) • Who I am • What I did before Fyusion • What Fyusion is all about 2: Growing pains (~10 min) • Problems with going from research -> industry • Particular problems with going from desktop -> mobile 3: Helpful tips (~10 min) • General code organization • Device-speci fi c vs generic code • Broader startup tips (git fl ow, process, management)

  6. Robotics 3D Vision W HO AM I? My current face Open Source / Industry Collaboration

  7. R OBOTICS @ B ERKELEY (2007 - 2011) https://www.youtube.com/watch?v=5FGVgMsiv1s

  8. G AP BETWEEN ACADEMIC + PUBLIC EXPECTATION http://abcnews.go.com/Politics/oklahoma-sen-tom-coburn-report-shows-taxpayer-money/story?id=13689403

  9. 3D V ISION @ S TANFORD (2011 - 2014-ish) Sensor 0 • Started PhD on 3D perception 
 • Use only low-cost ($100 or less) sensors Sensor 1

  10. M AINTAINER @ PCL (2011 - present…ish) •World’s largest 3D Image Processing initiative 500 s r e p 250 o l e v e D 0 3/1/11 9/1/11 3/1/12 9/1/12 MONTH TO MONTH CUMULATIVE

  11. P ROBLEM : C ONSUMERS DON ’ T CARE ABOUT TECH DEMOS Technologists Consumers Point clouds, Meshes, Octrees, … Stop wasting tax dollars and give me all the stuff I saw in the movies

  12. P ROBLEM : C ONSUMERS DON ’ T CARE ABOUT TECH DEMOS Technologists Consumers Slick, seamless, “magic” Point clouds, Meshes, Octrees, …

  13. T HE CHALLENGE : MAKE IT SO STURDY THEY DON ’ T 
 KNOW IT ’ S RESEARCH

  14. http://fyusion.com

  15. U NDER THE HOOD : SCIENCE

  16. T O THE USER : MAGIC

  17. F ASHION , E COMMERCE

  18. C USTOM CAPTURE MODES

  19. E XAMPLE I NDUSTRY : A UTOMOTIVE

  20. E XAMPLE I NDUSTRY : A UTOMOTIVE

  21. H OW DID WE SCALE ?

  22. R EQUIRED BUSTING A LOT OF MYTHS

  23. M YTH : D EMO C ODE ™

  24. R ECENT EXAMPLE : BOTTLENECK foreach slice [start, end]: fire up decoder march to start fire up processor process to end Slices were *nonoverlapping* and 
 *consecutive*. 
 This code is extremely wasteful^

  25. GIT BLAME

  26. O RIGINAL CODE “Just hack it!” fire up decoder fire up processor process

  27. O RIGINAL CODE ++ “Just hack it!” foreach slice [start, end]: fire up decoder march to start fire up processor process to end Bad code evolves 
 over time

  28. “J UST H ACK IT ” - I NDUSTRY E DITION

  29. T HE P OINT : 
 DO IT WELL ENOUGH THE FIRST TIME , 
 BECAUSE …

  30. M YTH : T HE E NGINEERS ™ WILL DO IT LATER

  31. “T HE E NGINEER ” WILL •Understand my hacky pseudocode 
 • Convert my O(n^3) algorithm into O(n) with Optimization™ 
 • Add helpful comments 
 • Rename obscure variables and functions 
 •Write unit tests for everything “The QArchitician is half QA, half Software Architect, half Mathematician!”

  32. T HE A CTUAL E NGINEER WILL • Be deeply frustrated to work with brittle code as a starting point 
 • Be very conservative about accidentally breaking something 
 • Require your input and review time, and in all likelihood… 
 • Quarantine your code before they fi x it

  33. AND THEY ’ LL BE * RIGHT * TO QUARANTINE , BECAUSE …

  34. T OO M ANY C OOKS S POIL THE A LGORITHM % you know o ff hand: 100 Old, hacky research code

  35. T OO M ANY C OOKS S POIL THE A LGORITHM % shared: 
 % they know o ff hand: ~60 % you know o ff hand: ~60 10 New, “clean”, “optimized”, “refactored” code

  36. W HEN CRASHES ATTACK

  37. W HEN CRASHES ATTACK “This looks nothing like 
 my algorithm.”

  38. W HEN CRASHES ATTACK “Don’t ask me, it’s not 
 my algorithm.”

  39. T AKEAWAY : SOMEONE SHOULD FULLY UNDERSTAND 
 A GIVEN CODE BLOCK . 
 I F IT ’ S COMPUTER VISION RELATED , 
 THAT SOMEONE IS PROBABLY YOU .

  40. M YTH : THE PLATFORM IS IRRELEVANT

  41. There Will Be Bugs

  42. 2016 A NDROID R ECORDING B UG • Scattered reports from users on a speci fi c device by a European manufacturer: “Suddenly, the camera just stops sensing motion” • Di ff erence in timestamps: 
 13107153 
 13107234 
 13107212 
 13107128 • ^ 2^17 second o ff set

  43. 2017 I P HONE 8 AND X R ECORDING B UG • “All of a sudden it just stops working” - iPhone 8, 8+, and X users • Bonus points for anyone who can tell me what is mathematically interesting about 768614.395 seconds…

  44. 2015 V IDEO D ECODER B UG • “It works fi ne for the fi rst 204…then stops forever” 


  45. 2015 V IDEO D ECODER B UG • Bug in Apple video decoder (lasted at least 3 years) video200.mp4 Decoder1 video200.mp4 Decoder1 Decoder1 video200.mp4 Decoder1 Decoder204 video204.mp4

  46. 2015 V IDEO D ECODER B UG • Bug in Apple video decoder (lasted at least 3 years) Decoder1 video200.mp4 Decoder1 video200.mp4 Decoder1 Decoder1 video200.mp4 video_sym.mp4 Decoder204 video204.mp4

  47. 
 E XISTENTIAL Q UESTION : H OW D O Y OU T EST F OR T HIS $@*(&? • Not scalable to actually test for every possible case 
 “Okay, so before a PR • Irresponsible not to test for 
 can be merged, we need to make every possible case sure we run it on this particular model of Alcatel phone for at least 3 weeks, and also the plus version, and the international version, and a version running Lollipop, and also bring it to that garage, and also…”

  48. M YTH : I CAN JUST DO IT ON T HE C LOUD ™ INSTEAD

  49. G OING TO THE CLOUD • 1 minute of 1080p capture on an iPhone = 200MB 
 Strong AI 
 • In many cities, you’ll be lucky if that is done in 5 Achieved! minutes — and that assumes Apple doesn’t kill you fi rst 
 Just point at anything 
 and our patented 
 algorithm will do 
 • If you want to scale globally (China, India), you can’t the rest assume an LTE connection

  50. M YTH : I CAN JUST SAVE RAW DATA AND DO IT OFFLINE

  51. D OING IT OFFLINE • 1 minute of 1080p capture = 3600 frames 
 • If you have a simple thing (e.g. 10 ms or less), you’re still looking at 30 seconds to run it • And that’s ignoring h264 decoding time! 
 • If you can do anything online, do it! Attention spans are very low, even for cutting edge tech.

  52. M YTH : I T ’ LL BE LIKE A LAB , WE CAN WING IT !

  53. 
 
 
 I N THE BEGINNING … You and a handful of colleagues know every line of code. 
 You move extremely quickly, and have no need for QA or code review. 
 “Meetings” make you think of Dilbert

  54. E VENTUALLY 50+ people, multiple products, multiple deadlines, (and this is just one repository) actual customers No way for one person to 
 keep track of everything

  55. R EALIZATION : WE NEED A MORE FORMAL PROCESS

  56. M YTH : P ROCESS ™ WILL SOLVE IT

  57. P ROCESS : A P RIMER Step 1: Commit to an insane deadline Five days? I’ll do it in one!

  58. P ROCESS : A P RIMER Step 1: Commit to an insane deadline Step 2: Fail

  59. P ROCESS : A P RIMER “Did you even read The Lean Startup?!!” Step 1: Commit to an insane deadline “We need JIRA!” Step 2: Fail “Trello or die!” Step 3: Blame Process™ “Scrum you fools! It’s been scrum the whole time!”

  60. 
 
 
 
 
 
 
 
 
 
 T HE TRUTH Process is useful, and necessary. 
 But it isn’t a magic bullet.

  61. E NOUGH MYTHS ; WHAT SHOULD I DO ?

  62. T IP : BEWARE OF CVPR SYNDROME • “What if it also used GANs to predict when the user wants to stop recording?” 
 • “Surely superresolution can help this” 
 • “Why are we using JPEG? This latest compression algorithm is *way* better” 
 • “Couldn’t a neural network handle all the 
 on-screen rendering too?” 
 • “This would be much better if I wrapped it 
 in Haskell”

  63. T IP : BEWARE OF CVPR SYNDROME https://www.youtube.com/watch?v=evUWersr7pc

  64. I T WILL GET MORE COMPLICATED ON ITS OWN . 
 D ON ’ T PUSH IT . “B UT WAIT , THERE ’ S …” • Customization per customer 
 • Exceptions for certain lighting conditions 
 • Optimizations for particular phones 
 • New battery constraints that force you to fork and simplify 
 • Handling of about 10000 di ff erent edge cases

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend