# embeddings_queue

created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 00ee09af-2abc-416b-8a1a-116572742d0d
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Let\u2019s take the following text as an example:\n\n\u201cThe first little pig was very lazy. He didn't want to work at all and he built his house out of straw. The second little pig worked a little bit harder but he was somewhat lazy too and he built his house out of sticks. Then, they sang and danced and played together the rest of the day.\u201d\n\nQuestion: \u201cWho worked a little bit harder?\u201d\n\nExpected answer: \u201cThe second little pig.\u201d\n\nYou can try this example on our live demo and see if the model gives the right answer!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 769e75a4-0f88-42b4-b02a-4bb272abe2dd
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Expected answer: \u201cThe second little pig.\u201d\n\nYou can try this example on our live demo and see if the model gives the right answer!\n\nNote that state-of-the-art QA models can only correctly answer questions that can be answered as a specific portion of the input text. For example, if the question was \u201cWhich pigs are lazy?\u201d the correct answer should be something like \u201cthe first little pig and the second little pig\u201d or \u201cthe first and second little pigs\u201d. However, a QA model won\u2019t give any of these answers as they do not appear as such in the text."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 809a2c63-db59-45a7-8345-cd318e0c8a7a
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "If you select the prunned version of the model or our prunned + optimized version you should see shorter inference times. Also, you might see differences in the answers given by each model. For the example text provided above, try asking, \u201cWhat did the pigs do after building their house?\u201d.\n\nThe optimization journey\n\nNow let's walk together through the optimization path to get to a blazing fast model! We need to take care of two main tasks: optimizing the model and serving the model. The following diagram gives a broad overview of the steps needed to walk this road. And we know there are a few, but a journey that only takes two steps to complete isn\u2019t really that memorable, is it?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 660e50e2-a7cd-488a-b47d-cef45a003c6c
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "1. Model Optimization\n\nStep #1: Loading the base model\n\nLoad a Pre-Trained Model Thanks to \ud83e\udd17 Hugging Face\u2019s model zoo and the transformers library, we can load numerous pre-trained models with just a few lines of code! Check out the from_pretrained() function on the transformers documentation!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0d61aeec-1dcf-463f-a89e-5f1a33c66602
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "As a starting point, we will need to select which model to use. In our case, we will be working with madlag/bert-large-uncased-whole-word-masking-finetuned-squadv2 , a BERT Large model fine-tuned on the dataset squad_v2. The SQuAD 2.0 dataset combines 100,000 questions in SQuAD 1.1 with over 50,000 unanswerable questions to look similar to answerable ones. This dataset and the trained model aim to resolve the problem of question answering while abstaining from answering questions that cannot be answered.\n\nWe can load this model in Python with the help of \ud83e\udd17 Hugging Face\u2019s transformers library by using the AutoModelForQuestionAnswering and AutoTokenizer classes in the following way:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: aa8d9b7d-83e1-491f-8e52-78d6d4fa08e5
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "This code will load the tokenizer and model and save this last one inside models/bert.\n\nThis model will be our starting point of comparison. We will check different metrics to evaluate how well we are optimizing in each step.\n\nWe will take a special look at the following:\n\nModel size: the size of the exported model file. It is important as it will impact how much space the model will take on the disk and loaded in the GPU/RAM."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 533ce699-82fe-41a4-bb25-03a85b80eff8
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "the size of the exported model file. It is important as it will impact how much space the model will take on the disk and loaded in the GPU/RAM. Model performance: how well it performs after each optimization with respect to the F1 score over the SQUADv2 validation set. Some steps of the optimization may affect the performance as they change the structure of the network."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9d5930b3-3229-4b7a-9f46-b807162a4a44
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "how well it performs after each optimization with respect to the F1 score over the SQUADv2 validation set. Some steps of the optimization may affect the performance as they change the structure of the network. Model throughput: this is the metric we want to improve in each step (for the context of this blog post) and we will measure it by looking at the model\u2019s inference speed. To do this, we will use Google Colab in GPU mode. In our case the assigned GPU was an NVIDIA Tesla T4, and we will test it with the maximum sequence supported by the model (512 characters).\n\nTo measure inference speed, we will be using the following function:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4d1c60f0-719e-4dcb-9b9e-60f4eeb4de5d
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "To measure inference speed, we will be using the following function:\n\nYou can find the definition of the benchmark function inside the Google Colab.\n\nThe metrics for the baseline model are:\n\nModel size 1275M Model performance (Best F1) 86.08% Model throughput (Tesla T4) 140.529 ms\n\nStep #2: Pruning"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1214c0f1-e720-4c91-b5e9-f9e5d32eeb00
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Reduce model size via Pruning In this step, we will prune the model. Pruning consists of various techniques to reduce the size of the model by modifying the architecture. It works by removing weights from the model architecture, which removes connections between nodes in the graph. This directly reduces model size and helps reduce the necessary calculations for inference with a downside of losing performance as the model is less complex. There are different approaches to pruning a neural network. We will be using Neural Networks Block Movement Pruning which uses a technique called sparsity. This work is backed by \ud83e\udd17 Hugging Face, thanks to the library nn_pruning. You can learn more about how"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ccc39d11-c02d-4ed4-98bc-052210d5b24b
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Pruning which uses a technique called sparsity. This work is backed by \ud83e\udd17 Hugging Face, thanks to the library nn_pruning. You can learn more about how this works internally on the blogs [1, 2] posted by Fran\u00e7ois Lagunas."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5f25f7fd-a8f5-473a-b1be-eba441304f9c
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "As a first step in optimizing the model, we will use pruning. Thankfully a pruned version of our base model already exists for us to use, post-training tuning included (sometimes called fine-pruning or fine-tuning a pruned model). This step is advised as the model changes, and performance will be affected. When we train the new model, we adapt the new weights to prevent losing performance.\n\nThis pruned model is available in the \ud83e\udd17 Hugging Face model zoo. If you want to prune a custom model, you can follow this notebook tutorial on how to do so in a few simple steps.\n\nSimilar to the previous step, let\u2019s load this pruned model:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 286c9e94-f3a5-483e-b1e9-c446289cf10d
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Similar to the previous step, let\u2019s load this pruned model:\n\nThis code will load the tokenizer and model and save it to models/bert_pruned.\n\nLet\u2019s compare this model to the baseline one. We can see an improvement in reducing the size by 14.90% and increasing the throughput by x1.55 while the performance decreased by 3.41 points.\n\nModel size 1085M Model performance (Best F1) 82.67% Model throughput (Tesla T4) 90.801 ms\n\nStep #3: Convert to ONNX"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1da64e12-3361-45de-89bd-a3ddb6112d34
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "The ONNX format ONNX (Open Neural Network Exchange) is an open format to represent machine learning models by defining a common set of operators for the model architectures. Many frameworks for training models (PyTorch, TensorFlow, Caffe2, etc.) allow you to export their models to ONNX and also import models in ONNX format. This enables you to move models from one framework to another. Training frameworks, like the ones mentioned above, are usually huge libraries requiring significant space and time to install and run. An advantage of converting our models to ONNX is that we can run them in small footprint libraries such as onnxruntime, giving us more space and a speed boost in our"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: aa2c2801-c9dd-4000-90c5-1f6fc1ca49b8
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "converting our models to ONNX is that we can run them in small footprint libraries such as onnxruntime, giving us more space and a speed boost in our production environment."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cf3cbe13-5890-4540-a910-947068d6a15e
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "The ONNX: Preventing Framework Lock in extends the concept and also includes this helpful image that represents the main idea.\n\nThe next step is to convert our model to ONNX. To do this, we can take advantage of the optimum library from \ud83e\udd17 Hugging Face, which helps us make our models more efficient in training and inference. In our case, we will take advantage of the implementations for ORT (ONNX Runtime).\n\nOptimum provides us the ability to convert \ud83e\udd17 Hugging Face models to ORT. In this case, we will use ORTModelForQuestionAnswering but keep in mind that there are options for the model of your choice."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e6b462c4-af32-43b6-8200-c2437ec78db9
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "This class takes a \ud83e\udd17 Hugging Face model and returns the ORT version of it. Let\u2019s use it to transform our pruned model to ORT.\n\nThis code will load the tokenizer and model and save it to models/bert_onnx_pruned/model.onnx.\n\nIn this step, the model size and the model performance stay still, as we do not generate a change in the architecture. However, thanks to the new execution environment, we can see an improvement in the model throughput of x1.18 compared to the previous step and x1.83 compared to the baseline model.\n\nModel size 1085M Model performance (Best F1) 82.67% Model throughput (Tesla T4) 76.723 ms\n\nStep #4: Applying Graph optimization"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 09e63305-3c8f-41ed-8c11-4a6abf23821a
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Graph Optimization Converting our model to ONNX means having a new set of tools at our disposal to optimize the models. An ONNX graph can be optimized through different methods. One of them is node fusion, which consists of combining, when possible, multiple nodes of the graph into a single one and by doing so making the whole graph smaller. Another method is constant folding, which works in the same way as in compilers. It pre-computes calculations that can be done before running the inference on the model. This removes the need to compute them on inference. Redundant node elimination is another technique for removing nodes that do not affect the inference of a model, such as identity"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 395e904d-fa50-40f7-8b72-7c07455412f3
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "them on inference. Redundant node elimination is another technique for removing nodes that do not affect the inference of a model, such as identity nodes, dropout nodes, etc. Many more optimizations can be done in a graph; here is the full documentation on the implemented optimizations on ORT."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 565d90b5-1b2e-4aff-bdd5-cdf39ff8654e
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "In this step, we will optimize the ONNX graph with the help of ORT, which provides a set of tools for this purpose. In this case, we will be using the default optimization level for BERT-like models, which is currently set to only basic optimizations by default.\n\nThis will enable constant folding, redundant node elimination and node fusion. To do this, we only need to write the following code:\n\nThis code will optimize the model using ORT and save it to models/bert_onnx_pruned/optimized.onnx."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 897040e9-6066-4ffc-a9ce-9559cfd04451
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "This code will optimize the model using ORT and save it to models/bert_onnx_pruned/optimized.onnx.\n\nIn this step, the model\u2019s size and performance also stay the same as the basic optimizations do not interfere with the result of the model itself. However, they impact the throughput due to reducing the number of calculations taking place. We can see an improvement of x1.04 compared to the previous step and x1.9 compared to the baseline model.\n\nModel size 1085M Model performance (Best F1) 82.67% Model throughput (Tesla T4) 73.859 ms\n\nStep #5: Downcast to FP16"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 50dee00e-e5dc-4333-9f67-696bf180b4b5
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Step #5: Downcast to FP16\n\nDowncasting Downcasting a neural network involves changing the precision of the weights from 32-bit (FP32) to 16-bit floating point (half-precision floating-point format or FP16). This has different effects on the model itself. As it stores numbers that take up fewer bits, the model reduces its size (hopefully, as we are going from 32 to 16 bits, it will halve its size). At the same time, we are forcing the model to do operations with less information, as it was trained with 32 bits. When the model does the inference with 16 bits, it will be less precise. This might affect the performance of the model."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1da92da1-e426-4fa0-9432-75527ef91865
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "In this step, we will reduce the precision of the model from 32 bits to 16. Thankfully onnxruntime has a utility to change our model precision to FP16. The model we have already loaded from the previous step has a method called convert_float_to_float16, which directly does what we need! We will be using deepcopy to create a copy of the model object to ensure we do not modify the state of the previous model.\n\nThis code will load the tokenizer and model and save it to models/bert_onnx_pruned/optimized_fp16.onnx."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: adab2c89-e91a-4682-8dc3-06b653f8f082
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "This code will load the tokenizer and model and save it to models/bert_onnx_pruned/optimized_fp16.onnx.\n\nAfter this step, the size of the model was reduced by 49.03% compared to the previous one. This is almost half the size of the model. When compared to the baseline model, it decreased by 56.63%.\n\nSurprisingly, the performance was affected positively, increasing by 0.01%. This means that using the half-precision model, in this case, is better than using the FP32 one.\n\nFinally, we see a huge change in the throughput metric, improving x4.06 compared to the previous step. If we compare this against the baseline model, it is x7.73 faster."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: fb7bab21-a728-4f0c-8634-d251b923ca1a
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Model size 553M Model performance (Best F1) 82.68% Model throughput (Tesla T4) 18.184 ms"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1f6202d1-3402-4856-bac0-393a9bac7e3e
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "When we applied Downcasting, we converted the weights and biases of our model from a FP32 representation to a FP16 representation. An additional optimization step would be to apply Quantization, which takes it one step further and converts the weights and biases of our model to an 8-bit integer (INT8) representation. This representation takes four times less storage space, making your model even smaller! Also, operating with INT8 is usually faster and more portable, as almost every device supports integer operations, and not all devices support floating-point operations. We didn\u2019t apply quantization during this model optimization concretely. However, it is a good technique to consider if"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3984e4b6-a282-4d96-89bf-a06a43c38630
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "floating-point operations. We didn\u2019t apply quantization during this model optimization concretely. However, it is a good technique to consider if trying to optimize arithmetic processing mainly on the CPU or reduce the model\u2019s size."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f24b9100-5d75-4a5a-8f3d-4ba62b40c6dd
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Intermediate summary\n\nAs the final result, we have a model that is almost half the size, loses only 3.24 performance points, and runs x7.73 times faster when compared to the original one. We can see a comparison of each step in the graph below, where we seek to have a high number in F1 and a low number in latency.\n\n2. Serving\n\nNow we have a super-fast and lightweight version of our model, so what\u2019s next? Well, you will surely want to make your model accessible to users, so it\u2019s time to take it to production! This section shows you how to easily and efficiently serve your model while testing several strategies. You can also check this work done by Micha\u00ebl Benesty on a different BERT model."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 34e0cc40-a772-4a4a-a9e2-05701c0b0f83
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "If you have ever tried to deploy a model, you have probably heard of FastAPI. FastAPI is a well-known open-source framework for developing Restful APIs in Python, developed by Sebasti\u00e1n Ramirez. It is user-friendly, performant, and can help you get your model up in a matter of minutes. Without a doubt, it is one of the first choices for every ML/DS engineer to get the first version of their model up and running!\n\nWe benchmark the different deployment strategies with different sequence lengths on the input. For each sequence length, we send 50 sequential, random requests and report the server's mean and standard deviation response time."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 36b12761-1183-4e5c-b842-72b9bc238b27
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Here is the benchmark of the base model deployed on FastAPI.\n\nSequence Length Mean Time (ms) STD Time (ms) 32 14.72 0.09 64 14.71 0.08 128 14.99 0.1 256 16.41 0.18\n\nDeploy the Optimized Model on FastAPI\n\nHere is the code for the FastAPI app that serves our optimized Question and Answer model:\n\nHere are the results for the benchmark:\n\nSequence Length Mean Time (ms) STD Time (ms) 32 3.47 0.09 64 3.84 0.2 128 4.66 0.21 256 6.15 0.12\n\nWith just a few lines of code, we deployed an API that processes input and returns the output of the model in just a few milliseconds! Pretty cool, right?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4af96b5b-2017-4fb7-b08d-9b5120b89a0f
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Sequence Length Baseline Opt. + FastAPI (ms) Speed-up 32 14.72 3.47 x4.24 64 14.71 3.84 x3.83 128 14.99 4.66 x3.21 256 16.41 6.16 x2.66\n\nUsing our optimized model and the ONNX Runtime, we can enjoy a nice speed-up of x2.6 for the longest sequence length! But now that we have already optimized the model, what else can we do to accelerate inference time even more? Let\u2019s check it out!\n\nDeploy the Optimized Model on Triton"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 6e95b0ac-8949-4402-91e4-61d9a80ff6c1
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Deploy the Optimized Model on Triton\n\nAlthough FastAPI is a great tool and an enormous contribution to the open-source community, it wasn\u2019t explicitly designed for deploying ML models. Its scope is much broader and, thus, lacks some functionalities that are much needed for deploying models: dynamic batching, auto-scaling, GPU management, model version control, and more.\n\nIf you are looking for these features, there\u2019s another option. We are talking about NVIDIA\u2019s inference server, Triton. Triton is an open-source solution for fast and scalable inferencing. With minimal effort, you can have your model deployed and enjoy the great features Triton has to offer!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5eb284f2-1b11-480b-a5f0-b0f5be600cef
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "All you need to get your model up and running in Triton is a simple configuration file specifying the inputs and outputs of the model, the chosen runtime, and the hardware resources needed. You can even leave the inputs and outputs unspecified, and Triton will try to detect them automatically from the model file! Here is the config file for our example:\n\nWe include some explanations of the variables and their values below:\n\nmax_batch_size: 0 indicates that we don\u2019t want to perform dynamic batching."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e0d23712-d89f-432d-a361-6ca72115c5a2
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "We include some explanations of the variables and their values below:\n\nmax_batch_size: 0 indicates that we don\u2019t want to perform dynamic batching.\n\nindicates that we don\u2019t want to perform dynamic batching. The -1 in the dimensions of the inputs and outputs means that those dimensions are dynamic and could change for each inference request. For example, if we receive a longer sequence, we could expect the second dimension of input_ids to be bigger."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ceedca17-dbd0-4f8e-8835-c3659c5b92a4
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "in the dimensions of the inputs and outputs means that those dimensions are dynamic and could change for each inference request. For example, if we receive a longer sequence, we could expect the second dimension of to be bigger. The instance_group property lets us specify how many copies of our model we want to deploy (for load balancing) and which hardware they should use. Here we are just simply deploying one instance running on GPU.\n\nHere is the benchmark for the optimized model deployed on Triton:\n\nSequence Length Mean Time (ms) STD Time (ms) 32 2.08 0.05 64 2.48 0.09 128 3.21 0.11 256 4.46 0.18\n\nAnd here is the comparison with the baseline:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 581d25f8-067c-49e1-bb96-d3fe84980135
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Sequence Length Mean Time (ms) STD Time (ms) 32 2.08 0.05 64 2.48 0.09 128 3.21 0.11 256 4.46 0.18\n\nAnd here is the comparison with the baseline:\n\nSequence Length Baseline Opt. + FastAPI (ms) Speed-up 32 14.72 2.08 x7.07 64 14.71 2.84 x5.93 128 14.99 3.21 x4.66 256 16.41 4.46 x3.67\n\nAs we can see, with little effort, Triton out-of-the-box achieves a speed-up of x3.67! Also, we didn\u2019t have to code anything! Triton processes the inputs, calls the model, and returns the outputs all by itself, which will surely save you some time."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7d2845da-8911-40de-85b2-df1037659e1b
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Although vanilla Triton achieved very good results, the tool has much more to offer than what we include in this blog post. Activating dynamic batching could save huge processing times by batching multiple requests, without significantly delaying response time. Model version management could help us test new versions of the model before taking them to production or allow us to have multiple versions of the model deployed simultaneously. Instance management enables us to perform load balancing or have multiple instances of the model for redundancy. With all these features and much more, Triton should definitely be amongst your first options for deploying models at scale!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a9fbd378-8c24-469d-a7e5-f4b2d5119521
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Deploy the Optimized Model on FastAPI with IOBinding\n\nWe decreased inference time by a factor of 3.67. However, looking at the results of the benchmarks, you might have noticed something is off\u2014the inference time appears to be increasing with the sequence length. This is due to poor management of GPU memory allocation and data transfer on our side. We will take one more step in optimizing inference time, applying a very cool technique called IOBinding."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b38fabbe-24df-45aa-877a-64f08473d7ea
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "IOBinding allows the user to copy the model's inputs to GPU (or other non-CPU devices) and allocate memory for the outputs on the target device without having to do so while running the computational graph of the model. This saves huge processing times during inference, especially if inputs and outputs are very large!\n\nHere is the new code for the FastAPI app that serves our model, now with IOBinding activated.\n\nApplying this optimization is not straightforward and requires a bit more code, but it sure is worth it. Check the results of the benchmark!\n\nSequence Length Mean Time (ms) STD Time (ms) 32 1.43 0.03 64 1.45 0.02 128 1.49 0.09 256 1.54 0.1"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0b956da8-5d9d-4175-b420-f630cf25b575
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Sequence Length Mean Time (ms) STD Time (ms) 32 1.43 0.03 64 1.45 0.02 128 1.49 0.09 256 1.54 0.1\n\nSequence Length Baseline Opt. + FastAPI (ms) Speed-up 32 14.72 1.43 x10.29 64 14.71 1.45 x10.14 128 14.99 1.49 x10.06 256 16.41 1.54 x10.65\n\nFastAPI with IOBinding achieves almost constant execution time, even for higher sequence lengths! This allows us to achieve a x10 speed-up!\n\nClosing Thoughts"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3930073d-f701-444d-9d2d-5d8de14a3706
encoding: FLOAT32
metadata:
{"title": "A guide to optimizing Transformer-based models for faster inference", "link": "https://tryolabs.com/blog/2022/11/24/transformer-based-model-for-faster-inference", "language": "en", "description": "Learn how to optimize your Transformer-based model for faster inference in this comprehensive guide that covers techniques for reducing the size and time required for execution.", "chroma:document": "Closing Thoughts\n\nThroughout this blog post, we saw various techniques for reducing the inference time and size of the model without losing much accuracy. We managed to decrease the model size by more than half its size and accelerate inference time by x7.73! We also presented two different tools for deploying your model and showed you how you can optimize serving in order to achieve a x10 speed-up!\n\nTransformer models are the future. With the tools we just provided, you will be able to run state-of-the-art models much faster and with fewer resources, saving you time, effort and money.\n\nTransformers in your next project Are you having some concerns about it? Get in touch"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c37b3313-d963-47fe-86ed-e74670d9c9f1
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Have you ever wished you were able to try out a new hairstyle before finally committing to it? How about fulfilling your childhood dream of being a superhero? Maybe having your own digital Funko Pop to use as your profile picture? All of these are possible with DreamBooth, a new tool developed by researchers at Google that takes recent progress in text-conditional image synthesis to the next level.\n\nIn our previous post, we discussed text-to-image generation models and the massive impact that models like DALL\u00b7E and Stable Diffusion are having throughout the Machine Learning community."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 94f2b56a-a211-4028-aff0-cd2bf3dce92f
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Now, in this blog post, we will guide you through implementing DreamBooth so that you can generate images like the ones you see below. To do so, we\u2019ll implant ourselves into a pre-trained Stable Diffusion model\u2019s vocabulary. Be warned, generating images of yourself (or your friends) is highly addictive. Don\u2019t say we didn\u2019t warn you!\n\nAlso, if you know part of our team, you may recognize some faces in the following images. \ud83d\udc40\n\nDreamBooth motivation\n\nFeel free to skip this section if you\u2019re not particularly interested in the theory behind the approach and prefer to dive straight into the implementation."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 117c9ffb-efd4-40a4-aeea-010152253420
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "The first step towards creating images of ourselves using DreamBooth is to teach the model how we look. To do so, we\u2019ll follow a special procedure to implant ourselves into the output space of an already trained image synthesis model."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 08b7c7c6-a4e0-4f08-ae36-6929276c8e7a
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "You may be wondering why we need to follow such a special procedure. After all, these new generation image synthesis models have unprecedented expressive power. Can\u2019t we just feed the model an extremely detailed description of the person and be done with it? The short answer is no. It\u2019s still very hard for these models to reconstruct the key visual features that characterize a specific person. Instead, the model must learn what we look like down to the last detail so that it can later reproduce us in the most fictional scenarios.\n\nTo achieve this, we\u2019ll fine-tune this model with a set of images, binding them to a unique identifier that references us."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7c68cc64-faa8-48cd-a45a-ef233532bc60
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "To achieve this, we\u2019ll fine-tune this model with a set of images, binding them to a unique identifier that references us.\n\nBut wait a minute... How many of these images will we need? Deep Learning models usually require large amounts of data to produce meaningful results (even more so these large image synthesis models). Does this mean that we need thousands of pictures of ourselves for the model to reproduce us faithfully?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 970c5c08-8b7a-42a1-8300-5f9595a5aee5
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Fortunately, the answer is no. The technique we\u2019re about to show you achieves results like you have seen above with no more than a dozen images of your face. Still, these images must exhibit some variation in terms of different perspectives of your face (e.g., front, profile, angles in between), facial expressions (e.g., neutral, smiling, frowning), and backgrounds. Here are examples from the three victims we chose for this blog post: Fernando, Giuls, and Luna (from left to right)."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5328897d-5f92-4b31-88b2-5961cfd4efa2
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Once you\u2019ve collected these images, the next step is to label them with a text prompt. Following the instructions in DreamBooth\u2019s paper, we\u2019ll use the prompt A [token name] [class noun] where [token name] is an identifier that will reference us, and [class noun] is an already existing class in the model\u2019s vocabulary which describes us at a high level. For instance, for Fernando Bernuy (co-writer and one of the victims of our experiment), a possible prompt would be A fbernuy man . Other examples of class nouns include woman , child , teenager , dog , or sunglasses . Yes, this approach works with animals and other objects too!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ed6b0670-ceb7-4185-a70b-acabea04d3c9
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "The motivation behind linking our unique identifier with a class noun during training is to leverage the model\u2019s strong visual prior of the subject\u2019s class. In other words, it will be much easier for the model to learn what we look like if we tell it that we are a person and not a refrigerator. The authors of DreamBooth found that including a relevant class noun in the training prompts decreased training speed and increased the visual fidelity of the subject\u2019s reproduced features.\n\nHowever, there are still two issues we must address before we can fine-tune the model:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 299ced4c-74f8-4b04-897b-cc68caa8be8a
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "However, there are still two issues we must address before we can fine-tune the model:\n\nThe first one is overfitting: these extremely large generative models will inevitably overfit such a small set of images, no matter how varied it may be. This means that the model will learn to reproduce the subject with high fidelity, but mostly in the poses and contexts present in the training images.\n\nPrior-preservation loss acts as a regularizer that alleviates overfitting, allowing pose variability and appearance diversity in a given context. Image and caption from DreamBooth\u2019s paper."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dd6ba806-78f3-4df5-9711-6390690e8b0a
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "The second is language drift: since the training prompts contain an existing class noun, the model forgets how to generate different instances of the class in question. Instead, when prompted for a [class noun] , the model returns images resembling the subject on which it was fine-tuned. Essentially, it replaces the visual prior it had for the class with the specific subject that we introduced into its output space. And although Fernando is a handsome man, not all men look like him!\n\nLanguage drift. Without prior-preservation loss, the fine-tuned model cannot generate dogs other than the fine-tuned one. Image taken from DreamBooth\u2019s paper."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 54a9fc18-aee9-48dc-b33f-fac96a4f3c0a
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "To solve both issues, the authors of DreamBooth propose a class-specific prior-preservation loss. Simply put, the idea is to supervise the fine-tuning process with the model\u2019s own generated samples of the class noun. In practice, this means having the model fit our images and the images sampled from the visual prior of the non-fine-tuned class simultaneously. These prior-preserving images are sampled and labeled using the [class noun] prompt. This helps the model remember what a generic member of the subject class looks like. The authors recommend sampling a number of 200 \u00d7 N 200 \\times N 200\u00d7N [class noun] images, where N N N stands for the number of images of the subject."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c98d86ed-bb4e-4749-93df-769b38e5e48a
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Training approach. The subject\u2019s images are fitted alongside images from the subject\u2019s class, which are first generated using the same Stable Diffusion model. The super resolution component of the model (which upsamples the output images from 64 x 64 up to 1024 x 1024) is also fine-tuned, using the subject\u2019s images exclusively. Image taken from DreamBooth\u2019s paper.\n\nNow that we\u2019ve covered all the relevant pieces of the theory, all that\u2019s left is to fine-tune the image synthesis model. Let\u2019s do it!\n\nFine-tuning stable diffusion with your photos\n\nThree important elements are needed before fine-tuning our model: hardware, photos, and the pre-trained stable diffusion model."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f72f2c3e-fef7-4747-aeec-a8921a8dbaec
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "The original implementation requires a large amount of GPU resources to train, making it difficult for common Machine Learning practitioners to reproduce. However, a community in discord has developed an unofficial implementation that requires less computing resources. If you happen to have access to a machine with at least 16GB VRAM GPU, you can easily train your model following Hugging Face\u2019s DreamBooth training example instructions. If you don\u2019t, we\u2019ve got you covered! In this post, we\u2019ll show you how to train and run inference in a free-tier Google Colab. Yes, you\u2019ve read that right, a free-tier Google Colab!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: aecdff8b-2846-482e-9030-8fac27e4650e
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Note that the notebook used may be outdated due to the rapid advancements in the libraries used, but it has been tested and confirmed to still be functional. January 2022.\n\nThe second element is the subject\u2019s photos. In this tutorial, we\u2019re gonna use pictures of members of the TryoGang and one of our pets. In any case, there are some rules we need to follow to get the best possible results."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f5180311-b4a2-44a7-b9bd-a6f2bf66132d
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "As mentioned in the motivation section, Stable Diffusion tends to overfit the training images. To prevent this, make sure that the training subset contains the subject in different poses and locations. Even though the original paper recommends using 4 to 6 images, the community in Discord has found that using 10 to 12 images leads to better results. As a rule of thumb, we\u2019ll use 2 images that include the torso and 10 of the face, with different backgrounds, styles, expressions, looking and not looking at the camera, etc.\n\nIf you\u2019re looking at the camera and smiling in every photo, don\u2019t expect the model to generate you looking sideways or with a neutral face, so avoid using selfies only!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7e894fc6-19f9-4349-96c1-aa4be970871f
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "In addition, make sure to crop the training images to a square ratio since Stable Diffusion scales them down to 64 x 64 to use them for training.\n\nAnd last but not least, we\u2019ll need the pre-trained Stable Diffusion model\u2019s weights. These can be downloaded from Hugging Face, for which we\u2019ll need to create an account, read the model card and accept the terms and conditions. Don\u2019t download the model manually because the training script will do it automatically.\n\nNow that we\u2019ve got everything set up, let\u2019s fine-tune the model!\n\nTraining\n\nWe will use this implementation that includes a notebook ready to use in Google Colab. You can open the notebook by clicking on this link."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e317ce34-c9ef-429e-8037-93e9e7263bcc
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Training\n\nWe will use this implementation that includes a notebook ready to use in Google Colab. You can open the notebook by clicking on this link.\n\nBefore running it, let\u2019s modify it for our use case (we\u2019ll use Fernando as the subject to illustrate the instructions). We need to define four parameters for the training process:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d2cfb8e8-d15b-4e60-9c69-8fa67c57c6dd
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "TOKEN NAME: corresponds to the unique identifier which will reference the subject we want to add. This name should be unique, so we don\u2019t have to compete with an existing representation. Here we can use a simple first initial + last name token name, such as fbernuy . CLASS NAME: This is the class name we introduced in the motivation section. The original DreamBooth paper recommends using generic classes such as man, woman, or child (if the subject is a person) or cat or dog (if the subject is a pet). However, the Discord community implementing the approach on Stable Diffusion has found that using celebrities who are similar to the subject produces better results. In our case, we used George"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dbf1f7d4-9eb2-4416-b7fa-12f0c183b360
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "the approach on Stable Diffusion has found that using celebrities who are similar to the subject produces better results. In our case, we used George Clooney when the subject is a man and Jennifer Anniston when it\u2019s a woman. We still used the \u201ccat\u201d class for Luna, as we couldn\u2019t think of a suitable famous cat other than Garfield. NUMBER OF REGULARIZATION IMAGES: As mentioned in the motivation section, we need the class-specific prior-preservation loss to prevent overfitting and language drift issues. We followed the original authors\u2019 recommendation of using 200 images per training image. Remember that using more regularization images may lead to better results. TRAINING ITERATIONS: This"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 53040770-5cab-447f-bf47-b2b7f44f72f2
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "of using 200 images per training image. Remember that using more regularization images may lead to better results. TRAINING ITERATIONS: This parameter defines the number of iterations the model will run during the fine-tuning process. If this number is too low, the model will underfit the subject\u2019s images and won\u2019t be able to reproduce it accurately during inference. If it\u2019s too high, the model will overfit instead, making it unable to reproduce the subject with expressions, poses, or contexts outside of those in the training subset. A rule of thumb that has shown good results in our experiments is to use between 100 and 200 iterations per training image. Since we have 12 images of"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7cf05067-7631-4e48-ae40-9eb3daec2527
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "rule of thumb that has shown good results in our experiments is to use between 100 and 200 iterations per training image. Since we have 12 images of Fernando, let\u2019s use 2400 iterations."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f3c60c4e-7766-4802-a11e-828a6d99452b
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Now let\u2019s modify the notebook with these parameters as follows:\n\nSettings and run: we\u2019ll modify the CLASS_NAME to georgeclooney . Also, we\u2019ll replace the default sks token name with fbernuy in the INSTANCE_DIR and OUTPUT_DIR . This will make it easier to identify the directory in which the model and the data will be saved.\n\nStart Training:\n\nNow we are ready to run the notebook and fine-tune our model. The first few cells will install the required dependencies. After this, we\u2019ll be prompted to log in to HuggingFace using our access token."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 21b67d7d-effa-4c6f-9531-7a4e2a4ee8d3
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Then, we\u2019ll be asked to upload the subject\u2019s photos. Here, can use the Choose Files button and select the images from our computer or upload them directly to the subject\u2019s directory inside the data folder in the Colab instance. The next cell is where the magic happens. We finally get to fine-tune the model! The script will download the pretrained model\u2019s weights, generate the regularization images, and then execute the specified number of training iterations. The entire process should take about an hour and a half, so be patient. Remember to keep an eye on the notebook!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d2892bf6-b738-4ca6-acfd-8f79a2e27d68
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Once training is over, we\u2019ll be prompted to convert the model to a ckpt file. This is highly recommended since it\u2019s a requirement for an extremely useful web interface that we\u2019ll introduce further down in this blog post. Once we\u2019ve saved the ckpt file in the notebook instance, we\u2019ll download it to our local machine or save it to our drive folder."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: fe4bb42e-3414-4d1d-99be-2dc15c373431
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "We can test our fine-tuned model by running the cells below the \u201cInference\u201d section of the notebook. The first cell loads the model we just trained and creates a new Stable Diffusion pipeline from which to sample images. We can set a seed to control random effects in the second cell. And now, the moment you\u2019ve been anticipating since you started reading this blog post: generating our custom images!\n\nThe cell titled \u201cRun for generating images\u201d controls the image-generating process. There\u2019s a total of 7 parameters that we can modify to customize our image:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 237b7573-7fe3-4b7e-9496-81e8d00b84de
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "prompt : the text prompt that will guide the image\u2019s generation. Here\u2019s where we should include the token name that references our subject.\n\n: the text prompt that will guide the image\u2019s generation. Here\u2019s where we should include the token name that references our subject. negative_prompt : serves to specify what we don\u2019t want to see in the image. For instance, if we want to generate an image with a cloudy sky, we enter clear sky as the negative prompt.\n\n: serves to specify what we want to see in the image. For instance, if we want to generate an image with a cloudy sky, we enter as the negative prompt. num_samples : the number of images the model will generate in a single batch."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5c0d0a94-37bc-4c47-84c3-5262a43186e3
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": the number of images the model will generate in a single batch. guidance_scale : also known as CFG Scale, is a float that controls how much importance is given to the input text prompt. Lower values of this parameter will allow the model to take more artistic liberties when generating the images."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9437015f-e6e6-487b-9944-e5680ac7635e
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": also known as CFG Scale, is a float that controls how much importance is given to the input text prompt. Lower values of this parameter will allow the model to take more artistic liberties when generating the images. num_inference_steps : the number of denoising steps that the model will run. A higher number of steps will usually lead to more detailed images at the cost of an increased inference time. Be careful with this parameter, though, since too many steps may lead to visual artifacts in the images."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a89d81fb-bf92-4936-9a2b-0871bf2663fd
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": the number of denoising steps that the model will run. A higher number of steps will usually lead to more detailed images at the cost of an increased inference time. Be careful with this parameter, though, since too many steps may lead to visual artifacts in the images. height : the height of the generated image in pixels.\n\n: the height of the generated image in pixels. width : the width of the generated image in pixels."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b9e153ca-9a45-4bf4-b704-4c766a2805f3
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": the height of the generated image in pixels. width : the width of the generated image in pixels.\n\nThere\u2019s no magic formula to generate the perfect image, so you\u2019ll probably have to play around with these parameters for a while before achieving the results you want. If you\u2019re having trouble generating cool images, don\u2019t get discouraged! Some of the most common issues have pretty straightforward solutions, according to Joe Penna (one of the managers at the Stable Diffusion Discord channel)."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 276d9b8c-6595-4ee5-9da5-1b663e9ab0b1
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "If they don\u2019t look like the subject: Check to see if the prompt is right and if the images follow the tips we gave before. Try including the class name in the prompt and the token name (i.e., a photo of TOKEN_NAME georgeclooney ). We may also need to train for more iterations."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 45b10be5-0153-4561-bf4b-d886b26582c6
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Check to see if the prompt is right and if the images follow the tips we gave before. Try including the class name in the prompt and the token name (i.e., ). We may also need to train for more iterations. If they look too much like the training images: we might have trained for too long, used too few images, or our images may be too similar. We modify the prompt by including the token name towards the end of it, for instance: an exquisite portrait photograph, 85mm medium format photo of TOKEN_NAME with a classic haircut ."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7a5ab56f-426e-4356-82a8-d15300a0d165
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "we might have trained for too long, used too few images, or our images may be too similar. We modify the prompt by including the token name towards the end of it, for instance: . If using a complex prompt doesn\u2019t give us the desired results: we might have trained for too few iterations. We can try repeating the token name in the prompt, for instance: TOKEN_NAME in a portrait photograph, TOKEN_NAME in an 85mm medium format photo of TOKEN_NAME .\n\nAlthough the notebook is extremely useful for training the model, it\u2019s far from being the best platform to generate images. In the following section, we\u2019ll introduce an incredibly powerful tool to enhance the image generation process further."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4557ca19-9df7-4280-954f-b65fe4c81b01
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "In practice: generating cool images\n\nCreating great images requires both practice and patience. However, this process can be alleviated by using the right tools. The one we\u2019re about to show you is truly mind-blowing; it\u2019s so versatile that we can\u2019t recommend it enough! It\u2019s a WebUI that makes the entire process more interactive and fun.\n\nTo use it, we must run a web server and follow the Install instructions available for Linux, Windows, or Apple Silicon. Alternatively, we can run the server on another Colab using this link. Beware that time flies when generating images, and Colab\u2019s free tier is limited!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c56fec58-ad5c-4aed-bffb-faad67d828ab
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Once installed, we\u2019ll copy our model\u2019s ckpt file in the web server folder, stable-diffusion-webui/models/Stable-diffusion , and then run the web server script ( webui.sh or webui.bat ). This gives us the UI\u2019s address and port so we can open it using our favorite browser.\n\nWebUI tool for Stable Diffusion, from AUTOMATIC1111\n\nThe UI has many different features. We highly recommend exploring the project\u2019s wiki. The development of Stable Diffusion and this UI are moving fast, so be aware that this may change!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 37ef09f3-ba97-4b5b-9b63-71a0af56c4df
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "The first thing we need to do is to select our fine-tuned Stable Diffusion model. At the top of the WebUI page, we\u2019ll find a drop-down menu with all the available ckpt files. If you don\u2019t see yours in the list, verify that you copied the ckpt file to the correct directory.\n\nFor this tutorial, we\u2019ll focus on explaining the UI\u2019s main three functionalities: text to image, image to image, and inpainting.\n\nText to Image (txt2img)\n\nText to image is the most straightforward way to use our model: write a prompt, set some parameters, and voil\u00e0! The model generates an image that matches the prompt according to the chosen parameters."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 934997ac-006a-4b8a-980a-adb1d3d12e19
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "This might sound easy at first glance. However, we might need to try several parameter combinations before hitting the spot. Based on our experience, these are the steps we recommend following to generate the coolest images:\n\nPick a style from lexica.art and add your subject to its prompt. For instance, let\u2019s see what Fernando would look like with a new haircut: fbernuy. epic haircut. hairstyling photography .\n\n. Use a random seed until you get something similar to what you have in mind. It might not look exactly like the subject, but we can fix that later."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9f1340cf-2bee-43af-920a-8e5f35420daf
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ". Use a random seed until you get something similar to what you have in mind. It might not look exactly like the subject, but we can fix that later.\n\nCopy the seed from the image description and use it to generate the same image with different parameters. The best way to do this is to use the X/Y plot script: select a list of steps ( 10, 15, 20, 30 ) and a list of CFG Scales ( 2.0, 2.5, 3.0, 3.5, 4.0 ). The tool will plot a matrix with one image for each input step and scale combination. We can also use other parameters as the X and Y variables."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f44bc707-6161-4edb-bc83-c127906f0c33
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "script: select a list of steps ( ) and a list of CFG Scales ( ). The tool will plot a matrix with one image for each input step and scale combination. We can also use other parameters as the and variables. Then, pick the one you like the most, copy its corresponding parameter values, and remove the script to generate the selected image alone. If you don\u2019t like any of the images, try with different parameters, a different seed, or a different prompt!\n\nSelected random image\n\nParameters exploration\n\nFinal result\n\nImage to Image (img2img)"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d5da3d39-9bfd-4c42-8ba1-4bf5ae191caf
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Selected random image\n\nParameters exploration\n\nFinal result\n\nImage to Image (img2img)\n\nThe second alternative is to generate a new image based on an existing image and a prompt. The model will modify the entire image, so we can apply new styles or make a small retouch.\n\nLet\u2019s start with a txt2img prompt: very very intricate photorealistic photo of a fbernuy funko pop, detailed studio lighting, award - winning crisp details . Following the strategy explained above, we use txt2img and generate undoubtedly cool looking Funko Pop. However, we\u2019d like to improve the beard to be closer to our subject and lighten the nose color."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c0f512b4-f535-41a3-b7d5-df1eb4685946
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "To do this, we\u2019ll click on the Send to img2img button and manually draw the beard style and nose we want using the MS Paint-like tool of the WebUI (center). We can reduce the denoising strength parameter to have a result as similar as possible to the original and experiment with the rest of the usual parameters until we get the result we are looking for (right).\n\ntxt2img generated image simple image modifications img2img result\n\nFollowing the same img2img strategy, we slightly improved Luna's fur colors in this epic picture and added some smile lines to the anime version of Giuls.\n\ntxt2img generated images\n\nimg2img improved image\n\nInpainting"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f3579e9c-bc5b-4f49-b05d-cab27330e7be
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "txt2img generated images\n\nimg2img improved image\n\nInpainting\n\nThe third alternative allows us to specify a region in the image for our model to fill, maintaining the rest of the image intact (unlike the img2img method, which modifies the entire input image). This can be useful for swapping a face in an existing photo (if the subject is a person) or generating an image of the subject in a different scenario or lighting condition while preserving the background and context. Keep in mind that using this method is a bit more challenging because there are more parameters to explore."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8891ee5a-ac81-413b-b696-34086b8c24ca
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "For example, let\u2019s generate an image of Fernando as Ironman. Since the armor has a lot of important details, we\u2019ll use an original image from the movie poster as the source and swap Ironman\u2019s face using the Inpainting tool.\n\nThe first thing we\u2019ll do is select the Inpainting tool inside the img2img tab. After uploading our reference image, we\u2019ll select the area around the head with the brush tool and input a photo of fbernuy as the prompt since we don\u2019t want the model to fill this region with anything else but Fernando\u2019s face.\n\nBefore generating the image, let\u2019s take a look at the most relevant parameters added in inpaint."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a9302c87-fdb6-4925-a645-1b0a0a461963
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Before generating the image, let\u2019s take a look at the most relevant parameters added in inpaint.\n\nMasked content : defines what to fill the masked region with. We can select original (the default) if the original content is similar to what we want to achieve, experiment with fill to help us keep the surrounding information, or latent noise to use noise. Regardless of the option we pick, random noise will be added based on the Denoising strength parameter."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 938e43fb-5ef4-47e3-a086-6a8c79f6d31f
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": defines what to fill the masked region with. We can select (the default) if the original content is similar to what we want to achieve, experiment with to help us keep the surrounding information, or to use noise. Regardless of the option we pick, random noise will be added based on the parameter. Denoising strength : defines the standard deviation of the random noise added to the masked region. The higher this parameter, the lower the similarity with the content in the unmasked portion of the image."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3aa7d682-d613-4edc-85ac-682b265fb354
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": ": defines the standard deviation of the random noise added to the masked region. The higher this parameter, the lower the similarity with the content in the unmasked portion of the image. Inpaint at full resolution: inpainting resizes the whole image to the specified target resolution by default. With this parameter enabled, only the masked region is resized, and the result is pasted back into the original picture. This helps get better results for small masks as the inpainted region is rendered at a much larger resolution."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ca22931c-3a0d-4818-b826-54eba9729d56
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "For this example, we\u2019ll use original masked content (since the masked region is already a face) with 0.50 denoising strength and enable inpainting at full resolution. Then, we\u2019ll set a random seed -1 and repeat the process we\u2019ve done before: patiently generate images until we get one similar to what we desire. Finally, we\u2019ll fix the seed and use the X/Y plot script to explore different Sampling Steps and CFG Scale combinations.\n\nOriginal image Intermediate inpaint results"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0a1e0c68-4f09-4f6d-9621-40f9e60605a6
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Original image Intermediate inpaint results\n\nPretty awesome, right? At this point, we\u2019ve generated a great image that kept all the details of the original picture but with Fernando\u2019s face instead of Robert Downey Jr.\u2019s. Still, there\u2019s one small detail we want to fix in the beard.\n\nThe best way to fix this is by using inpainting again, but using the already inpainted image instead of the original (didn\u2019t see that one coming, did you?). This way, we can instruct the model to modify the region around the beard exclusively and input a more specific prompt, such as a photo of fbernuy with a beard .\n\nFinal inpaint result with beard details"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b4826176-58e4-4f0a-a74e-4ae94eda8c13
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Final inpaint result with beard details\n\nWe have shown you how to create cool images of you, your friends, your pets, or any particular item you want, either starting from just an idea, a sketch, or an existing image!\n\nNow you are ready to generate cool images on your own! Here are some images we generated from our subjects that can be useful for you to get some inspiration. Have fun!\n\nGiuls in Game of Thrones Luna with a birthday hat Fernando, oil canvas Fernando\u2019s business portrait Luna with sunglasses Luna with pearl earrings\n\nFinal thoughts"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dfa8edd6-0740-4cf1-8914-20c86c957225
encoding: FLOAT32
metadata:
{"title": "The guide to fine-tuning Stable Diffusion with your own images", "link": "https://tryolabs.com/blog/2022/10/25/the-guide-to-fine-tuning-stable-diffusion-with-your-own-images", "language": "en", "description": "Easy guide to generate your own images with Dreambooth. Learn how to fine-tune Stable Diffusion.", "chroma:document": "Final thoughts\n\nStable Diffusion signified one of the biggest leaps toward democratizing large image synthesis models. Techniques such as DreamBooth (and their community-driven implementations) allow us to reap the benefits of these models even further, with imagination being our only limit. We are extremely excited to know where this new democratic AI paradigm will lead us and the various ways in which the world will benefit from it."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 6a9a0785-b5c4-4bd3-ae15-a756bd726754
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Qatar 2022 World Cup is just around the corner and in Tryolabs everybody is excited to have their national team compete. As the teams prepare for the event, they more than ever rely on AI-assisted sports analytics for inspecting their performance based on both recordings of their previous games and real-time information delivered to the coach during the matches.\n\nAI is being used to identify patterns that lead to success and to compute indicators that give coaches objective numbers over which to optimize to maximize their team\u2019s chances of scoring. One such indicator is ball possession."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 73dfb114-6e21-4041-98f6-befc28475ec9
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Leveraging Norfair, our open-source tracking library, we put our video analytics skills to the test and wrote some code to showcase how AI can compute ball possession by team automatically by watching a video of a match. Here is how it looks in a snippet of a match between Chelsea and Manchester City:\n\nWe also made it open source on GitHub. You can inspect every single part of the code, and use it as a base to build something else!\n\nIn this post, we are going to dig a bit deeper into what exactly ball possession is, explain how this system was built from simpler components and how these work.\n\nDefining ball possession"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 563675f0-44ae-40ad-9aeb-447682813481
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Defining ball possession\n\nBall possession is one of the most important statistics in a soccer game. According to a 2020 study conducted over 625 UEFA Champions League matches, teams with more ball possession won 49.2%, drew 22.0%, and lost 28.7% of the matches overall, exceeding the winning rates of their rivals. This effect was even greater when the gap of ball possession percentage between two teams in a match was higher.\n\nThere is definitely something in this number. The team with a higher possession is more likely controlling the match."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 2e7f4f94-a631-4ea3-8cc7-20f8a8e9e00b
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "There is definitely something in this number. The team with a higher possession is more likely controlling the match.\n\nSeason Matches Won Draw Lost 2014/2015 124 65 (52.4%) 28 (22.6%) 31 (25.0%) 2015/2016 117 53 (45.3%) 21 (17.9%) 43 (36.8%) 2016/2017 119 58 (48.7%) 32 (26.9%) 29 (24.4%) 2017/2018 120 59 (49.2%) 25 (20.8%) 36 (30.0%) 2018/2019 119 60 (50.4%) 26 (21.8%) 33 (27.7%) Total 599 295 (49.2%) 132 (22.0%) 172 (28.7%)\n\nFrom \"Relationship between ball possession and match outcome in UEFA Champions League\u201d, 2020.\n\nWe now know how important ball possession is to soccer analytics. But what exactly is it? How is it computed? There are actually two methods that yield different results."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 426ac178-1648-47ef-a9d8-46ba919d0727
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Method 1: based on calculating passes\n\nThe first method is to consider ball possession in relation to the number of passes. The possession metric would be the number of passes on each team during the match, divided by the total number of passes in the game.\n\nWhile straightforward to compute if counting passes manually (with a clicker), this method has a big drawback: it doesn\u2019t account for the total time that players have control of the ball.\n\nMethod 2: based on time"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 570b44ba-4f66-4358-ad42-433f2dec4932
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Method 2: based on time\n\nAnother method that is widely used consists of controlling a clock manually for each team. A person has to be in charge of starting a timer when a team gets a hold of the ball and stopping it when they lose it. The timers also need to be paused when the game is stopped. While accurate, this approach needs the scorekeeper to be very focused for the duration of the game. It\u2019s also susceptible to human errors. Forgetting to turn on or off the clock can mess up the metrics (and you don\u2019t want that!).\n\nUsing AI to compute ball possession\n\nDo we really need to burden someone with this task in this day and age?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 46ef687f-fb69-4c82-a45c-2898cd496921
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Using AI to compute ball possession\n\nDo we really need to burden someone with this task in this day and age?\n\nTurns out that with deep learning and computer vision techniques it should be very feasible to automate this. For the remainder of this post, we will understand ball possession as the % of the time that each team has the ball (method 2).\n\nIn a nutshell, we will build a clock powered by AI instead of a human.\n\nDivide & conquer: the steps\n\nLet\u2019s start by breaking down the problem. We are going to need to:\n\nGet a few videos to test. Detect important objects. Detect the players .\n\n. Detect the ball. Identify each player\u2019s team. Determine which player has the ball at all times."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 097b08b1-acca-4d60-ae17-181645b5aacc
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": ". Detect the ball. Identify each player\u2019s team. Determine which player has the ball at all times.\n\nThere are also some \u201cnice to haves\u201d:\n\nDrawing the trailing path of the ball during the match (for better visual inspection, remember we are doing sports analytics here!). Detecting and drawing passes completed by each team.\n\nNow that we know what we need to do, let\u2019s see how we can develop each step.\n\nStep 1: Getting a few videos to test"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4cc160c2-a16b-4373-8384-a1302409369c
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Now that we know what we need to do, let\u2019s see how we can develop each step.\n\nStep 1: Getting a few videos to test\n\nThere is no better way to test our algorithm than on live soccer footage videos. However, we can\u2019t just use any live soccer footage video, we have to be sure that the video does not change between different cameras. Fortunately, this can be easily accomplished by trimming a live soccer match from Youtube.\n\nWe searched for a few matches with different teams to test our project in different situations. We are going to test our project in the following matches:\n\nStep 2: Detecting objects"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e800ad42-9f90-4719-b945-0eccdc1d4d8a
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Step 2: Detecting objects\n\nWhat is a soccer match without players and a ball? Just a referee running from one side of the field to the other \ud83e\udd41.\n\nIt\u2019s crucial to know the location of the players and the ball before ever thinking about calculating the ball possession. To do this, we need two deep learning models: one for detecting the players and another for detecting the ball.\n\nDetecting players"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e5c96541-3254-4416-bcbe-20fb07fc4245
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Detecting players\n\nWhat would have been a challenging problem a decade ago is nothing but a few lines of code in 2022. There are multiple pre-trained models we can use to detect people. In this case, we will use YOLOv5 trained in the COCO dataset. This will get us bounding boxes around each player, and confidence scores. Here are the results:\n\nDetecting players using YOLOv5.\n\nDetecting the ball\n\nThe COCO dataset has a specific label for sports balls, but the results we got using a model trained using it were not good enough for this type of live soccer footage so we had to come up with a different approach."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4205d75b-9419-4fa7-9c22-ea2a1a780ab0
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "In order to improve the results for our specific task, we finetuned the YOLOv5 detector trained in COCO with a specific dataset of balls containing only footage from live soccer matches.\n\nBall detection using YOLOv5 and a custom-built dataset.\n\nThe dataset was created with footage of soccer videos with a similar camera view, and the labeling was made with an open-source labeling tool named LabelImg. The finetuning process was made following the instructions of the official YOLOv5 repository."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 63ccea71-3e82-4686-a056-f24cd18b7f02
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Please note that this is by no means a fully robust ball detection model, the development of which is outside the scope of this blog post. Our resulting model mostly works on the videos we used for these demos. If you want to run it on other videos, the model will need more finetuning over labeled data.\n\nPutting things together\n\nGreat! We now have two models that we can use as if it was only one model by adding both of the detections. The result is a perfect model for soccer video analytics.\n\nDetection of players and ball.\n\nStep 3: Identifying player\u2019s teams"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 44551b21-f690-4a15-a93d-049fc2a1d039
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Detection of players and ball.\n\nStep 3: Identifying player\u2019s teams\n\nHow can we know which team has the ball if we don\u2019t know the team of each player? We need to have a stage that takes the players\u2019 detection as inputs and outputs the detections with their respective classifications.\n\nHere, there are several approaches we could follow, each one with its pros and cons. In this section, we will restrict ourselves to two simple ones and leave out more complex techniques such as clustering, siamese networks, or contrastive learning (we encourage you to try these, though!).\n\nApproach 1: Neural network based on jersey"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3c5ae772-1264-4fdc-b8fa-f66d82116f82
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Approach 1: Neural network based on jersey\n\nOne approach is to train a neural network for image classification based on the team's jersey. The dataset can be generated by running a video with a player detection model and saving the crops of the detections as a dataset for training. The labeling can be easily done from a Jupyter Notebook with a tool like pigeonXT."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3f78b4e8-7c9b-4d27-8c5e-0d38f9491421
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "A neural network could be a good approach when there are complex scenarios to classify. For example, to distinguish between jerseys with similar colors. Or when there are occlusions of players. However, this advantage comes with a cost. This approach requires you to create a dataset and train the model for every match that you want to analyze. This can be daunting if you would want to be able to analyze the ball possession in many different soccer matches.\n\nApproach 2: Color filtering with HSV\n\nAs in most sports, different teams are expected to use easily distinguishable jerseys for a match, so what if we can leverage that information using some classical computer vision?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f525d594-d56a-416d-99de-da79e99bfc0c
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Let's take an example of a match between Chelsea and Manchester City. Here we have four distinctive colors:\n\nClassification Jersey Color Chelsea player Blue Manchester City player Sky Blue Chelsea Goalkeeper Green Referee Black\n\nNote that there is no color for the Manchester City Goalkeeper. This is because his jersey is black, and would therefore have the same color as the referee's. We didn't claim this approach could cover every single case :)\n\nFor each color, we created an HSV filter that will tell us how many pixels of that color the image has."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: becb81c0-8351-45d3-bf36-55ba6c6fc33d
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "For each color, we created an HSV filter that will tell us how many pixels of that color the image has.\n\nThe reason we chose to filter with HSV values instead of RGB is that HSV filtering is more robust to lighting changes. By adjusting only the hue value, you are choosing what type of color you want to keep (blue, red, yellow, etc), independent of how dark or light the color is."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4dcb7c98-217d-4c1d-b384-9788f43da2d8
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Before filtering the colors, the player image is cropped in order to keep just the jersey. The crop is a specific percentage of the image. This helps to reduce unnecessary information for the classification algorithm. For example, in this image taken from a bounding box, the cropped image removes most of the pixels of the unwanted player, but still keeps most of the information of the desired one. Cropping to the player\u2019s jersey.\n\nFor each color range, we created a filter that keeps the pixels in the color range and sets the rest to black."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e88a452e-9457-48b7-b255-3d2a25bff615
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "For each color range, we created a filter that keeps the pixels in the color range and sets the rest to black.\n\nThe cropped image is then fed to the 4 color filters specified before. The output of the 4 filters is then passed through a median blur filter that will be in charge of removing unwanted noise.\n\nFor each output, we count the number of pixels that passed through the filter (i.e. the non-black ones). The filter with the highest count will give us the team that represents the player!\n\nThe following animations show the described process:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b9b3c4f5-51ca-4b11-952d-a4f37acc0254
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "The following animations show the described process:\n\nHSV Classifier classifying a Manchester City player. HSV Classifier classifying a Chelsea player. HSV Classifier classifying the Chelsea Goalkeeper.\n\nIf a team has more than one color, the sum of the non-black pixels of all the corresponding colors will be taken into account for the comparison.\n\nFor more details on how the classifier is implemented, please take a look at this file.\n\nImproving classification with inertia"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 85159067-657a-4646-bb2d-11ec24807184
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "For more details on how the classifier is implemented, please take a look at this file.\n\nImproving classification with inertia\n\nOur HSV classifier works well\u2026 most of the time. Occlusions and imprecisions of the bounding boxes sometimes make the predictions unstable. In order to stabilize them, we need tracking. By introducing Norfair, we can link players\u2019 bounding boxes from one frame to the next, allowing us to look not just at the current team prediction but past ones for the same player.\n\nLet\u2019s see Norfair in action:\n\nTracking players in a soccer match using Norfair."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 61a74ebc-1e2e-4927-b859-6535686c657d
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Let\u2019s see Norfair in action:\n\nTracking players in a soccer match using Norfair.\n\nIt\u2019s common sense that a player shouldn't be able to change teams across the video. We can use this fact to our advantage. Therefore, the principle of inertia for classification states that a player's classification shouldn't be based only on the current frame but on the history of the n n n previous classifications of the same object."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7c70d398-41fa-472c-8319-1766dc169ad3
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "For example, if the classifier has set inertia equal to 10 10 10, the player classification on frame i i i will be decided by the mode of classification results from frames i \u2212 10 i-10 i\u221210 to i i i. This ensures that a subtle change in the classification due to noise or occlusion will not necessarily change the player\u2019s team.\n\nIdeally, infinite inertia would be great. However, the tracker can mix some ids of the players. In this case, if inertia is too large, it can take too much time for the classifier to start predicting the correct team of the player. An ideal value of inertia is not too big or small.\n\nHere are examples comparing the HSV classifier with and without inertia:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b1247c8e-316d-47c6-8539-9891421cab9b
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Here are examples comparing the HSV classifier with and without inertia:\n\nHSV classifier without inertia. HSV classifier with inertia 20 on a 25 FPS video.\n\nStep 4: Determining the player with the ball\n\nThis is the final piece to our computation of ball possession. We need to decide who has the ball at all times.\n\nA simple method works by determining the distance from all the players to the ball. The closest player will be the one who has the ball. This is not infallible of course but mostly works fine."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d21577a8-2644-467d-86e0-7d4906e51163
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "For our demo, we defined the distance as the distance from the closest foot of the player to the center of the ball. For simplicity, we will consider the bottom left corner of the bounding box as the left foot of the player, and the bottom right corner of the bounding box as the right foot.\n\nDistance from the right foot to the center of the ball. Distance from the left foot to the center of the ball.\n\nOnce we know who the closest player to the ball is, we have to define a threshold to know if the player is near enough to the ball to be considered in possession of it."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3b28ce5a-214e-45b6-bfd2-07517a3e2590
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "No player with the ball, the closest player is too far from the ball. A player has the ball, the closest player is near the ball.\n\nFrom models and heuristics to possession\n\nWe now have everything that we needed in order to calculate the ball possession metrics. However, determining which team is in possession of the ball is not as simple as stating that it's the team of the player that has the ball in each frame. As with our team classification process, the algorithm for ball possession should also have some inertia."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1133cf86-ef54-4614-a93e-e6c0f8a0f69c
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "In this case and given a team with the ball, inertia states how many consecutive frames the players from the other team should have the ball for us to consider that the possession changed. It\u2019s very important to consider consecutive frames. If there is an interruption, the inertia restarts.\n\nWithout inertia, the possession will change unnecessarily in events such as a rebound, or when the ball passes near a player that didn't have the ball.\n\nNo inertia: ball possession mistakenly changes during a rebound. Inertia: ball possession doesn\u2019t change during the rebound.\n\nMaking our demo pretty"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d313322d-8a55-4e7d-b6ac-a469c4888449
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "No inertia: ball possession mistakenly changes during a rebound. Inertia: ball possession doesn\u2019t change during the rebound.\n\nMaking our demo pretty\n\nThanks to the new release of Norfair, we can understand how the camera moves in a specific video. This information allowed us to draw the path of the ball in the exact location of the field even when the camera moved from one side of the field to the other.\n\nWe also developed an easy-customizable scoreboard that can be used with every possible team to keep track of the metrics in a fashionable manner.\n\nOur final result with every step together and our custom design looks like this:\n\nFinal result with the Tryolabs AI possession scoreboard."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 636716f8-2d67-4c5f-9e90-fff6bdd1b8e5
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Our final result with every step together and our custom design looks like this:\n\nFinal result with the Tryolabs AI possession scoreboard.\n\nFreebie: detecting passes!\n\nOur approach so far can also give us more useful information to analyze a soccer match.\n\nWe can define a passing event as when the ball changes from one player to another one from the same team. As we have seen before, we have everything in place for this. Let\u2019s draw the passes and see how it looks!\n\nAI automatically marks passes in a soccer match.\n\nTrying it on different matches\n\nHere we have results over other video snippets:\n\nReal Madrid vs Barcelona. 2018 FIFA World Cup Final \u2014 France vs Croatia.\n\nShow me the code!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ad38245e-3df9-4203-abb8-007781aae04f
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Here we have results over other video snippets:\n\nReal Madrid vs Barcelona. 2018 FIFA World Cup Final \u2014 France vs Croatia.\n\nShow me the code!\n\nThe entire repository is available on GitHub.\n\nApart from the computation of possession, we also include code for drawing the passes of each team with arrows.\n\nCaveats\n\nIt\u2019s important to keep in mind that this project is only a demo with the purpose of showing what can be done with AI and video analytics in a short amount of time. It does not attempt to be a robust system and cannot be used on real matches. Much work remains to be done for that!\n\nSome weak points of the current system:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a23c1c90-7958-4c87-91d3-4a5a3b787c06
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "The ball detection model that we used is not robust. This can be easily improved by fine-tuning an object detection model on a better dataset. The player detection model might not work very well when many players are near each other, especially when there is a significant occlusion. The team jersey detection method can be improved. Our system breaks if the camera vantage point changes. Most live TV footage usually takes close-ups of players with different cameras. Our system doesn't detect special events in the match such as corners, free kicks, and injuries. In these events, the ball possession will still be calculated and there will be a difference between the calculation of the real ball"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 480f0303-434f-459e-b8ec-c658ffd77198
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "and injuries. In these events, the ball possession will still be calculated and there will be a difference between the calculation of the real ball possession and the one calculated with our algorithm. In order to perfect our system, we would need to detect these events and stop the clock accordingly."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 17bc87ac-ebfd-423e-8d20-359d7b904246
encoding: FLOAT32
metadata:
{"title": "Automatically measuring soccer ball possession with AI and video analytics", "link": "https://tryolabs.com/blog/2022/10/17/measuring-soccer-ball-possession-ai-video-analytics", "language": "en", "description": "In this blog post, we go over a practical example of AI-based video analytics to compute soccer ball possession metrics automatically from a video feed. We explain how the solution is built from the ground, and release the source code in GitHub.", "chroma:document": "Conclusion\n\nVideo analytics is a lot of fun, but it\u2019s no magic. With this blog post, we tried to shed some light on how some of these solutions are implemented behind the scenes and release the code for everyone to play with. We hope that you found it useful!\n\nAgain, by no means is this a perfect system. Professional development of these tools for sports analytics will likely need to use several high-precision cameras, larger custom datasets, and possibly recognizing the 3D position of the objects for improved accuracy.\n\nWhen faced with the development of a large system, we might feel daunted. We must remember that every complex system starts from simple components."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: db86f4f4-5a42-4a45-ac3d-513d0ad805ef
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "This is the third entry in our Road to Machine Learning series; if you read the first and second entries and did your homework, congratulations! The force is growing on you! By now, you should feel familiar with the basics of a Machine Learning project: Clean, Train, Measure/Visualize, and Repeat. If that is the case, you might be looking for something more challenging, something to impress your friends, wow your partner, or showcase in your LinkedIn profile."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e0ff0a9e-451c-429e-a016-e44f30898832
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "If all these resonate with you, look no further. In this episode, we dive into one of the most popular Computer Vision types of problems that we encounter in our projects: object detection and tracking. We will follow a hands-on exercise and use modern tools from beginning to end. We will not delve into the details of deep learning, but we encourage you to do so! You may want to check these resources before starting the exercise to grasp the concepts we will use and make the most out of this post."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0ee6303d-2bac-4324-8536-cad748fb301c
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Course #1 Arguably, the most popular and complete online course that many of our engineers have followed is Stanford's CS231n. The notes and assignments 1, 2, and 3 are available online. Lectures from past editions are on YouTube.\n\nCourse #2 Once again, Andrew Ng provides an excellent specialization for free and even gives you a certificate of completion.\n\nWe will also offer some related technical posts of similar work we have done to give you a better idea of what is possible with these technologies.\n\nMaskCam In MaskCam, we partnered with NVIDIA and BDTI to build a mask detector that runs on a Jetson Nano."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 937c8960-e447-4469-85d7-285624d9a4f3
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "MaskCam In MaskCam, we partnered with NVIDIA and BDTI to build a mask detector that runs on a Jetson Nano.\n\nSeeed We partnered with Seeed to detect if employees were using safety gear, such as helmets, on construction sites.\n\nNorfair We even developed our own open-source library for object tracking Norfair (which just celebrated it's second birthday with a new release \ud83c\udf82!)\n\nDuring this exercise, we will work with images and videos of one of the most adorable animals on earth: cows. They are second only to the internet overlords: cats and dogs. Beware, puns are going through the hoof for this blog post. Let's see cow we do!\n\nHay there, my friend!\n\nIntroducing our Detection Box"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4c4d1474-070d-4313-ae32-28537e25e68b
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Hay there, my friend!\n\nIntroducing our Detection Box\n\nFor the sake of flow, we will take a top-down approach in which we ignore most of the technical details first and go back to them towards the end.\n\nAt a very general level, every Machine Learning project requires a model and a dataset. A Machine Learning model that performs object detection receives an image or video (you can think of videos as a sequence of images) as input and returns bounding boxes with all the objects identified. We will see an example of this shortly."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3a5dbbef-37c4-44bb-9a27-f2b1695c793f
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "The architectures behind most object detection models are not complicated. However, they are not simple either. They involve using deep neural networks with several layers and loss functions.\n\nFor now, let\u2019s treat the model as a Cowffee Machine \ud83d\ude09 (If you didn\u2019t get that reference, go and read our previous blog post in the series.) Since all good things have a name, let\u2019s call it DetectionBox.\n\nAn overview of our DetectionBox"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8fdb3f36-5ed3-4af6-a74c-b2a2d7819334
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "An overview of our DetectionBox\n\nTo train a DetectionBox, we need ground truth, which consists of a set of images and their annotations in this context. An annotation is a collection of all the information we need to identify the information in the image. For classification, it is a single label. Yet, for object detection, it consists of a list of bounding boxes and a label for each box."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9d050858-cf04-4465-ab3f-5a60848739f9
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Training a detection object model from scratch is hard because it requires considerable data. But the vast majority of the time, we don\u2019t train object detection models from scratch. Instead, we use a technique called transfer learning. In a nutshell, with transfer learning, we start from \u201cpre-trained\u201d DetectionBoxes that were trained once with a large dataset such as CoCo. In practice, it is even more involved than that. The pre-trained model is often pre-pre-trained with a pure image detection dataset such as ImageNet. We know, we know, that\u2019s why we saved the details for last."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cbc574c6-b5d3-4b01-984e-a7518202476f
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "A DetectionBox only predicts items for the classes it has seen during training. If there are no unicorns in your dataset, even when presented with a unicorn, the model will not be able to find it. Fortunately, when we use transfer learning, we can alter the number of objects the model can predict.\n\nDrawing the cowrtain\n\nWe said this blog post was a hands-on exercise, so without further ado, the exercise. But don't get too excited yet! We know the feeling of getting familiar with new technology and the urge to try it right away and see how it goes. During the post, we will break down every step in this exercise and analyze what is happening."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: aa840a47-ac9d-4f1f-a54d-f40e8b4d693b
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "But first, let's introduce our dataset cowtestants. We will use them as our testing dataset.\n\nChilling and getting acowinted Can you spot the little one in the back? \ud83d\ude42\n\nGetting started\n\nThe beginning of every notebook looks very similar, install stuff, import what you installed, and define some helper functions. Let's break it down.\n\nThe first two cells are for installing stuff we will need: pyyaml for reading YAML files, hub for downloading the annotated dataset, norfair to do object tracking, cowsay for the memes, jupyter_bbox_widget to draw bounding boxes on images, torchmetrics to make our lives easier when it comes to using metrics, and detectron2 for the trained models."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 48cfa453-0f95-4eaf-94f1-d15c2f032778
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "The next cell, which we are omitting here for the sake of readability, contains a bunch of imports that we will use throughout the exercise.\n\nGetting the hooves dirty\n\nNow that we have finished with our configuration let's dive into the most exciting parts of the exercise. You will now see a cell where we define our DetectorBox class which, once again we omit for the sake of readability. Don't worry too much about this yet. The only thing you need to know to follow the post is that the class has three methods: predict, train, and evaluate.\n\nWhat you will see next are the following cells:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 838e4c31-13ab-4a4c-823b-45e94bef78de
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "What you will see next are the following cells:\n\nWhat just happened here? We instantiated our DetectorBox , downloaded the images from the internet, loaded the images using the pillow library (a classic library for image manipulation in Python), and fed the images to our model.\n\nWe can now turn our attention to the model's output and see what we got for the first image\u2026 and it\u2019s a dictionary \ud83e\udd14!\n\nHow do we interpret this? First, we see that we have four pred_classes , which means that our algorithm identified four \"things.\u201d But what are these? Those numbers: 16, 0, 16, and 0 indicate the class of each thing."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a90dc552-0d30-413b-8247-e3e971ab0cb6
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "We need to take a step back here and explain something. Our DetectionBox was trained on a dataset with 91 classes: from cows to dogs and cars. That model only predicts things within those classes, and 16 and 0 are two of them.\n\nLet's keep on moving. The pred_boxes field indicates where those \u201cthings\u201d are located. Each row is a set of coordinates: x_min, y_min, x_max, y_max , and those coordinates are in pixels! Finally, the score represents the model's confidence when predicting the class."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e1feb96c-bbe7-4c57-81b2-189c050c787d
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Now, in this format, it is cumbersome to understand if those predictions are okay. It would be much easier to see it \ud83d\udc40. Luckily we already instructed Python to print these images with our visualize=True parameter:\n\nNow we have the boxes drawn on top of the image with the corresponding class and score. Can you spot the problem? Turns out that 0 = person and 16 = dog. Hence, the algorithm didn't identify a single cow in the image on the left. And although we get some cows in the second image, those are not great either. Some dogs and some cows are not correctly \"boxed.\u201d\n\nImproving our model"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4078cf40-68e2-4559-ab6b-ce544e475381
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Improving our model\n\nTo improve our model, we need to do two things. On the one hand, we need to improve our model performance. On the other hand, we need to find a way to automatically \u201cscore\u201d the predictions since inspecting thousands of images manually does not scale very well. To do this properly, we first need to annotate some images and then measure the results. Let's start with the former.\n\nAnnotating images"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 793fc0be-06e5-42dd-b222-f09df8f14828
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Annotating images\n\nTo automatically assign a value to our prediction, we need to provide ground truths for each image. We will do that by \u201cdrawing\u201d bounding boxes on top of them. This is a manual process because, unlike other types of data, it is almost impossible to start with data already annotated in the required format. (Who would draw bounding boxes for fun?)\n\nNowadays, several companies and software can be used to improve the annotation process. However, since we are learning, there is nothing like doing something yourself.\n\nIn a Jupyter Notebook, we can use a widget to draw as follows:\n\nand get the coordinates:\n\nAfter drawing the boxes, they should look something like this:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ad85743c-89d7-45ac-9230-f92769fb90f8
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Drawing bounding boxes is not as straightforward as it might first sound. Let\u2019s look at this example in particular. For the first image, we decided to draw the whole cow even though a person obstructed the view. In the second image, we selected only the face of the cow that appears behind all the others. This might cause problems because the algorithm learns that a cow is a cow head, a cow split into two, and a whole cow. We could decide only to annotate full cows, but we would miss a lot of the partially occluded ones. Also, we could tag heads only, but we would not know where the bodies are. There are no apparent answers to these questions. In our experience, the best way forward is to"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 51bd9186-1f97-478e-bd24-3f1eb10bf963
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "only, but we would not know where the bodies are. There are no apparent answers to these questions. In our experience, the best way forward is to treat this as an iterative process: annotate some, manually inspect for errors, and attempt to understand if some of those are systematic. If they are, you can update the labels."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9c4f5381-9691-4c51-8581-29df015458d8
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Scoring our predictions with metrics\n\nThe next question we want to tackle is how to formalize the process of checking if the model output is correct or not. Ideally, we could have a metric that summarizes how good the predicted bounding boxes are compared to the actual bounding boxes. The most popular metric in object detection problems is the Mean Average Precision (mAP)."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0c47157f-389a-4bb0-991c-ae4893cf319e
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "For this blog post, we will assume that given a set of ground truth images and the predicted bounding boxes, we can obtain the mAP: a single score of how well the model performs in the given dataset. This score gives us a number between zero and one where zero is really bad, and one is perfection. We encourage you to learn more about this metric in this video.\n\nmAP further reading If you are eally curious about how this metric works, you can find a more in-depth explanation of this process in this blogpost and in this one.\n\nIf you want to know how we implemented this for this exercise, check out the method evaluation of our DetectorBox."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d71a574f-5796-4565-a123-0724b418550a
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "If you want to know how we implemented this for this exercise, check out the method evaluation of our DetectorBox.\n\nIf we apply this metric to our current dataset of two images, we get a score of 0.1290, which is fairly low. Now that we have an objective metric of our model's performance, let\u2019s see how we can improve this score.\n\nTransfer-learning & fine-tuning"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d37ec176-b986-405a-8c98-0b760a421e14
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Transfer-learning & fine-tuning\n\nOne of the advantages of neural networks is that we can stop and resume training them at any point: even with different data. If you were using XGBoost, changing your dataset or updating it with new information is not easy and might require access to the original dataset and the new one. That\u2019s not the case with neural networks. Simply get the new data and perform a few iterations. The weights (the parameters) evolve from the last \u201ccheck point.\u201d"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a7d64d39-ee75-446f-bec5-32eec9f6e87f
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "This seemingly minor detail is actually crucial. We can use large public datasets to teach a model to recognize general patterns such as faces, objects, and more. Then, use a smaller dataset to teach it how to connect the information extracted about faces and objects in the context of the smaller dataset. This process is often called transfer learning or fine-tuning. This is the backbone of many Machine Learning projects, especially Computer Vision ones.\n\nInteresting reads: Pytorch's official fine-tuning guide for vision models."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8579be72-dc9c-46e9-a27e-e36c508c7cf5
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Interesting reads: Pytorch's official fine-tuning guide for vision models.\n\nThe larger model using public data is often trained by large corporations such as Google and Facebook, which later release the weights of the model so that anyone can use it (although they don\u2019t always release them). A great example of this was the Stable Diffusion model recently released by Stability.ai."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b297004f-a885-434f-b770-b6eaa719f279
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "What does this mean for our exercise? It means that we can gather a \u201csmall\u201d collection of annotated cow images and run a few iterations on top of our DetectionBox, which was already predicting cows, although not very well. DetectionBox has been pre-trained using ImageNet and CoCo, two popular and very large public datasets. We will simply download those weights, which should perform decently well, and fine-tune them to detect cows accurately. In principle, we could fine-tune a model even if it didn\u2019t initially use cows. It just happens that our starting model does."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 51d309b1-6419-4e32-84f8-a75184702756
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "We are still left with the question of finding a medium-sized collection of annotated cow images. Where will we find one? In a new project, this is the point where we generate a new dataset (the hard part). Luckily, since cows are part of CoCo, we can simply select the subset of the CoCo dataset that has those images. Let's use hub for that, and while we are at it, visualize some of the images."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e0e5d7f7-8471-4f3d-b7ec-f02cc97db9ad
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "When we fine-tune a model, we can change some of its structure. In particular, we will revise the number of classes predicted. Instead of 91 possible options, we will restrict it to only cows and differentiate cows from the background. To change this, we will modify the heads of the model but not the core of the network, where all the object detection information is stored. The core of the network will change as part of the new training process.\n\nLet\u2019s go ahead and run some iterations:\n\nAfter running a few iterations (1000) of our model, we can re-check our test images and see how we are doing."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: bcd57b4d-8be1-47f9-ad6a-9eb864846c1a
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "After running a few iterations (1000) of our model, we can re-check our test images and see how we are doing.\n\nIt looks better, but does it? We can check! Let's verify that the metric improved. The new mAP = 0.2316. This is almost double our previous value. Cowincidence? We don't think so!\n\nCow-tracking\n\nSo far, we have detected individual cows within an image. That's cool, but we can do better. What if we track individual cows as they move in a video?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4b433a5e-d328-4f2c-b9f1-41fefb49a413
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "The main idea behind object tracking is to do object detection frame by frame (remember that videos are a sequence of images) and then map objects in one frame to the next. One way is to calculate the object's trajectory and predict where it should be in the next frame. Although this sounds simple, it involves some complex mathematical concepts. But don't despair. To ease developers\u2019 lives, Tryolabs launched an open-source tool called Norfair that handles all these complexities. And it only takes a few lines of code to get it working!\n\nTake time to read the code in the following cell and unravel what it does:\n\nLet's see how Norfair works on a happy cows video:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 426ed900-797f-48eb-8777-8869c0fb1839
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Take time to read the code in the following cell and unravel what it does:\n\nLet's see how Norfair works on a happy cows video:\n\nThat looks ok. But, some of the cows get different numbers throughout the video, which means that the tracker cannot correctly recognize them as the same cow. Let's try to do it with the fine-tuned version.\n\nCan you notice that the marker changes when the cows change direction abruptly? That is related to how the tracking algorithm works! Understanding why the problem occurs will help us find a solution in the next iteration. Remember, training a machine learning model is always an iterative process.\n\nDelving deeper into DetectionBox"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f29592a0-7203-44e6-9894-afe8f4920962
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "By now, you might be wondering: how does the DetectionBox work? And you are right. We have actively ignored that subject so far. We did that because we genuinely believe that the methodological approach to object detection is independent of the model used. We will likely update our default models in a few days, weeks, and months because ML moves fast. Two prominent families of models are used for object detection: YOLOs and RCNNs. In this mini-project, we decided to use Faster-RCNN pre-trained on a ResNet-50 using the CoCo dataset. Do you wanna see a full layer-by-layer explanation of how this deep neural network works? Lucky you asked because we have written a blog post entirely dedicated"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d84dd798-cdf7-4f3a-a053-9c13587a76e9
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "see a full layer-by-layer explanation of how this deep neural network works? Lucky you asked because we have written a blog post entirely dedicated to answering that question. You should check it out."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 579052d5-f001-4034-8233-5a6da1e246b8
encoding: FLOAT32
metadata:
{"title": "Object detection & tracking step by step guide: a hands-on exercise", "link": "https://tryolabs.com/blog/2022/10/13/object-detection-and-tracking-step-by-step-guide", "language": "en", "description": "Expand your Machine Learning career with our object detection and tracking guide. A hands-on tutorial to complete our baseline Machine Learning knowledge.", "chroma:document": "Wrapping up\n\nWe are approaching the end of this four posts series, which we have enjoyed immensely. What we put in these posts is just the tip of the iceberg. Plenty of other sub-fields, techniques, and resources exist in this vast world of machine learning. We genuinely hope these posts kickstarted your career or interests in machine learning. As we said in our first blog post of the series, we are fans of \u201clearning by doing. \u201d We encourage you to use the tools you just acquired to go and find new challenges and keep learning.\n\nFinally, remember to inspect some of your predictions manually every time. Otherwise, you will end up with mutant cows."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9b8adb87-b9e8-47b0-9279-d8050daccc51
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "In the previous episode of our Road to Data Science series, we went through all the general skills needed to become a proficient data scientist. In this post, we start to dig deeper into the specifics of Machine Learning. We start by posing the simple questions: What is Machine Learning? What kind of problems can Machine Learning solve?\n\nWhat is Machine Learning?\n\nA great way to start understanding the idea behind Machine Learning is to think about what\u2019s new in Machine Learning compared to traditional programming."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 565c8593-7ac6-40e3-8804-341baf271b08
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "So, essentially in traditional programming, we build a machine that outputs a result based on an input and a set of rules. Our job as programmers is to construct the correct set of rules for our system to output the desired result. Thanks to the computer\u2019s ability to follow complex instructions incredibly fast, this approach works very well for a vast set of tasks, from calculating taxes to landing a rocket on the moon."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 30e3e6c0-b888-405a-9f95-b853d0568120
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "So, why do we need Machine Learning? Well, machines are great at solving problems that look difficult or tedious to us. For example, imagine computing all the prime numbers up to 10,000,000. On the other hand, another set of problems, including some that seem trivial to us, are very hard to decompose into a set of deterministic rules.\n\nTake, for example, the problem of observing a picture and determining if there\u2019s a cat in it. The problem is trivial for any human, but not for a computer, especially considering all the variations between breeds and all the variations in angle, lighting, positioning, and occlusion. What can we do?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 942f0028-fed2-4400-8a85-d2e920e9eea5
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Machine Learning to the rescue! Instead of building an explicit set of rules, Machine Learning systems learn the patterns that go from the input to the output based on observing a massive amount of data. This approach can solve many tasks, from identifying cats in pictures to modeling the consumer purchase decision.\n\nThe details of how our Machine Learning system learns these patterns depend on the specific algorithm we are using. These algorithms come in many shapes and flavors. There are whole families of them, but we can generally group them based on a couple of criteria."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3f7c0126-b088-430c-ad9f-23c7750c184b
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "If we look at how information is fed to the model, we can broadly classify Machine Learning techniques as supervised, unsupervised, or reinforcement. When labels are fed to the algorithm during training, the method is supervised. When no label is fed, the method is unsupervised. And when the system is allowed to make decisions and gets feedback on them, the method is Reinforcement Learning.\n\nOn the other hand, if we look at the kind of task they perform, Machine Learning techniques can be classified into several groups such as regression, clustering, single or multi-class classification, and so on."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a672a9b5-140c-4590-b5d2-631a8e0af505
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Extra readings Check this post to learn more about what kind of tasks can be solved using Machine Learning.\n\nMicrosoft has a very comprehensive and extensive set of courses for beginners, one called ML for beginners and the other one called Data Science for beginners, be sure to check them out!\n\nA Shopping List to Machine Learning\n\nIf you had asked us 15 years ago what skills you needed to apply Machine Learning, our list would have included an endless list of mathematical, computer science, and statistical knowledge that could have discouraged even the most audacious."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b0908945-e139-4fe8-98fb-1f8228cae3e5
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Today, thanks to the cumulative contributions of many in the Machine Learning community, the field has become much more approachable. Anyone who wants to do Machine Learning today stands on the shoulders of giants.\n\nIn fact, you might have heard that doing Machine Learning these days is as simple as writing a few lines of code. Well, the rumors are true, but that's only a fraction. Let's see that for ourselves.\n\nSay you were walking the countryside when suddenly you felt the unrelenting urge to differentiate the subspecies of a particular type of plant: the iris.\n\nIris flower subspecies a to the left and subspecies b to the right. Images extrated from Unsplash"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e6dc6b34-bf72-4d24-8ce4-09afb426d64c
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Iris flower subspecies a to the left and subspecies b to the right. Images extrated from Unsplash\n\nYou could take a picture of every iris flower you encounter and send it to your taxonomist friend or try to learn the pattern that goes from the dimensions of the flowers to their species. In Python, this looks like this:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 499efff8-a7d4-4c61-b7e0-23808443c364
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Boom! Problem solved with 96.7% accuracy in unseen data! Next time you see an iris, you can measure its flower and ask your model to predict the plant\u2019s species. Now, you might be looking at this unfamiliar code and wonder: Is it possible to learn this power? Or, if you\u2019ve been following along our blogposts and are already familiar with Python, you might wonder: What if I want to do something slightly more complex? What tools do I need? Where do I find the resources? Don\u2019t worry; we\u2019ve got you covered. We\u2019ll walk you through the Machine Learning pipeline step by step, referring you in each step to all the relevant material you need.\n\n1. Get Raw Data"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3953c969-12bf-4de8-aef6-061d1b7fe72e
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "1. Get Raw Data\n\nUnless you\u2019ve been living under a rock during the last decade, \u201cData is the New Oil\u201d is a headline you have seen several times. No wonder companies are so protective and private about their data - a lot of potential is there waiting to be exploited!\n\nDoes this mean that you can't access any interesting datasets? Well, if you are solving a novel or a very niche problem or maybe need a specialist like a doctor to tag medical images, you will likely need custom data and a custom process. But for simpler cases or educational purposes, the community has put an enormous effort into having publicly available and preprocessed data. What a time to be alive!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 6c69c5b4-6348-40db-90eb-4fd4b25ca2c0
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Suppose you want to take a look at some curated datasets. To name just a few, you can check the COCO dataset for image segmentation, the ImageNet dataset for image classification, and Kaggle's Datasets for an extra wide variety of problems, from used car prices to a brain stroke prediction dataset.\n\nOnce you get your hands on your precious data, what's next? It depends on what kind of data we\u2019re talking about and its degree of \u201crawness.\u201d Are you dealing with images? Text? Is there a database (lucky you!)? Do you have a CSV (or JSON, or, God forbid!, XML)?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5664ec6d-5b73-4971-9c08-5f7b61c0c8be
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "In any case, you need to be able to handle all these kinds of data and clean, tag, and transform it to your needs. You need to cook that raw data that you just got. For that purpose, let's jump to the next section called \u201c Cook Transform Data.\u201d\n\nExtra readings Luminousmens article on data file formats and their comparative advantages.\n\n2. Transform Data\n\nOnce we have the data, we need to move it, change it, stretch it, and bend it to our will. Unless the dataset is very small, this requires some sort of programming."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8549b225-90f5-4bc8-861c-402ee094ec3c
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "There are many kinds of data, each requiring a different set of skills. We could mention images, videos, and text as popular data sources. However, for this blog, we will focus on the data type that (probably) rules them all: tabular data.\n\nA tabular dataset is basically a spreadsheet where each row is a new sample, and each column represents some information about those samples.\n\nManually changing things in spreadsheets is easy, albeit time-consuming, and usually unfeasible for large datasets. The equivalent way to manipulate tabular data in Python is with Pandas, the most widely adopted library for table manipulation in Python and one of the most popular libraries in the language."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e5f43831-f28c-4a01-ad31-4a716d460656
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "If you are serious about doing Machine Learning in Python, you must learn Pandas. Luckily, there are many great resources available to help you learn.\n\nEssentials As a starting resource, this Kaggle tutorial is a must.\n\nFurther, we recommend Towards Data Science\u2019s blog post on writing simpler and more consistent Pandas code.\n\nFor a hands-on guide from Pandas basics to its most important features, you can check our blog post on the subject.\n\n3. Pick a Machine Learning model\n\nThere are several ways to think about Machine Learning models. In the vignette below, XKCD summarizes quite well one of the most common ways people see Machine Learning models."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e0ccdf95-12e1-4fc9-a3dc-d68df25b7e1d
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "But, we prefer a different way to think about them.\n\nWe think of a Machine Learning model as a coffee machine where you put coffee beans and water in and get magic on the other side. Even though making coffee is fairly easy, each coffee machine has its own way of working. If you are brewing coffee with a French press, you need a coarser grind, whereas if you use pour-over brewers, the grind needs to be much finer, almost finer than sand."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b8ed1010-4b38-4248-aed0-a29cd3a6bb8f
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Similarly, we can think of Machine Learning models as machines. When given data (coffee beans), they output predictions (coffee/magic). We must be careful, though, because different models require different inputs. Some models require all data to be \u201cvery granular\u201d (normalized between [0, 1] ), while other models accept arbitrary numbers. Almost all models require the input to be in a numeric format, neither text nor images.\n\nUnder this way of viewing Machine Learning, the most important task for working with a model is reading and understanding its instruction manual: dust or coarse, normalized or not, linearly independent or not, and so on."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a448bd50-95cc-41af-9f78-10b3a50064e8
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "But before turning the grinder on, it is wise to check if the coffee beans come with stones or dirt mixed in the same bag because you don't want to include them in your cup. That's why you will have to spend time separating good beans from dirt. The same is true for data: not every attribute will be useful, and maybe most will not. Looking at the data and deciding what will be useful for the model and what will not is often referred to as data cleaning and is a crucial part of Machine Learning."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 001c598a-f8ef-4e91-b42e-a1851888b22b
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Once you have your coffee ground, you may want to make a special blend choosing different origins of the beans. The reasons for blending can be many. You may want to bring more complex flavors or reduce the price of the package while maintaining the quality. The same goes for data. Depending on your model, you may want to transform a variable to have a normal distribution or help the image classification by tweaking the color balance of the images. This process is called feature engineering and is arguably one of the hardest parts of Machine Learning. As shown above, getting predictions from a Machine Learning model takes only one line of code, while a data processing pipeline can be"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 61ddb3d0-6c04-4d05-ba7f-629d60cc0348
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Learning. As shown above, getting predictions from a Machine Learning model takes only one line of code, while a data processing pipeline can be several hundred \u2014if not thousands\u2014 of lines long."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3425f371-ba01-4720-8a9f-1b7ef53b8fdb
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "There is a myriad of resources out there on how to become a great barista data scientist. If we need to name a few, those would be:\n\nTheory Statquest is an amazing YouTube channel to learn about the main ideas behind both specific models and overall Machine Learning concepts.\n\nA great resource on the theory behind Machine Learning can be found in Stanford's CS299 course. If you plan on taking this course, Garrett Thomas\u2019s math summary might also be useful.\n\nConcepts & exercises DataCamp offers a Data Scientist career track with almost 100 hours of hands-on courses on data manipulation and classic Machine Learning algorithms.\n\n4. Get the model to learn what you want, not what it wants"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4d99fbc3-272e-494f-bfb3-6f622fd92f94
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "4. Get the model to learn what you want, not what it wants\n\nSay you wanted to describe the concept of chairs to a friend, so you would start with the chairs you have at home as examples, and you start saying something like \"a chair is an item with 4 legs that you can sit on\"."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5f82ac12-af7b-41f3-a341-320021938d8d
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "At first, you are happy because it describes all the chairs at your place, but also your bed, your sofa, and a stool. Then you try a more complex description of what a chair is to exclude these other pieces of furniture. So you add more variables to describe your chairs, including color, shapes, or materials; and you come up with something like \"has 4 legs, you can sit on it, has a back, it\u2019s made of wood, the legs are brown, the seat is green with this specific pattern\". Not a great solution either, is it? Now you can perfectly classify the chairs back at home, but you won't be able to describe your friends\u2019 chairs. You\u2019ve overfitted your definition to the chairs you know."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 6e3d965c-f3a7-476f-ba25-37c738e145b7
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "ML models face the same problem as the person classifying chairs above. Go too simple, and you end up with a bad definition, go too complex, and you might end up just memorizing the data you see. This problem is known in machine learning as the bias-variance trade-off.\n\nOur job as developers is to design our model and its training process so that memorization is not a viable option and the only option left is to learn the relevant patterns. There are several tools that we use for this, and if you\u2019ve been following the courses above, you should be familiar with most of them. The following are some you should definitely know about.\n\n5. Measure results"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9029ae3b-b98d-4f85-a8df-cac43bdd9edf
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "5. Measure results\n\nBy now, you should have managed to have your model training for a couple of epochs and are probably wondering if it is doing any good.\n\nTo answer that, we need to introduce a new concept: metrics. Let's dig into this topic with an example. Imagine that you are training a model to predict the selling price of a house. You have 500,000 houses. For each of them, you have the real price and the predicted price. How do you check if the predictions are correct?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0a180771-25e6-4303-a0da-9f2bbd1e9023
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Since evaluating a model\u2019s performance by looking at its prediction for every single data point is not feasible, we need a way to summarize the performance across all samples to get a single number that we can use to evaluate the model. When using metrics, you have to consider that it comes with a compromise: you will start evaluating things on average."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d09708ca-9476-4a43-ac35-720524aee2d5
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "There are many, many metrics out there. You can even have custom metrics for your needs because not all metrics are well-posed to solve different problems with the same techniques. For regression problems, we have metrics such as MAE, RMSE, and MAPE, while for classification problems, we can use accuracy, f1-score, AUC, confusion matrix, etc. You should definitely get acquainted with their uses, strengths, and weaknesses.\n\nCommon metrics for regression problems\n\nCommon metrics for classification problems"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 5842aa15-de09-49a3-9a75-522d0afaf73d
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Common metrics for regression problems\n\nCommon metrics for classification problems\n\nVery specific problems might even require custom metrics for the model to learn that something is meaningful. For example, when estimating the price of a house, it might be worse to underestimate the price of a house and lose money in the transaction rather than posting a very high price and not selling it. For such a case, a custom metric might be desirable, one that places a larger penalty on the model when underestimating the target and a smaller one when overestimating."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 6aab8c47-08a4-4190-9cd3-426237ca9257
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "A final remark regarding this topic: metrics can take more than one meaning in a Machine Learning project. One of them is, as we just described, that the metric can be used to evaluate the model after it\u2019s trained. Another meaning for metric might be the business metric that\u2019s expected to improve thanks to your machine learning model. You should be mindful of these metrics going into any project.\n\nExtra readings You can find a review of the most used metrics for Machine Learning in this article.\n\n6. Visually inspect the results\n\nAlright! We have collected data, cleaned it, trained a model, and checked that the error is small. Are we done? Ye...Almost!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7ec4e1a1-427b-4e43-aad8-78b44bbff316
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Alright! We have collected data, cleaned it, trained a model, and checked that the error is small. Are we done? Ye...Almost!\n\nWe, humans, are very visual creatures. It is often quite challenging to know if a problem has been correctly solved simply by looking at a metric. Furthermore, as discussed in the previous section, metrics can be deceiving. They often hide flaws in the way that our model has learned (remember the bad student that memorized all the answers).\n\nA great way to solve all these issues at once is to create charts showing the model\u2019s performance under several circumstances.\n\nThere are several types of charts that make it easier to understand the outcome of a model:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3a68be49-b298-484b-8cec-4583a78b7741
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "There are several types of charts that make it easier to understand the outcome of a model:\n\nShow the predicted value as a function of some of the features. For example, house selling price as a function of the house's area.\n\nA bar plot comparing the evaluation metric for different groups within the data. For instance, how does the error in predicting house prices change across different neighborhoods?\n\nIf the data contains images, show them, or if it contains geographic locations, plot a map.\n\nIf the data contains temporal data, show how the error evolves over time!\n\nPlots make it easier to share the model\u2019s performance with others and help debug a model that is not working well."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 929c9148-c264-4791-885a-71b93c172942
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Plots make it easier to share the model\u2019s performance with others and help debug a model that is not working well.\n\nConsider, for example, a model trying to predict who will win the lottery: the model might predict that no one will win and have very high accuracy when, in fact, it is not learning anything (not that it could, but anyway). We might only learn about this behavior when plotting the model\u2019s predicted positive results and finding that there are none!\n\nBack to programming, to produce these visualizations in Python, you\u2019ll need to get a handle on two very important libraries: Matplotlib and Seaborn."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ca702590-1096-43a2-812e-dbdf50166eca
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Back to programming, to produce these visualizations in Python, you\u2019ll need to get a handle on two very important libraries: Matplotlib and Seaborn.\n\nMatplotlib and plotting in Python are synonymous. The library allows users to be as specific as they desire. It is a must-have in your tool belt. Most of the other plotting libraries in Python are implemented on top of Matplotlib, meaning that you will write code using this library sooner or later.\n\nSeaborn is almost a wrapper around Matplotlib that allows users to create plots that look nicer, faster. Since it is built on top of Matplotlib, you can always resort to the former library for very specific customizations."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: aa41bef8-6c7d-44e6-97b9-2b0541da2955
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "A word of advice: Plotting in Python is (a bit) cumbersome and takes time to reach a point where you can produce beautiful plots. The best way is to get started now! We recommend the following resources to do so:\n\nCourses Here again, first and foremost you should go through Kaggle's Visualization course\n\nDataCamp has some great hands-on courses on visualization\n\nDocumentation When in doubt, you can always check the documentation for Matplotlib and Seaborn or their respective tutorials (Matplotlib, Seaborn)."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3956dfd6-74d6-46db-98fc-903e702a207c
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Documentation When in doubt, you can always check the documentation for Matplotlib and Seaborn or their respective tutorials (Matplotlib, Seaborn).\n\nBeyond the essentials If you want to go beyond the basic visualizations, there\u2019s a lot of research with regards to optimizing plot format to deliver effective messaging. Check out data-viz resources.\n\nTakeaways\n\nOoooff, that was a long post. So where should you go from here?\n\nFirst, we recommend going through all the linked materials. Those are battle-tested and will kickstart your Data Science/Machine Learning Engineer journey."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: acff8483-419b-41c1-9e5d-962964392b0a
encoding: FLOAT32
metadata:
{"title": "Machine Learning 101: Build, Train, Test, Rinse & Repeat", "link": "https://tryolabs.com/blog/2022/09/22/machine-learning-101", "language": "en", "description": "Let\u2019s dig deeper into the specifics of Machine Learning. What really is Machine Learning? What kind of problems can it solve? Master these concepts and kickstart your journey with our battle tested resources. And remember: it\u2019s all trial and error. Dig in!", "chroma:document": "Once you feel confident, you should get your hands dirty. Although learning from textbooks is a great way to learn the theory, it is when you put those learnings into practice that you get to master these concepts. If you don't know where to start, give some of these projects a try and let us know how you did!\n\nGet more resources, insights and knowledge"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: df9782ce-c9ed-4ae4-9aaf-671686574fe0
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "We are excited to announce the release of Norfair 2.0, available in GitHub and PyPI as of now. This is the biggest upgrade to Tryolabs\u2019 open-source multi-object tracking library since its first release two years ago.\n\nFor those unfamiliar with the term, multi-object tracking (abbreviated as MOT) is essentially the process of associating unique identifiers over time to every object in the video. It is generally performed by first running the video frames through a detector that identifies the objects in the scene (like YOLO, Faster R-CNN, or another deep learning model), and then linking those objects over time."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ba09cfa0-4c02-432c-ab44-cb55d9e45e46
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Norfair was born out of the need to solve the tracking problem in a straightforward way, with a simple setup and no extraneous dependencies, so that tracking capabilities could be added to any pre-existing codebase. Initially, it was adapted from a simple mechanism that does tracking by estimating the trajectories and velocities of objects called SORT. But it has matured!\n\nObject detection. Object detection and tracking."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 2956ec00-c7b2-47de-a447-47d8689c03cc
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Object detection. Object detection and tracking.\n\nOver the last two years, Norfair has steadily evolved in terms of features, and the community of users and contributors has continued to grow. Its simplicity of use has made it the go-to choice for many to add tracking to several different detectors, and it has been the angular stone behind many of Tryolabs\u2019 projects related to video analytics."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 71f7538b-dd19-48bb-9231-af314d08ddb1
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "For its second birthday \ud83c\udf82, we have decided to release version 2.0. Even though 1.0 was released not long ago, there are a lot of new and exciting features that merit the release of a new major version. On top of many bugs fixed and improved documentation, we added support for estimating camera motion to allow tracking under a moving frame of reference, n-dimensional tracking (yes, Norfair can now track 3D objects!), and re-identification with appearance embeddings for the most challenging of scenarios with occlusion.\n\nBuckle up, as we will go over all these features and how they work!\n\nSupport for 3D and n-dimensional tracking"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 84b0f230-2a48-4e11-896c-7265eae94d57
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "In the past few years, 3D has become more ubiquitous thanks to LIDAR and detection models that output cuboids instead of 2D bounding boxes. This trend will only accelerate in the future, so we had to do something about it. There was no fundamental blocker to adding 3D object \u2014 and more generally, n-dimensional object \u2014 tracking support to Norfair. The Kalman filter can estimate objects\u2019 trajectories no matter the number of dimensions, so we generalized the rest of Norfair to support it. The new 3D support in Norfair opens the door to new applications in augmented reality and non-video realms. We made a demo that uses Google\u2019s MediaPipe Objectron, a mobile real-time 3D object detection"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 62e327cf-48fd-46dc-8de1-a1400085d5f1
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "applications in augmented reality and non-video realms. We made a demo that uses Google\u2019s MediaPipe Objectron, a mobile real-time 3D object detection solution for everyday objects. 3D tracking with Norfair and MediaPipe's Objectron."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ec8a92d3-6340-4c6d-a0f6-075e5cd3f28b
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Camera motion estimation\n\nWhat do video analytics applications on self-driving cars and soccer matches have in common? The camera is not static. This makes object tracking more challenging because the objects move but also does your frame of reference. But don\u2019t worry, we got you covered!\n\nWe added a new optional component that can be used to estimate the movement of the camera. Internally, this component will map camera movements and estimate coordinate transformations to construct a fixed reference frame, over which the tracking of the objects will occur. You then pass these coordinate transformations to the Tracker, and it will use them internally."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 352532ed-6582-4042-a708-f60ae082f077
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "This will significantly improve tracking results under some scenarios by compensating the camera motion. Let\u2019s look at an example:\n\nImprovements by estimating camera motion using optical flow.\n\nOn the left, we ran the usual tracking without camera motion estimation. By the end of the video, the person gets assigned id 5, meaning that the tracker lost it 4 times. The reason the tracker performs this bad is simple: the camera movement makes the apparent movement of the object too erratic for the tracker to accurately estimate the future position of the object."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dde54d88-a8e6-4b13-a0ac-34969ab65309
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "On the right, we estimate the motion of the camera and stabilize the detections. Now the detections can be processed in a fixed reference making them much easier to track.\n\nIn code, this looks really simple:\n\nThe second benefit to this is that now the position of objects in this fixed reference frame is available to the user.\n\nFor instance, if you want to know if a person entered a certain area or the path they walked through, now you can do it on a fixed set of coordinates, independent of how the camera moved. In the following example, we draw the paths of the players in a fixed frame of reference. Note how it\u2019s consistent no matter the panning movement of the camera:"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 97db819f-913a-4644-9246-31977d73a5b0
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Tracking soccer players under a moving camera.\n\nMotion estimation: behind the scenes\n\nIf you are wondering how this works, the solution involves some classical computer vision. On each frame, we sample corner points and calculate the optical flow associated with each one. Optical flow is just a way of calculating the movement vector of a point from one frame to another.\n\nArmed with these vectors, we simply estimate a transformation that undoes the movement for each frame. Furthermore, by concatenating these transformations we can take points in each frame and calculate their coordinates in an absolute frame of reference corresponding to the first frame of the video."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8783d841-99fb-4bdf-9d1a-a7f5ac845ba7
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Estimating optical flow for more accurate tracking under a moving camera. Sampled points with arrows help visualize the optical flow.\n\nThe sampled points are key for this method to work. This is why we provide a number of parameters for the user to customize how many points are sampled, how crammed together they can be, and even to avoid certain regions of the frame. This last point is important since it allows users to mask out the tracked objects and the detections, forcing the points to be sampled from the background of the scene.\n\nSee this feature in action in the new Hugging Face Space. If you want to apply it to your own project, check out our demo on GitHub."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 534d82ff-b46b-4000-bf1b-3a637beb86ed
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "See this feature in action in the new Hugging Face Space. If you want to apply it to your own project, check out our demo on GitHub.\n\nRe-identification (ReID)\n\nRe-Identification of objects in complex scenarios such as those with heavy occlusions brings the need to consider not only positional information but also appearance. We had implemented some forms of ReID in the past with previous versions of Norfair, attaching embeddings to each detection and considering them in the distance function. This is still possible, but we found that was not enough."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 73efce23-68e9-4e45-93aa-eb0fba060691
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "In this new iteration, instead of relying on a combination of position information and embeddings to track the objects all the time, we added a new matching stage to deal with ReID. This new stage focuses on matching recently lost objects with those new objects that are about to be initialized. This has its own set of rules that can be tuned by the user and is independent of the regular tracking stage we\u2019ve worked with until now."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a78be121-7027-4921-9e9b-732f741bfa97
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "This new stage of ReID matching has the benefit of delaying the decision until you have gathered the most evidence about the new object. This is important since partially-occluded objects tend to have poor quality embeddings and you don\u2019t want those to interfere with your matching.\n\nUnderstanding the object lifecycle"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1694ccf5-bc7a-45de-974e-e425b2f358e6
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Every time a tracked object is successfully matched with a detection, the counter is increased by one. Matches occur when the customizable distance function goes below a threshold. On the contrary, for every frame with no match, we subtract one from the counter. When the hit_counter reaches initialization_delay the object is considered active. It will continue accumulating hits (+1) with each new match until it reaches hit_counter_max , where the counter is capped. If hit_counter drops to 0, the tracked object is considered inactive and ReID kicks in: the object will wait for reid_hit_counter_max frames to be matched with one of the initializing objects. After this, the object is deleted."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 00ab6abc-69e5-4cc8-bd84-81abe6dbee45
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "kicks in: the object will wait for reid_hit_counter_max frames to be matched with one of the initializing objects. After this, the object is deleted. In case of a match, the older object is activated again and the younger one is deleted after being merged into the older one."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: eaeb54fe-f1b3-4953-be9c-0ad4a7a45e6c
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Putting it all together: a demo of ReID\n\nIn Norfair, the user is free to define how to compare objects for ReID. Any type of embedding can be used. Depending on the application, you might want to use the embeddings from your detector or the ones coming from another model specific for ReID."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dc066822-e8b6-4359-9044-aae650280d9e
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "To provide a straightforward example of this feature that shows the power of embeddings in a simple case, we took inspiration from the synthetic example on motpy and adapted it. It\u2019s basically a simulation video where boxes are moving around. When boxes get occluded by other boxes we just grab the detection from the top box, so any other box occluded is not getting a detection. For this demo we went with the simplest embedding we could think of: the color histogram inside the bounding box. On the left, we are only using positional information, while on the right the ReID stage is being used:\n\nDemo of ReID with appearance embeddings and Norfair."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 1c78a7e8-4faf-45fd-ac70-dcdcd27a83f8
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Demo of ReID with appearance embeddings and Norfair.\n\nThis demo can be found on GitHub. Take a look at it to get a better idea of how to use the new ReID stage.\n\nIn a more complex case, we suggest looking at models that generate embeddings specific to the type of ReID that you wish to perform (person, vehicle, or other).\n\nOther news\n\nOther things relevant to Norfair 2.0:\n\nNew site with official documentation which we plan to keep improving.\n\nNorfair now ships with the most common distance functions, so you don\u2019t need to write your own copy if you are dealing with standard cases.\n\nNorfair now uses our optimized Kalman filter implementation, which is significantly faster than filterpy."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ae65a402-7493-446b-bda7-0efdbe15feaa
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Norfair now uses our optimized Kalman filter implementation, which is significantly faster than filterpy.\n\nRegarding the demos: All have been implemented in Docker to make them more easily reproducible. Moreover, we added a demo in our Hugging Face Space. We added several new ones on YOLOv7, MMDetection, moving camera, 3D tracking, and ReID. More to come!\n\nMany other bug fixes and improvements.\n\nClosing"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4dc5bccf-40b7-44d3-9daa-ac1c354a2132
encoding: FLOAT32
metadata:
{"title": "Announcing Norfair 2.0: an open-source real-time multi-object tracking library", "link": "https://tryolabs.com/blog/2022/09/20/announcing-norfair-2.0-open-source-real-time-multi-object-tracking-library", "language": "en", "description": "Norfair is a customizable lightweight Python library for real-time multi-object tracking built by Tryolabs. Norfair 2.0 includes support for n-dimensional tracking and estimation of camera motion to improve tracking under challenging scenarios with occlusion.", "chroma:document": "Many other bug fixes and improvements.\n\nClosing\n\nWe want to thank all the people and organizations who are actively using and contributing to Norfair. Seeing you choose Norfair in your projects, pushing its limits, opening GitHub issues, and contributing back has made the tool much better, and working on it much more gratifying. Community feedback has also been paramount for prioritizing our roadmap.\n\nHope the new features excite you as much as they do us. More will come! \ud83e\udd42"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cd4e400f-750e-4373-9efc-b98e99c74fd8
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Whenever you start a new project there is a large list of tasks you have to keep in mind, but when you start a robotics project, this list grows really fast. You might start with hardware: actuators, sensors, controllers, computers, etc. Then you annotate a list of drivers to handle your hardware and communicate with the rest of the robot. At this point, you remember all the modules you will need in your robot:\n\nA perception module to process the sensor data. A world model module to represent the physical world. A decision-making module that defines the robot's behavior to achieve its goal. A communication module for connecting every module. A visualization module for debugging and setup."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 89a10cd5-ddb7-4615-8af6-d2d9063a5c1f
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Suddenly, the task becomes overwhelming. But fear not, because there is a specialized framework widely used in robotics that comes to your rescue. It\u2019s called ROS.\n\nROS, from Robot Operating System, is a free and open-source framework for complex robot applications. The aim of ROS is to help build such applications faster by providing a standard framework with common tools and solutions to cross-cutting problems in robot development."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 93d12723-fb55-4d82-9dbb-28de5316c938
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "The most important functionality of ROS is its inter-process communication. With ROS you can develop several modules and connect them to effortlessly share data. This feature solves the interoperability problem by enabling the use of modules implemented in different languages (such as C++ or Python) or using some of the thousands of useful packages with battle-tested algorithms for all kinds of issues that pop up in robotics: from low-level drivers of sensors and actuators to complex algorithms for navigation, manipulation, and perception.\n\nIn this post, we will review the main concepts behind ROS with a simple example to showcase how it can accelerate your next robotics project."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 65ad6ad5-2244-43a6-94de-cc0990e087ec
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "In this post, we will review the main concepts behind ROS with a simple example to showcase how it can accelerate your next robotics project.\n\nROS Concepts\n\nEven though ROS provides the services you would expect from an operating system such as hardware abstraction, device control, process messaging, and package management, ROS is not actually an operating system. It\u2019s a framework that provides libraries and tools to create robot applications (also called robotics middleware).\n\nROS 2 This post is about ROS as it is still the most used framework, but ROS 2 is growing fast! Most concepts here are valid for ROS 2, but be aware of the differences if using the latter."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 32ba7b80-a74f-41aa-a351-4969f735719e
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "The most important concept in ROS is the Computation Graph: the network of processes of the robot. Each process is a node in this graph and can be connected to other nodes either by messages or services (for asynchronous or synchronous communication respectively). Additionally, messages are sent through topics that allow many-to-many communication using a publish-subscribe model, while services allow a request-replay interaction that is implemented as a remote procedure call. Each graph has a Master node that helps connect the different nodes and stores data by key to be accessible in the graph.\n\nSample project"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 518a4658-18b7-407a-be75-a5f881060b7f
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Sample project\n\nLet\u2019s make this all clear by imagining how we would structure a simple project in ROS: we will make a smart light that follows a person on a stage, using a camera.\n\nWe will divide the problem into 4 processes and build a pipeline: read the image from the camera, detect the person, calculate the light position, and move the light. Each process will be a ROS node. Let's define how we will build and connect them!\n\nThe roslaunch tool"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 33c39fc1-0cf1-4d18-8119-340b71c2de3a
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Camera Driver: this node will connect to the camera and publish the images in a topic. As this is a very common task, we can search for an existing node, such as cv_camera_node , that implements a proper driver for our camera. The topic in which the images will be published will be called cv_camera/image_raw . Person Detection: this node will subscribe to the cv_camera/image_raw topic, and will define a callback function that will be called whenever a new image is published. This function will detect one person in the image and publish its result in the person_detection/person topic. We can use an existing YOLO ROS node, follow a C++ tutorial that implements an OpenCV detector, or we can"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7b72d955-0382-42bf-93ff-24e42bf61ef3
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "in the person_detection/person topic. We can use an existing YOLO ROS node, follow a C++ tutorial that implements an OpenCV detector, or we can use rospy to program the node using Python and any state-of-the-art detector made available by the ML community, such as YOLOv7. Light Position: this node will subscribe to person_detection/person and calculate the desired position of the light given the person detection, and will publish it to light_position/position . We have to take the position of the person in the camera coordinate system and transform it into the light coordinate system. Fortunately, the transformation between coordinate frames is a well-studied problem in robotics with a"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3bf876b6-4b46-4b62-9d12-1a54c18cd286
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "transform it into the light coordinate system. Fortunately, the transformation between coordinate frames is a well-studied problem in robotics with a great solution in ROS: the transform library tf2. This awesome tool will reduce the effort to solve the problem and, again, it can be done either in C++ or Python! Motor Driver: depending on the hardware constraints we will need to implement a driver or use an existing driver if the motor has one. This driver will subscribe to light_position/position and will be in charge of moving the light to the objective position."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7959a7da-e839-47a5-a2d8-d3b706cf4297
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Another great feature of ROS is the roslaunch tool. This tool allows us to set up each node and its parameters in an intuitive .launch file format called launchfile and run everything from a single command. You can also tweak some robustness settings to specify the desired behavior of the whole project in case of an error in a node."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: bb8c3ad2-1a6b-4c56-a8eb-0444e6852409
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "ROS even supports remote execution using SSH, meaning your nodes don\u2019t have to be constrained to one hardware device. With roslaunch you can run nodes on different computers with a single command, making it possible to include edge devices for tasks that require specific hardware. For example, adding GPU capabilities for image processing using Nvidia Jetson is straightforward, as is using a Raspberry Pi for a fast prototype. Altogether with the modularity of the nodes, the entire project can be tested in a single development computer and deployed in a distributed setting by simply running a different roslaunch file."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cbe9aa58-c2d4-437c-9c24-11c273d1fc9c
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "At this point, we have everything we need to build and run our project! The beauty is that most of the tasks are solved by using existing nodes and setting them up, so we can focus on the problem-specific tasks that will add value to our solution.\n\nCode Reusability\n\nThe strength of using a modular design is the possibility of reusing code, even our own. Let\u2019s solve the problem of adding a second light that aims at the same person."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 38349d1f-1c14-4fd2-b305-eaaf566a84b4
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "We need to receive the detection coordinates, transform them into the coordinate system of the new light, and move the light accordingly. As all of this is already implemented in the light_position and motor_driver , all we have to do is run a second instance of these nodes with different names and parameters. In practice, we will modify the existing launchfile to rename the light_position and motor_driver nodes to light_position_left and motor_driver_left , and add additional light_position_right and motor_driver_right nodes with the parameters of the new light. We\u2019ll do the same with the topic names, ending up with light_position_right/position and light_position_left/position . As ROS"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 8f60faeb-3b9b-4959-8b40-c701b93c76b5
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "of the new light. We\u2019ll do the same with the topic names, ending up with light_position_right/position and light_position_left/position . As ROS uses a publish-subscribe model, the person_detector node behavior is independent of the number of subscribed nodes and doesn\u2019t need to be modified at all. And just like that, we added a new light!"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cfcd2fd4-64ea-4527-91b9-a1dabe4d23f3
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Modularity\n\nLet\u2019s think about a harder feature. Now we want the lights to be able to follow up to two different people on the stage."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 22624549-121f-4eae-ba50-f8fd696b2624
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "We need to modify the person detector to publish up to two different people, but we also need to be able to track each one from the previous frame so each light follows the same person. We will create a new node called people_detection with the same detection algorithm as before, but adding tracking capabilities using Norfair. By using tracking, we can assign a unique identifier to each detection and have a higher frame rate, as the tracker can run faster than the detection algorithm. An important consideration is that a higher frame rate will help by enabling frequent updates to the light position and therefore smoother light movement. Now that our detector has tracking capabilities, we"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b3a94013-f661-454a-b536-12b9a8fb9323
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "help by enabling frequent updates to the light position and therefore smoother light movement. Now that our detector has tracking capabilities, we can publish the detections in different topics for different people, people_detection/first and people_detection/second , and modify the launchfile so each light_position node subscribes to one of the detection topics."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d6a9e1c7-d9a0-47ff-abea-c24d04c65c17
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Even though we needed to make some changes to the project structure, we were still able to reuse most of the code and easily add a new functionality. It is straightforward to see how easily we can modify this project to add any number of lights, making this solution scalable.\n\nAt this point, we have covered most of our needs for our robotics project, but ROS can also help us in debugging, visualization and development by using some of their great tools. Next, we go over some that we believe to be the most relevant."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a7363033-ca0a-464a-83df-08275a6f87a3
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Bags are a storage format for ROS messages. By using the rosbag command you can record the messages published in the computational graph. These bags can later be played back in ROS, in the same order as they were recorded.\n\nA .rosbag file can be used as a dataset record, for visualization, debugging, and development. In our example, we can record the frames published by the camera in a .rosbag file, and then run multiple calibration experiments of the people detection node on a completely different computer, or we can run the experiment in the stage setup to test the movement of the lights automatically."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a3b701ee-ae1d-477a-9eb1-dec8ff89cc4c
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Another amazing ROS tool is rqt_graph, a GUI plugin to visualize the computational graph. This is a great way to visualize the processes and their connections.\n\nThere are several visualization tools for ROS, from general data visualization with FoxgloveStudio, 3D visualization with RVIZ, a browser-based data visualization tool called Webviz, and even an Android visualization app ROS-Mobile.\n\nAnother important tool for robotics is a simulator. ROS includes an interface with the Gazebo simulator, so you can run several experiments in a virtual environment (including components like virtual sensors and actuators) without the risk of wearing off or damaging your robot."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b8b5edd7-0b2d-4b72-9d0d-731059e7b4c9
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "Finally, there is a large list of command line tools to help manage almost every aspect of your ROS project, including filesystem, logging, introspection, and commands.\n\nClosing thoughts\n\nRobots are no longer a Sci-Fi dream and now they are part of our lives. Starting from industries with robotic arms, carts, and forklifts, to homes with robot vacuums, lawn mowers, window cleaners, and even roads with autonomous vehicles. As more and more robots are reaching the market and people keep losing their fear of these new kinds of gadgets, interest has grown in developing robotic projects either for research, as a hobby, or to create innovative products."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c1eaa248-6513-4c7a-8183-9c7f97754175
encoding: FLOAT32
metadata:
{"title": "ROS: the framework to accelerate your next robotics project", "link": "https://tryolabs.com/blog/2022/09/15/ros-the-framework-to-accelerate-your-next-robotics-project", "language": "en", "description": "ROS is a free and open-source framework for complex robot applications. Here we explain its main concepts and a project sample that will help you build robot applications faster.", "chroma:document": "The extraordinary growth in accessibility of state-of-the-art machine learning and computer vision enables robust environment sensing based on images, making it possible to create exciting projects without spending too much time on the research and development of these components.\n\nMoreover, thanks to projects like ROS, it is nowadays possible for small teams or even single individuals to achieve things that before were only accessible to larger teams with financial backing. Your robot can start moving faster by standing on the shoulders of giants."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: acb92a64-e058-40fe-8dd2-d37ea863234e
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Welcome to the first blog post of a 4-part series where we will shed some light on data science, what we do at Tryolabs, and how to approach your journey in case you wish to start your career in Machine Learning. This series is not the typical highly technical or business-oriented blog post. Instead, it is aimed at students, enthusiasts, and curious people who want to dive into this topic to specialize further or do a career shift, or just for the sake of acquiring new skills. Also, we hope it will help our families to finally understand what we do all day long sitting in front of the computer looking at code and graphics :)"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c947d8b9-9e5c-437e-a329-d7954bf1c2ea
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "In this first blog post, we will overview the basic concepts and tools that we understand a good data scientist should have in their tool belt. The second one will focus on basic machine learning concepts such as data processing, models, metrics, and others. The third one is where we review how deep learning revolutionized the field. And lastly, a fourth episode where we\u2019ll talk about our culture and values."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: f085b81a-3768-4a9f-9052-e8744c0d0714
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Be warned, we are not reinventing the wheel with these blog posts, instead, we will stand on the shoulders of giants and point to many of the great resources out there, from essential YouTube channels, great online courses, to brilliant blog posts. We are big fans of learning by doing, so you\u2019ll find a lot of this. Hope you enjoy your journey!\n\nThe road to Machine Learning\n\nSay you wanted to become an astronaut (who didn\u2019t at some point?). You could watch rocket launches all day and think that an astronaut's job is only about that epic, climactic moment. In reality, though, flying a rocket involves training in a wide set of skills."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: bb4fbb14-2fac-4290-91cd-dcdace40dd4f
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "With Data Science and Machine Learning, something similar occurs. You could read new and exciting applications for artificial intelligence every day, and learn about new, bleeding edge models. But, what are the necessary skills to actually become a professional in the field?\n\nIn 2010, Drew Conway proposed a simple framework for understanding the skills needed to excel as a data scientist.\n\nHis idea was first that Data Science was broader than Machine Learning. While Machine Learning involves the definition and fitting of models that can learn from data, Data Science would involve all activities necessary to actually gain insight and solve a problem with our modeling."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e74419e9-7c61-4c3e-a55c-79f3393efc10
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "According to this framework, a solid Data Science Foundation requires knowledge in three areas: Statistics, Coding, and Domain i.e. knowledge of the specific problem at hand. Though there are other skills that could be included, we believe this is a great place to start. Let's get into it.\n\nFundamentals: Coding\n\nComputer Science concepts\n\nIf we\u2019re talking fundamentals, before we get into coding per se, there are some general computer science concepts with which you should get acquainted. Computer science is an endlessly vast field, but for Data Science purposes, you should at least manage the basics of data structures and algorithms."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: b69ced3e-b0ba-42ac-b769-924400a9bef2
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Why focus on these two? Apart from the fact that these are arguably the most important topics in Computer Science, data doesn't live in the ether. It lives within data structures such as lists, hash maps, matrixes, and so on. And if you want to play with it, you will need algorithms to manipulate said structures effectively.\n\nWe have two resources to help you to dip your toes in the matter, but plenty of other resources on this topic are available.\n\nPlaylists CsDojo has a great playlist on data structures and algorithms fundamentals.\n\nIf you want to go deeper into these topics, MIT has a 24-lecture open course on YouTube.\n\nRetrieving Data, SQL, and NoSQL"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 10ad473f-85cc-4351-9d48-9c54714834b3
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "If you want to go deeper into these topics, MIT has a 24-lecture open course on YouTube.\n\nRetrieving Data, SQL, and NoSQL\n\nAs you probably already know, data is the bread and butter of the discipline. Data comes in many forms, such as images, videos, documents of various formats, web data, etc.\n\nProcessing large amounts of data from different sources and making it available logically and efficiently is a complex problem on its own, from which a whole other discipline has emerged the Data Engineer."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9f8ba676-c684-4e79-831b-d3d9ecb686c8
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "But not every project has these kinds of roles. You may be a solo data scientist, the project may be in its early stages and lacks a fully developed team, or the person in charge may be on vacation. This means that you, as a Data Scientist, will find yourself using one of the most important tools in our field: databases. Databases come in two flavors: relational and non-relational. There\u2019s an awful lot of theory regarding relational databases and the underlying relational model of data. However, very coarsely speaking, you can think of a relational database as a collection of tables related by id columns."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 13e8e9c3-4140-442c-9264-48ce24e3f159
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Several database management systems (DBMS) have been created over the decades to create, organize, and interact with relational databases. Some popular DBMS include PostgreSQL, MySQL, Oracle, and SQLite. In all of these systems, data is added, changed, or retrieved using the standardized programming language called SQL.\n\nHere are some great resources where you can start about this topic:\n\nSQL courses Khan Academy offers a very good beginner SQL course that covers the basics and a bit more.\n\nDataCamp has a five-part SQL skill track that focuses only on retrieving data and is fairly comprehensive in this regard."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9c3e343f-2b90-4157-aa0f-dfec929c3d57
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "DataCamp has a five-part SQL skill track that focuses only on retrieving data and is fairly comprehensive in this regard.\n\nExercises and challenges Finally, if you feel like you\u2019re getting the hang of SQL and want to test or expand your skills, you can try some of HackerRank or pgexercise\u2019s challenges."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: c2fe9901-8d1a-4743-b1c3-28d8d8227b51
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "The second flavor is the NoSQL databases. Although we wouldn't include these in the basic path, we mention them for the sake of completeness on the topic. NoSQL databases are non-tabular databases that store data differently than relational tables. NoSQL databases come in various types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user loads.\n\nDepending on the particular needs of your NoSQL database, you can choose from several implementations. The ones we have used most at Tryolabs are:\n\nNoSQL providers MongoDB: a disk-based document store."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a86275d1-4540-4a36-9529-122ecc190593
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "NoSQL providers MongoDB: a disk-based document store.\n\nRedis: very fast and implements many data types (hashes, lists, sets, sorted sets, etc.). Usually very good for cache, but also has the persistence to disk.\n\nDynamoDB: very scalable, completely hosted in the AWS Cloud (no infrastructure maintenance needed).\n\nFree Course Camp offers a course on NoSQL databases if you feel inclined to delve deeper into this topic\n\nPython\n\nAfter loading your data, you\u2019ll need to get busy coding to clean, visualize, model, and share insights."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 0cee847b-4b98-47f1-9a43-8f9e5e869e9b
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Python\n\nAfter loading your data, you\u2019ll need to get busy coding to clean, visualize, model, and share insights.\n\nAs for the most common languages to code in the data science community, we don\u2019t wish to initiate (or continue, you may say) a flame war about Python vs. R; to each their own. But here at Tryolabs, we believe that Python is the best tool for efficient, deployable, fast-paced, and maintainable machine learning projects.\n\nOur recommendations are extensive. Because the reader\u2019s level varies, we will point to several resources, and you can determine your level and what you need."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 2d68ef75-3681-4f3f-9e5c-0660fa2d12f1
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "If you\u2019re completely new to programming, do not despair. Python is not only really powerful, but it\u2019s also easy to learn and a great language to start your programming journey.\n\nPlaylist Fundamentals of Programming Languages is a great resource for programming first-timers. It takes you through the basic concepts you need to understand before starting with Python.\n\nCourses & notes Learn Python in Y Minutes is an excellent crash course in the language. If you aren\u2019t familiar with Python, you will be after 30 minutes of reading."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 199ac203-c0f1-4c8c-84ff-9fca98133e98
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "If you speak Spanish, Majo's notebooks are great to start learning about Python Basics. She has two Python notebooks. In the first one, she explains the basics of the language, and in the second one, she explains Object Oriented Programming in Python.\n\nIn this case, DataCamp offers a fairly comprehensive Python Programmer career track with almost 60 hours of hands-on content focused on what you\u2019ll need for Data Science.\n\nExercises If you feel inspired, you can test your skills with some exercises.\n\nGit"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 777bdd3a-9a58-414d-8573-7bfebe6a0e11
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Exercises If you feel inspired, you can test your skills with some exercises.\n\nGit\n\nVirtually every project needs a repository, and virtually every project uses git. Getting familiar with this tool takes some time, and even when you finally master it, you will still find yourself reading the documentation from time to time.\n\nRegarding global skills beyond the specifics of Machine Learning that can greatly further your career, developing solid git skills is among the best investments you can make. Being able to keep your code in order and collaborate with others efficiently really is a must."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 614b131f-2f79-48da-940c-29b1d4bae3c2
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Interactive resources This interactive tool is something that we have used extensively during our onboarding process. It has proven to be an excellent visual tool for beginners, with some seasoned folks also learning a trick or two.\n\nDocumentation & notes The official documentation is an excellent reference.\n\nFor Spanish speakers, again, Majo has an awesome notebook for git.\n\nDon\u2019t worry too much about trying with a real project here. We will have time for that.\n\nDeployment: REST APIs"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: a4954957-c9c6-4f50-a810-a4756609a774
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Don\u2019t worry too much about trying with a real project here. We will have time for that.\n\nDeployment: REST APIs\n\nBy this point, you already know how to extract data from a database. You\u2019ve built some solid Python foundations and know how to organize your code in git, great job! To further our journey through the fundamental skills adjacent to Machine Learning, we\u2019ll skip the specifics of modeling and assume that you\u2019ve already trained an amazing model."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e32cd93d-9dac-4760-8ac1-9bf1de284119
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "You should ask yourself, if a decision tree predicts in a random forest and there\u2019s no one around to see the result, is it really predicting? Ok, I\u2019m not proud of this pun, but I think it really nails what I want to say because sharing your model with other applications or other people is an essential part of doing data science.\n\nAPIs (Application Programming Interfaces) allow us to take the model we built and actually send it out there to receive data and output results. REST APIs are a form of API that obeys a series of design constraints aimed at standardizing and speeding up communication."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3a262414-3a9a-49c2-b6cc-51f99cc01148
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "In this regard, Python really flexes its muscles and shows its versatility, with many web frameworks from which to choose. In Tryolabs, we\u2019ve used FastAPI, Flask and Django.\n\nCourses & documentation Bitfumes FastApi course covers almost everything you\u2019ll need to learn about FastAPI.\n\nFor specific questions, FastAPI has great documentation. The same applies to Django's documentation.\n\nDeployment: Docker\n\nOk, so, say you have your data, your model, your beautifully written Python code with perfect version control on git, and your API code. Are you production ready?"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3bb76cea-49ec-423f-a332-2a5a9806d7ca
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Well, not really. You need to host your service in some environment, and you\u2019ll need to keep your code updated in said environment. This is a problem because what worked perfectly in your local environment might behave differently in production. Even what worked in production might suddenly crash due to new installations and upgrades.\n\nWhat can we do? Is there any hope we can make sure our AI systems always work as intended? The answer is yes, there is! Introducing Docker.\n\nSource docker.com: Build, share and run your models."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 82e6cd87-fbb5-43a0-b4de-63ab3603fb42
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Source docker.com: Build, share and run your models.\n\nDocker is one of the most widespread tools for DevOps out there. It manages to create identical environments using something called containers. In a nutshell, a container is an isolated user space that shares a restricted portion of the host operating system's kernel."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: e870b57b-9bdc-4c96-bbe6-e9bc496daf43
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Even though Docker is not the only container manager that exists, it is certainly the most popular. At Tryolabs, we virtually use it in every project because of its versatility. The usual use cases have been creating containers for web applications with the database, web server, and application server running virtualized, Machine Learning projects, and virtualization of ARM-based operating systems.\n\nCourses & documentation TechWorld has a great introductory tutorial for Docker.\n\nFor more specific concerns, you can always read the official documentation.\n\nBeyond the essentials You can take Andrew Ng\u2019s Intro to Machine Learning in Production for a more complete approach."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: dcd6ced9-932d-4420-8750-f1e0df44a477
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Beyond the essentials You can take Andrew Ng\u2019s Intro to Machine Learning in Production for a more complete approach.\n\nBeyond Andrews's specialization, we recommend this full-stack deep learning course that gets deeper into real industry problems.\n\nFundamentals: Math and Statistics\n\nIf you are a student, I\u2019ve got great news for you. Remember when you were studying algebra and calculus, and you asked: what\u2019s the use for this anyways? Remember when your teacher told you that you would discover how useful they are in time? Well, I don\u2019t want to say he told you so, but he told you so."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: cae5a95a-0b79-420a-98b3-15844e5ee401
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "The general good news is that, even though algebra and calculus are necessary to understand the logic behind machine learning algorithms, it\u2019s not like you need to be an expert to work as a data scientist. Having an understanding of the underlying principles, you can rely on higher-level abstractions for the operations.\n\nNow, statistics is a different matter. To be a half-decent data scientist, you should be able to do statistics like a fish swims, a bird flies, and a T-Rex claps (oh, sorry, T-Rex). Well, maybe not so much, but statistics are actually a part of day-to-day data science. It takes time to learn, but it\u2019s definitely a great investment."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 3f5aafe3-4fe6-404f-87ab-428c8c6dc3da
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Essentials Among the great contents of the 3Blue1Brown YouTube channel, you can find playlists on the basics of calculus and algebra.\n\nBeyond these conceptual introductions, the first three lectures of the MIT C229 Machine Learning course of 2019 are great for the basics of algebra and statistics.\n\nBeyond the essentials Digging deeper into these topics, you can take Stanford's Statistics for applications and Single variable calculus courses.\n\nWe recommend the Mathematics for Machine Learning book for a deep and hands-on take on all previous concepts.\n\nFundamentals: Domain Knowledge"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 50590755-7f19-444b-8c06-f7c58bc228a7
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "We recommend the Mathematics for Machine Learning book for a deep and hands-on take on all previous concepts.\n\nFundamentals: Domain Knowledge\n\nSo, you\u2019re a 33rd-degree master coder. You\u2019ve become a total math bender, drunk from Mimir\u2019s well, and have thus attained supreme machine learning knowledge. Is there anything else you need to know?\n\nWell, it might seem obvious, but you still need to know about the specific problem you\u2019re trying to solve. Be it manufacturing, finance, fashion, retail, security, or any of the tens of industries where you want to apply ML. Knowing the context of the problem you\u2019ll be working on is important."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 78802c2c-1e20-473d-8bbe-d410c8a32cd6
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "It's actually quite easy to get caught up on the tech problem and forget to look beyond and ask questions about the business. The knowledge gained from such business insights often becomes the key to a powerful solution.\n\nAt Tryolabs, we have worked with almost all verticals, ranging from real estate to finance to retail.\n\nTakeaways\n\nData Science can\u2019t be reduced to modeling. Many skills are involved, and learning them from the beginning can make a difference in your career."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 4082b777-db46-4356-86a3-9c9d8d7e1ba0
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Data Science can\u2019t be reduced to modeling. Many skills are involved, and learning them from the beginning can make a difference in your career.\n\nWe covered many topics in this post. We know it can feel overwhelming, but, as Lao Tse said, \u201cA journey of a thousand miles begins with a single step.\u201d Just start with whatever excites you the most and move outwards from there. You don\u2019t need to know every topic to start your career.\n\nMany of us here at Tryolabs have started from absolute scratch and managed to become rockstar data scientists (not me, of course, but you should see my teammates; they really know what they\u2019re doing!)."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 374eaace-5fa6-4c2e-8cc5-3e2ad788175b
encoding: FLOAT32
metadata:
{"title": "Assembling your Data Science tool belt: a road to Machine Learning", "link": "https://tryolabs.com/blog/2022/09/08/assembling-your-data-science-tool-belt", "language": "en", "description": "A road map to a rockstar career. We crafted a guide to share our insights on how to start your career path in Machine Learning", "chroma:document": "Just be bold and go for it. If you have any questions about your journey, contact us at academy@tryolabs.com.\n\nGet more resources, insights and knowledge"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: ea10849a-ebd1-4980-92ca-45f6146e0605
encoding: FLOAT32
metadata:
{"title": "Case study MercadoLibre", "link": "https://tryolabs.com/customers/mercadolibre", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "Tryolabs has been a key piece in optimizing and extending our category trees at a much higher pace than we could achieve with our former tools and teams. Through the mastering and customization of state of the art Machine Learning techniques, we've been able to increase item \"findability\" and conversion rates. We are so glad to have them collaborating with us in the quest for the best e-commerce solution. I would absolutely recommend them.\n\nDiego Cabrera Senior Manager, Mercado Libre"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 95c6ba5b-b2fb-4245-a98e-80c204aec126
encoding: FLOAT32
metadata:
{"title": "Case study Allianz Global Investors", "link": "https://tryolabs.com/customers/allianz-gi", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "With a strong attitude towards customer satisfaction, Tryolabs was committed to working closely with us in providing valuable insights and advice to bridge the gap between business, process and technology, so as to achieve our goal.\n\nVanissa Ng Head Of Risk Management Asia Pacific at Allianz Global Investors"}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 158b5ed3-4776-4a7e-857d-1ccc2ec86d1d
encoding: FLOAT32
metadata:
{"title": "Case study Foot Levelers", "link": "https://tryolabs.com/customers/foot-levelers", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "Foot measurement automation\n\nWe developed a system to automatically detect 4 key points from a foot scan: top (\"highest\" toe), bottom (heel), left and right (with respect to metatarsal heads). These key points can then be used to measure the length and width of the foot, information necessary to select the insole's size."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 75dff56f-0794-4879-92fc-3d96223d0765
encoding: FLOAT32
metadata:
{"title": "Case study SES", "link": "https://tryolabs.com/customers/ses", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "Effective outage prediction\n\nSES delivers global content connectivity solutions and is one of the most important satellite operators in the world. SES was the first operator to deliver a differentiated and scalable GEO-MEO offering worldwide, with over 50 satellites in Geostationary Earth Orbit (GEO) and 20 in Medium Earth Orbit (MEO). We teamed up with them to build a MEO monitoring solution for the gateways and their customers' terminals."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: bf377353-bbf1-496b-916e-87105ad8efb7
encoding: FLOAT32
metadata:
{"title": "Halliburton case study", "link": "https://tryolabs.com/customers/halliburton", "language": "en", "description": "Predictive maintenance solution for Halliburton. We developed a monitoring system to detect potentially hazardous scenarios for their oil pumps.", "chroma:document": "Data collection\n\nWe developed a scalable system for autonomously collecting data from oil well pumps, where Internet connectivity is often very limited. An IoT device was installed to collect this data."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: d2532679-29df-4e65-aa08-43db58aa9b0c
encoding: FLOAT32
metadata:
{"title": "Halliburton case study", "link": "https://tryolabs.com/customers/halliburton", "language": "en", "description": "Predictive maintenance solution for Halliburton. We developed a monitoring system to detect potentially hazardous scenarios for their oil pumps.", "chroma:document": "The solution includes two control systems: one is placed in the oil field to gather data and the other is carried by a technician working in the field. After an evaluation phase, we chose to implement ARM devices, given their suitability for the extreme climatic conditions that are present in the desert or arctic. The two systems, when in proximity to each other, connect and initiate a protocol to transfer the data gathered. Modbus is used to collect measurements from pumps and MQTT for transmitting them between the control systems. The data is then uploaded to a SCADA system where it is stored and analyzed."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 7fe77349-6300-42db-99b9-94fc5c8f0d06
encoding: FLOAT32
metadata:
{"title": "Case Study CFL", "link": "https://tryolabs.com/customers/cfl", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "Solution\n\nThe client envisioned that the predictive model for parking occupancy could be used in two cases. First, to provide passengers about to drive to the train station an estimate of how full the parking lot will be when they arrive. They also wanted to offer their customers the possibility to plan their trip for the next morning the night before. For the first use case, a short-term model capable of forecasting up to 4 hours ahead was built, while a long-term model was built for the second use case, as day-ahead predictions were required."}


created_at: 2024-05-14 14:30:36
topic: persistent://default/default/3c4faa6d-6b2b-430c-8727-e0594beeca70
id: 9eb521d5-12e7-4a0b-b49f-4d79d896b0e7
encoding: FLOAT32
metadata:
{"title": "Case study LINC", "link": "https://tryolabs.com/customers/linc", "language": "en", "description": "Tryolabs is a machine learning and data science consulting firm that helps companies build and implement custom solutions that drive business results.", "chroma:document": "The result of our partnership shows the flexibility and an openness of Tryolabs to out of the box thinking essential to developing not just a powerful algorithm but one that can work on all levels of the conservationist work practice.\n\n\n\nIt has been a great working experience and our team looks forward to working with Tryolabs in the future on this unique conservation challenge.\n\nJustin Downs IEF R&D, LINC"}


