|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "id": "confused-donna", |
| 6 | + "metadata": {}, |
| 7 | + "source": [ |
| 8 | + "# Converters\n", |
| 9 | + "* This is where the interfaces get exciting\n", |
| 10 | + "* The goal is to create a set of converts that convert to and from the labelbox object format\n", |
| 11 | + "* This includes model formats too\n", |
| 12 | + "* E.g. \n", |
| 13 | + " 1. a user has some data in a coco format that they want to use for MAL.\n", |
| 14 | + " - They can convert it to labelbox to the labelbox format and upload\n", |
| 15 | + " 2. a user has labelbox training data\n", |
| 16 | + " - They can convert it to the labelbox common format\n", |
| 17 | + " - They can convert the common format to a data loader format\n", |
| 18 | + " 3. A lot more but we are still developing these tools\n", |
| 19 | + "* Currently we support:\n", |
| 20 | + " 1. NDJson Converter\n", |
| 21 | + " - Convert to and from the prediction import format (mea, mal)\n", |
| 22 | + " 2. LabelboxV1 Converter\n", |
| 23 | + " - Convert to and from the prediction import format (mea, mal)\n", |
| 24 | + "* Note that tiled imagery is not yet supported." |
| 25 | + ] |
| 26 | + }, |
| 27 | + { |
| 28 | + "cell_type": "code", |
| 29 | + "execution_count": 11, |
| 30 | + "id": "intelligent-referral", |
| 31 | + "metadata": {}, |
| 32 | + "outputs": [], |
| 33 | + "source": [ |
| 34 | + "from labelbox.data.annotation_types import LabelCollection, Label, Rectangle, Point, ObjectAnnotation\n", |
| 35 | + "from labelbox.data.serialization import LBV1Converter, NDJsonConverter\n", |
| 36 | + "#from labelbox import Client" |
| 37 | + ] |
| 38 | + }, |
| 39 | + { |
| 40 | + "cell_type": "markdown", |
| 41 | + "id": "realistic-distance", |
| 42 | + "metadata": {}, |
| 43 | + "source": [ |
| 44 | + "## Labelbox V1 Converter\n", |
| 45 | + "* Convert to and from the V1 Format.\n" |
| 46 | + ] |
| 47 | + }, |
| 48 | + { |
| 49 | + "cell_type": "code", |
| 50 | + "execution_count": null, |
| 51 | + "id": "insured-beads", |
| 52 | + "metadata": {}, |
| 53 | + "outputs": [], |
| 54 | + "source": [ |
| 55 | + "client = Client(api_key = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJja3FjeDFkMDMwNjg0MHk2MWJvd2I1anI1Iiwib3JnYW5pemF0aW9uSWQiOiJja3FjeDFjem4wNjgzMHk2MWdoOXYwMmNzIiwiYXBpS2V5SWQiOiJja3JmMGR0MXc2dTVqMHk5ajRnMWo3ZHh4Iiwic2VjcmV0IjoiMzY3NTBlN2I2MDg0M2RiMTk5MTJhNGRjNmMxMzJhZTciLCJpYXQiOjE2MjY5NjQwNDEsImV4cCI6MjI1ODExNjA0MX0.Dv2c-uYsZXX_4SWYYpuR6ben-6mGn829abgpec1zo_g\")\n", |
| 56 | + "project = client.get_project(\"ckrdn049u5dia0y3h4l577t1v\")\n", |
| 57 | + "labels = project.export_labels()" |
| 58 | + ] |
| 59 | + }, |
| 60 | + { |
| 61 | + "cell_type": "code", |
| 62 | + "execution_count": null, |
| 63 | + "id": "characteristic-simulation", |
| 64 | + "metadata": {}, |
| 65 | + "outputs": [], |
| 66 | + "source": [] |
| 67 | + } |
| 68 | + ], |
| 69 | + "metadata": { |
| 70 | + "kernelspec": { |
| 71 | + "display_name": "Python 3", |
| 72 | + "language": "python", |
| 73 | + "name": "python3" |
| 74 | + }, |
| 75 | + "language_info": { |
| 76 | + "codemirror_mode": { |
| 77 | + "name": "ipython", |
| 78 | + "version": 3 |
| 79 | + }, |
| 80 | + "file_extension": ".py", |
| 81 | + "mimetype": "text/x-python", |
| 82 | + "name": "python", |
| 83 | + "nbconvert_exporter": "python", |
| 84 | + "pygments_lexer": "ipython3", |
| 85 | + "version": "3.8.2" |
| 86 | + } |
| 87 | + }, |
| 88 | + "nbformat": 4, |
| 89 | + "nbformat_minor": 5 |
| 90 | +} |
0 commit comments