Convert Figma logo to code with AI

apple logoturicreate

Turi Create simplifies the development of custom machine learning models.

11,191
1,135
11,191
523

Top Related Projects

185,446

An Open Source Machine Learning Framework for Everyone

scikit-learn: machine learning in Python

82,049

Tensors and Dynamic neural networks in Python with strong GPU acceleration

16,516

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

26,078

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

39,274

Apache Spark - A unified analytics engine for large-scale data processing

Quick Overview

Turi Create is an open-source machine learning library developed by Apple. It simplifies the development of custom machine learning models for various tasks such as image classification, object detection, and recommendation systems. Turi Create is designed to be user-friendly and accessible to developers with limited machine learning experience.

Pros

  • Easy to use with a high-level API, making it accessible to beginners
  • Supports a wide range of machine learning tasks and models
  • Provides automatic feature engineering and model selection
  • Seamless integration with Core ML for deploying models on Apple devices

Cons

  • Limited to Python programming language
  • Not as actively maintained as some other machine learning libraries
  • Less flexibility compared to more advanced libraries like TensorFlow or PyTorch
  • Primarily focused on Apple ecosystem, which may limit its adoption in other environments

Code Examples

  1. Image Classification:
import turicreate as tc

# Load the data
data = tc.image_analysis.load_images('path/to/images')
data['label'] = 'category'

# Create the model
model = tc.image_classifier.create(data, target='label')

# Make predictions
predictions = model.predict(data)
  1. Recommendation System:
import turicreate as tc

# Load user-item interaction data
data = tc.SFrame.read_csv('user_item_data.csv')

# Create the model
model = tc.recommender.create(data, user_id='user', item_id='item')

# Get recommendations for a user
recommendations = model.recommend(users=['user1'], k=10)
  1. Object Detection:
import turicreate as tc

# Load the data
data = tc.SFrame('annotations.sframe')

# Create the model
model = tc.object_detector.create(data, feature='image', annotations='annotations')

# Make predictions
predictions = model.predict('test_image.jpg')

Getting Started

To get started with Turi Create:

  1. Install Turi Create:
pip install turicreate
  1. Import the library and start using it:
import turicreate as tc

# Load your data
data = tc.SFrame('your_data.csv')

# Create a model (example: classification)
model = tc.classifier.create(data, target='label')

# Make predictions
predictions = model.predict(data)

Competitor Comparisons

185,446

An Open Source Machine Learning Framework for Everyone

Pros of TensorFlow

  • Larger community and ecosystem, with more resources and third-party libraries
  • Better support for distributed and large-scale machine learning
  • More flexible and customizable for advanced users and researchers

Cons of TensorFlow

  • Steeper learning curve, especially for beginners
  • Can be more complex to set up and configure
  • Requires more code for simple tasks compared to Turi Create

Code Comparison

TensorFlow:

import tensorflow as tf

model = tf.keras.Sequential([
    tf.keras.layers.Dense(64, activation='relu'),
    tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam', loss='categorical_crossentropy')

Turi Create:

import turicreate as tc

data = tc.SFrame('data.csv')
model = tc.image_classifier.create(data, target='label', model='resnet-50')
predictions = model.predict(data)

TensorFlow offers more granular control and flexibility, while Turi Create provides a higher-level API for quick and easy model creation. TensorFlow is better suited for complex, custom models, whereas Turi Create excels in rapid prototyping and simpler use cases.

scikit-learn: machine learning in Python

Pros of scikit-learn

  • Extensive community support and documentation
  • Wider range of algorithms and tools for various machine learning tasks
  • Seamless integration with other popular Python libraries like NumPy and Pandas

Cons of scikit-learn

  • Steeper learning curve for beginners
  • Limited built-in support for deep learning and neural networks
  • Less focus on scalability for large datasets compared to Turi Create

Code Comparison

scikit-learn:

from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
clf = RandomForestClassifier()
clf.fit(X_train, y_train)

Turi Create:

import turicreate as tc

data = tc.SFrame('data.csv')
model = tc.random_forest_classifier.create(data, target='label', features=['feature1', 'feature2'])
predictions = model.predict(test_data)

Both libraries offer straightforward ways to implement machine learning models, but Turi Create provides a more simplified API for quick prototyping and deployment, especially for tasks like image classification and object detection. scikit-learn, on the other hand, offers more flexibility and control over the model parameters and pipeline.

82,049

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Pros of PyTorch

  • Wider community support and more frequent updates
  • Extensive ecosystem of tools and libraries
  • Dynamic computational graphs for flexible model building

Cons of PyTorch

  • Steeper learning curve for beginners
  • Less focus on high-level, easy-to-use APIs
  • Potentially slower inference speed compared to TuriCreate

Code Comparison

TuriCreate:

import turicreate as tc

# Load data
data = tc.SFrame('data.csv')

# Create a model
model = tc.image_classifier.create(data, target='label', model='resnet-50')

# Make predictions
predictions = model.predict(data)

PyTorch:

import torch
import torchvision

# Load data
dataset = torchvision.datasets.ImageFolder('data_directory')
dataloader = torch.utils.data.DataLoader(dataset)

# Create a model
model = torchvision.models.resnet50(pretrained=True)

# Make predictions
predictions = model(inputs)
16,516

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

Pros of LightGBM

  • Faster training speed and higher efficiency, especially for large datasets
  • Lower memory usage due to its histogram-based algorithm
  • Supports categorical features natively without need for preprocessing

Cons of LightGBM

  • Less user-friendly for beginners compared to Turi Create's simplified API
  • Requires more manual hyperparameter tuning
  • Lacks some of the built-in visualization tools found in Turi Create

Code Comparison

LightGBM:

import lightgbm as lgb
train_data = lgb.Dataset(X_train, label=y_train)
params = {'num_leaves': 31, 'objective': 'binary'}
model = lgb.train(params, train_data, num_boost_round=100)

Turi Create:

import turicreate as tc
data = tc.SFrame({'X': X, 'y': y})
model = tc.boosted_trees_classifier.create(data, target='y')

LightGBM offers more granular control over model parameters, while Turi Create provides a simpler, more abstracted interface for quick model creation. LightGBM is generally preferred for performance-critical applications and when working with large datasets, whereas Turi Create excels in rapid prototyping and ease of use for beginners.

26,078

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

Pros of XGBoost

  • Highly optimized and efficient implementation of gradient boosting
  • Supports distributed computing for large-scale datasets
  • Extensive language support (Python, R, Java, C++, etc.)

Cons of XGBoost

  • Steeper learning curve for beginners
  • Less focus on end-to-end machine learning workflows
  • Requires more manual feature engineering and preprocessing

Code Comparison

XGBoost:

import xgboost as xgb
model = xgb.XGBClassifier()
model.fit(X_train, y_train)
predictions = model.predict(X_test)

Turi Create:

import turicreate as tc
data = tc.SFrame({'features': X, 'target': y})
model = tc.boosted_trees_classifier.create(data, target='target')
predictions = model.predict(test_data)

XGBoost focuses on gradient boosting algorithms, offering high performance and flexibility. It's widely used in competitive machine learning and production environments. Turi Create, on the other hand, provides a more user-friendly interface for various machine learning tasks, including image classification and recommendation systems. It emphasizes simplicity and rapid prototyping, making it more accessible for beginners and those looking for quick solutions.

39,274

Apache Spark - A unified analytics engine for large-scale data processing

Pros of Spark

  • Highly scalable and distributed processing framework for big data
  • Supports multiple programming languages (Scala, Java, Python, R)
  • Large and active community with extensive ecosystem of tools and libraries

Cons of Spark

  • Steeper learning curve, especially for complex distributed computing concepts
  • Higher resource requirements and overhead for small-scale tasks
  • More complex setup and configuration compared to Turi Create

Code Comparison

Spark (PySpark):

from pyspark.ml.classification import LogisticRegression
from pyspark.ml.feature import VectorAssembler

assembler = VectorAssembler(inputCols=["feature1", "feature2"], outputCol="features")
lr = LogisticRegression(maxIter=10, regParam=0.001)

Turi Create:

import turicreate as tc

data = tc.SFrame('data.csv')
model = tc.logistic_classifier.create(data, target='label', features=['feature1', 'feature2'])

Spark offers more flexibility and control over the machine learning pipeline, while Turi Create provides a simpler, more streamlined API for common tasks. Spark is better suited for large-scale distributed processing, whereas Turi Create is designed for ease of use and quick prototyping on smaller datasets.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Quick Links: Installation | Documentation

Build Status PyPI Release Python Versions

Turi Create

Turi Create

Turi Create simplifies the development of custom machine learning models. You don't have to be a machine learning expert to add recommendations, object detection, image classification, image similarity or activity classification to your app.

  • Easy-to-use: Focus on tasks instead of algorithms
  • Visual: Built-in, streaming visualizations to explore your data
  • Flexible: Supports text, images, audio, video and sensor data
  • Fast and Scalable: Work with large datasets on a single machine
  • Ready To Deploy: Export models to Core ML for use in iOS, macOS, watchOS, and tvOS apps

With Turi Create, you can accomplish many common ML tasks:

ML TaskDescription
RecommenderPersonalize choices for users
Image ClassificationLabel images
Drawing ClassificationRecognize Pencil/Touch Drawings and Gestures
Sound ClassificationClassify sounds
Object DetectionRecognize objects within images
One Shot Object DetectionRecognize 2D objects within images using a single example
Style TransferStylize images
Activity ClassificationDetect an activity using sensors
Image SimilarityFind similar images
ClassifiersPredict a label
RegressionPredict numeric values
ClusteringGroup similar datapoints together
Text ClassifierAnalyze sentiment of messages

Example: Image classifier with a few lines of code

If you want your app to recognize specific objects in images, you can build your own model with just a few lines of code:

import turicreate as tc

# Load data 
data = tc.SFrame('photoLabel.sframe')

# Create a model
model = tc.image_classifier.create(data, target='photoLabel')

# Make predictions
predictions = model.predict(data)

# Export to Core ML
model.export_coreml('MyClassifier.mlmodel')

It's easy to use the resulting model in an iOS application:

Turi Create

Supported Platforms

Turi Create supports:

  • macOS 10.12+
  • Linux (with glibc 2.10+)
  • Windows 10 (via WSL)

System Requirements

Turi Create requires:

  • Python 2.7, 3.5, 3.6, 3.7, 3.8
  • x86_64 architecture
  • At least 4 GB of RAM

Installation

For detailed instructions for different varieties of Linux see LINUX_INSTALL.md. For common installation issues see INSTALL_ISSUES.md.

We recommend using virtualenv to use, install, or build Turi Create.

pip install virtualenv

The method for installing Turi Create follows the standard python package installation steps. To create and activate a Python virtual environment called venv follow these steps:

# Create a Python virtual environment
cd ~
virtualenv venv

# Activate your virtual environment
source ~/venv/bin/activate

Alternatively, if you are using Anaconda, you may use its virtual environment:

conda create -n virtual_environment_name anaconda
conda activate virtual_environment_name

To install Turi Create within your virtual environment:

(venv) pip install -U turicreate

Documentation

The package User Guide and API Docs contain more details on how to use Turi Create.

GPU Support

Turi Create does not require a GPU, but certain models can be accelerated 9-13x by utilizing a GPU.

LinuxmacOS 10.13+macOS 10.14+ discrete GPUs, macOS 10.15+ integrated GPUs
Activity ClassificationImage ClassificationActivity Classification
Drawing ClassificationImage SimilarityObject Detection
Image ClassificationSound ClassificationOne Shot Object Detection
Image SimilarityStyle Transfer
Object Detection
One Shot Object Detection
Sound Classification
Style Transfer

macOS GPU support is automatic. For Linux GPU support, see LinuxGPU.md.

Building From Source

If you want to build Turi Create from source, see BUILD.md.

Contributing

Prior to contributing, please review CONTRIBUTING.md and do not provide any contributions unless you agree with the terms and conditions set forth in CONTRIBUTING.md.

We want the Turi Create community to be as welcoming and inclusive as possible, and have adopted a Code of Conduct that we expect all community members, including contributors, to read and observe.