Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Crowdin translations #21

Open
wants to merge 15 commits into
base: crowdin-experiment
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions translations/es-ES/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Secciones
- **Python scripts and their tests**: existen algunos scripts python que representan prácticas simple sobre TensorFlow. Estos serán migrados prontamente para ordenarlos en una sección específica.

- Experiencias explicadas en artículos Medium:

- “custom_model_object_detection” donde se propone la generación de un modelo personalizado para la detección de jugadores de fútbol, en concreto el artículo muestra la experiencia con Lionel Messi.
- “tie_dominant_color” esta experiencia utiliza un modelo de object detection y recorta elementos para luego analizar su color y entregar opciones al desarrollador.
- “tie_dominant_color” esta experiencia utiliza un modelo de object detection y recorta elementos para luego analizar su color y entregar opciones al desarrollador.

## Lista de Idiomas

- [English](/README.md)
- [Español](/translations/es-ES/README.md)
- [English](/README.md)
- [Español](/translations/es-ES/README.md)
43 changes: 43 additions & 0 deletions translations/it-IT/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/)
27 changes: 27 additions & 0 deletions translations/it-IT/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# TensorFlow Experiences

[![Build Status](https://travis-ci.org/nbortolotti/tensorflow-experiences.svg?branch=master)](https://travis-ci.org/nbortolotti/tensorflow-experiences) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/tensorflow-experiences/localized.svg)](https://crowdin.com/project/tensorflow-experiences) [![Slack](https://img.shields.io/badge/slack--channel-green.svg?logo=slack&longCache=true)](http://tensorflowexperiences.slack.com/)

## Overview

Within this repository you will find several sections representing the development experiences in TensorFlow that I have experienced.

Sections

- **Colaboratory**: here you can find some experiences represented in Colaboratory, the simplicity and flexibility of the tool make the development of examples and tests directly in the cloud proposed by Google very attractive.

- **Jupyter**: here you can find some examples in a pure Jupyter format, these examples often need some libraries and elements that are not totally compatible with Colaboratory and that require a traditional local environment.

- **experiences**: these experiences are directly related in an ebook where I’m also including academic content on many of these concepts related to TensorFlow and Machine Learning.

- **Python scripts and their tests**: there are some python scripts that represent simple practices on TensorFlow. These will be migrated promptly to order them in a specific section.

- Experiences explained in Medium articles:

- "custom_model_object_detection" where it is proposed, the generation of a personalized model for the detection of soccer players, specifically the article shows the experience with Lionel Messi.
- "tie_dominant_color" This experience uses an object detection model and trims elements to then analyze its color and deliver options to the developer.

## Translations

- [English](/README.md)
- [Español](/translations/es-ES/README.md)
6 changes: 6 additions & 0 deletions translations/it-IT/colaboratory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Colaboratory Overview

## Translations

- [English](/colaboratory/README.md)
- [Español](/translations/es-ES/colaboratory/README.md)
254 changes: 254 additions & 0 deletions translations/it-IT/colaboratory/exp_dinnerwithfriends_es.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "smQWTwI7k4Bf"
},
"source": [
"# Paso 1\n",
"**Configuracion de Object Detection API**: en este paso, se descarga el modelo para la detección de objetos, también se realizan algunas copias y eliminaciones de referencia con el objetivo de dejar todo el ambiente configurado."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "XnBVJiIzYune"
},
"outputs": [],
"source": [
"!git clone https://github.com/tensorflow/models.git\n",
"!apt-get -qq install libprotobuf-java protobuf-compiler\n",
"!protoc ./models/research/object_detection/protos/string_int_label_map.proto --python_out=.\n",
"!cp -R models/research/object_detection/ object_detection/\n",
"!rm -rf models"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "qwWt0kSihqCv"
},
"source": [
"# Paso 2\n",
"** Importaciones ** necesarias para ejecutar la demostración de Object Detection API"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "YspILW_rZu0v"
},
"outputs": [],
"source": [
"import numpy as np\n",
"import os\n",
"import six.moves.urllib as urllib\n",
"import sys\n",
"import tarfile\n",
"import tensorflow as tf\n",
"import zipfile\n",
"\n",
"from collections import defaultdict\n",
"from io import StringIO\n",
"from matplotlib import pyplot as plt\n",
"from PIL import Image\n",
"\n",
"from object_detection.utils import label_map_util\n",
"from object_detection.utils import visualization_utils as vis_util"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "kGx_08UcmtOF"
},
"source": [
"# Paso 3\n",
"** Configuración ** del modelo a utilizar, ruta al modelo pre-entrenado y elementos de configuración adicionales para la implementación de Object Detection API."
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "8n_alUkLZ1gl"
},
"outputs": [],
"source": [
"MODEL_NAME = 'faster_rcnn_inception_resnet_v2_atrous_coco_2018_01_28'\n",
"MODEL_FILE = MODEL_NAME + '.tar.gz'\n",
"DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/'\n",
"PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'\n",
"PATH_TO_LABELS = os.path.join('object_detection/data', 'mscoco_label_map.pbtxt')\n",
"NUM_CLASSES = 90\n",
"\n",
"opener = urllib.request.URLopener()\n",
"opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)\n",
"tar_file = tarfile.open(MODEL_FILE)\n",
"for file in tar_file.getmembers():\n",
" file_name = os.path.basename(file.name)\n",
" if 'frozen_inference_graph.pb' in file_name:\n",
" tar_file.extract(file, os.getcwd())\n",
" \n",
"detection_graph = tf.Graph()\n",
"with detection_graph.as_default():\n",
" od_graph_def = tf.GraphDef()\n",
" with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:\n",
" serialized_graph = fid.read()\n",
" od_graph_def.ParseFromString(serialized_graph)\n",
" tf.import_graph_def(od_graph_def, name='')\n",
" \n",
"label_map = label_map_util.load_labelmap(PATH_TO_LABELS)\n",
"categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)\n",
"category_index = label_map_util.create_category_index(categories)\n",
"\n",
"def load_image_into_numpy_array(image):\n",
" (im_width, im_height) = image.size\n",
" return np.array(image.getdata()).reshape(\n",
" (im_height, im_width, 3)).astype(np.uint8)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "PbXKPFiWh1jG"
},
"source": [
"# Paso 4\n",
"Sección con las imágenes de demostración"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!mkdir images\n",
"# esta url-imagen debería ser reemplazada por ustedes. este es solo el ejemplo almacenado en una capeta personal\n",
"!wget https://storage.googleapis.com/demostration_images/image.jpg -O images/image_1.jpg\n",
"\n",
"PATH_TO_TEST_IMAGES_DIR = 'images'\n",
"TEST_IMAGE_PATHS = [ os.path.join(PATH_TO_TEST_IMAGES_DIR, 'image_{}.jpg'.format(i)) for i in range(1, 2) ]\n",
"IMAGE_SIZE = (15, 11)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "_Vvi4-2fm2qe"
},
"source": [
"# Paso 5\n",
"Pieza de implementación que representa la detección concreta, llamando a la sesión TF"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "q9FZsaZkaPUz"
},
"outputs": [],
"source": [
"with detection_graph.as_default():\n",
" with tf.Session(graph=detection_graph) as sess:\n",
" image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')\n",
" detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0')\n",
" detection_scores = detection_graph.get_tensor_by_name('detection_scores:0')\n",
" detection_classes = detection_graph.get_tensor_by_name('detection_classes:0')\n",
" num_detections = detection_graph.get_tensor_by_name('num_detections:0')\n",
" for image_path in TEST_IMAGE_PATHS:\n",
" image = Image.open(image_path)\n",
" image_np = load_image_into_numpy_array(image)\n",
" image_np_expanded = np.expand_dims(image_np, axis=0)\n",
" (boxes, scores, classes, num) = sess.run(\n",
" [detection_boxes, detection_scores, detection_classes, num_detections],\n",
" feed_dict={image_tensor: image_np_expanded})\n",
" vis_util.visualize_boxes_and_labels_on_image_array(\n",
" image_np,\n",
" np.squeeze(boxes),\n",
" np.squeeze(classes).astype(np.int32),\n",
" np.squeeze(scores),\n",
" category_index,\n",
" use_normalized_coordinates=True,\n",
" line_thickness=3)\n",
" plt.figure(figsize=IMAGE_SIZE)\n",
" plt.imshow(image_np)"
]
}
],
"metadata": {
"accelerator": "GPU",
"celltoolbar": "Edit Metadata",
"colab": {
"collapsed_sections": [],
"default_view": {},
"name": "exp_dinnerwithfriends_es.ipynb",
"private_outputs": true,
"provenance": [
{
"file_id": "1Bj6OJGSurV75btUArmTyMJj_BDH7t4YY",
"timestamp": 1517210004227
}
],
"version": "0.3.2",
"views": {}
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Loading