Coder Social home page Coder Social logo

shu223 / ios-10-sampler Goto Github PK

View Code? Open in Web Editor NEW
3.3K 106.0 347.0 96.48 MB

Code examples for new APIs of iOS 10.

License: MIT License

Swift 93.18% Objective-C 6.82%
ios ios10 swift-3 swift-4 speech metal cnn image-recognition convolutional-neural-networks demo

ios-10-sampler's Introduction

iOS-10-Sampler

Platform Language License Twitter

Code examples for new APIs of iOS 10.

How to build

Just build with Xcode 8.

It can NOT run on Simulator. (Because it uses Metal.)

Contents

Speech Recognition

Speech Recognition demo using Speech Framework. All available languages can be selected.

Looper

Loop playback demo using AVPlayerLooper.


Live Photo Capturing

Live Photo Capturing example using AVCapturePhotoOutput.

Audio Fade-in/out

Audio fade-in/out demo using setVolume:fadeDuration method which is added to AVAudioPlayer.

Metal CNN Basic: Digit Detection

Hand-writing digit detection using CNN (Convolutional Neural Network) by Metal Performance Shaders.

Metal CNN Advanced: Image Recognition

Real-time image recognition using CNN (Convolutional Neural Network) by Metal Performance Shaders.

PropertyAnimator: Position

Animating UIView's center & backgroundColor using UIViewPropertyAnimator.

PropertyAnimator: Blur

Animating blur effect using fractionComplete property of UIViewPropertyAnimator.

Preview Interaction

Peek & Pop interactions with 3D touch using UIPreviewInteraction.

Notification with Image

Local notification with an image using UserNotifications framework.


Sticker Pack

Example of Sticker Pack for iMessage.

Core Data Stack (Created by nolili)

Simple Core Data stack using NSPersistentContainer.

TabBar Customization

Customization sample for UITabBar's badge using text attributes.

New filters

New filters of CIFilter in Core Image.


New Fonts

New Fonts gallery

Proactive: Location Suggestions

This sample demonstrates how to use new mapItem property of NSUserActivity to integrate with location suggestions.


Attributed Speech

Attributed Speech demo with AVSpeechSynthesisIPANotationAttribute for AVSpeechUtterance.

Haptic Feedback

Haptic Feedbacks using UIFeedbackGenerator.

Author

Shuichi Tsutsumi

Freelance iOS programmer in Japan.

Support via PayPal

Special Thanks

The icon is designed by Okazu

ios-10-sampler's People

Contributors

nolili avatar shu223 avatar valeriyvan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-10-sampler's Issues

Inception3Net crashes on create

When I create the Inception3Net object from the commandQueue it says:

fatal error: unexpectedly found nil while unwrapping an Optional value

Any idea why this happens?

Update AttributedSpeechViewController to leverage correct attributedSpeechString attributes.

To answer your question "Anyone, please let me know how to use this new API.":

In AttributedSpeechViewController.swift, change the following lines:

attributedStr.addAttributes([NSFontAttributeName: UIFont.systemFont(ofSize: 14)], range: rangeAll)
attributedStr.addAttributes([NSForegroundColorAttributeName: UIColor.black], range: rangeAll)
attributedStr.addAttributes([NSFontAttributeName: UIFont.boldSystemFont(ofSize: 20)], range: rangeBold)

to something like:

// Speak punctuation out loud
attributedStr.addAttributes([UIAccessibility​Speech​Attribute​Punctuation: 1], range: rangeAll)
// English as spoken in UK/Great Britain
attributedStr.addAttributes([UIAccessibilitySpeechAttributeLanguage: "en-GB"], range: rangeAll)
// Speak in a deeper voice
attributedStr.addAttributes([UIAccessibility​Speech​Attribute​Pitch: 0.8], range: rangeAll)

See documentation here:

https://developer.apple.com/reference/uikit/uiaccessibility/speech_attributes_for_attributed_strings

Can not build code.

Thanks for providing nice sample codes. It's very helpful. But I could not build on Xcode8. Here is error msg from Xcode. Any ideas?

None of your accounts are a member of 'XXXXXXXXX':  An unexpected error occurred. Xcode cannot find a team matching 'XXXXXXXXX'.
No profiles for 'YYYYYYYYYYYYYYYY' were found:  Xcode couldn't find a provisioning profile matching 'YYYYYYYYYYYYYYYY'.
Code signing is required for product type 'App Extension' in SDK 'iOS 10.3'

Blur property disappear on app resign active

After some time blur effect is disappearing on Blur Property animator screen. The best way to reproduce is to hide app (resign active) then activate in again - blur disappears and you see clear image. Further blur value change not working anymore.

CNN image position

Hello,

in the image recognition sample, an improvement could be to highlight the image on the screen when it is recognized. Is it possible with the current APIs?

how to retrain inceptionv3?

I have a .pb file from Tensorflow and I would like to implement it into the metal image recognition. I am very new to Swift so any help would be great. thanks.

MPSCNNConvolutionのinitがInvoke出来ません。

現在研究室でiPhoneXを使いリアルタイムで画像処理をしたいということになり、このサンプルを見つけさせて頂きました。ありがとうございます。
そこでビルドをしたのですが、SlimMSCNN.swiftの88行目にて

Cannot invoke 'MPSCNNConvolution.init' with an argument list of type '(device: MTLDevice, convolutionDescriptor: MPSCNNConvolutionDescriptor, kernelWeights: UnsafePointer<Float>, biasTerms: UnsafePointer<Float>, flags: MPSCNNConvolutionFlags)'

といったエラーでビルドが失敗します。このプロジェクトは現在のXcode9,swift4で実行することは不可能なのでしょうか?もしくはios11ではできないのでしょうか?
よろしくお願いします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.