Comments (4)
Another would be get GPIO from a device input pin.
Some other phone sensors are here:
https://github.com/SensingKit/SensingKit-iOS
from rune.
I think this ticket comes in two pieces.
The first piece is internal and involves adding a mechanism that transforms Runefile arguments into method calls on the generated code.
For example, this line
CAPABILITY<I16[24000]> audio SOUND --hz 16000 --samples 150 --sample-size-ms 1500
Would need to be converted into a bunch of calls which tell the host to configure the SOUND
capability so that we get 1500ms worth of samples taken at 16kHz. This would be a once-off step which gets run from _manifest()
.
The second part will be identifying the various knobs and levers that we want to expose and wiring them into the runtime. At the moment the Rust runtime is very bare-bones and doesn't let you configure anything.
I'm not 100% sure what these would be, but I'm guessing @meelislootus and @kthakore will have a list.
from rune.
With #72 things are set up so you can set a capability object's properties. Now we just need to figure out which properties to implement and their semantics for the PC and mobile runtimes.
@meelislootus, @Mi1ind, and @kthakore I'm completely spitballing here, so feel free to post suggestions or alterations.
Random
Fill a buffer with random data.
(nothing needed, number of bytes can be inferred from the buffer's size)
Accelerometer
A capability which gives you an array of [f32; 3]
samples containing the acceleration in the X/Y/Z direction.
General:
n
|samples
- the number of samples we want (could also be inferred from the destination buffer size?)
Phone:
sample_rate
- How frequently to sample the accelerometerduration
- How long we should be taking samples for (note:samples = duration * sample_rate
so this could be unnecessary)
Image
Fill a buffer with a single image.
General:
grayscale
- convert the image's 3 RGB channels into onewidth
andheight
- ask the capability to resize the image to the desired dimensions
Video
(note: I've split this out from the image capability)
A capability which fills the provided buffer with a series of images (e.g. u8[num_samples x height x width x channels]
).
General:
samples
- the number of images to use- (all the other Image properties)
Phone:
sample_frequency
- when recording video in real time
Sound
Fill a buffer with PCM formatted audio samples.
General:
samples
- the number of samples (could be inferred from the buffer size?)
Phone:
hz
|frequency
- the frequency to record audio atsample_duration
|sample_duration_ms
- how long to record samples for
from rune.
@meelislootus @Ge-te the mobile runtime may not be using the parameters for the capabilities to massage in the inputs for the Rune.
from rune.
Related Issues (20)
- Enable Apple targets for librune_native in Github actions
- Consistent Tensor element types
- Allow people to attach a description to a capability
- Allow each Rune to have a description
- Make the compiler's internals deterministic
- Missing dependency libclang causes build to fail and hang HOT 3
- Let people specify supported runtime environments/backends in the Runefile
- Split the rune CLI up so there are individual binaries for each sub-command
- Caching strategy for long running processes like BERT QA inference HOT 3
- Add support for inference on ONNX and TensorFlow models HOT 1
- Make it easier to pass inputs through the builder API
- The "rune build" command completely ignores the "image" field
- The web runtime should try to cache Runes where possible
- Add rune serve to the cli
- Structured Logging HOT 1
- Load tf.js models using a custom loader
- BigUint64Array is not supported on some versions of Safari
- Random capability should be float
- Build error when connecting image source with normalisation block HOT 2
- Adding Observability Probes (Behind the scenes) to inputs to Runes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rune.