code
stringlengths
501
5.19M
package
stringlengths
2
81
path
stringlengths
9
304
filename
stringlengths
4
145
115 Wangpan =========== |Build| |PyPI version| 115 Wangpan (115网盘 or 115云) is an unofficial Python API and SDK for 115.com. Supported Python verisons are 2.6, 2.7, 3.3, 3.4. * Documentation: http://115wangpan.readthedocs.org * GitHub: https://github.com/shichao-an/115wangpan * PyPI: https://pypi.python.org/pypi/115w...
115wangpan
/115wangpan-0.7.6.tar.gz/115wangpan-0.7.6/README.rst
README.rst
Changelog ========= 0.7.6 (2015-08-01) ------------------ - Fixed DRY_RUN message print by using print_msg that handles PY2 and PY3 strings - Added -F/--files-only option to 115 down - Fixed files_only parse error - Fixed unexpected kwargs for get_tasks - Fixed Task against added 'url' attr 0.7.5 (2015-07-02) ------...
115wangpan
/115wangpan-0.7.6.tar.gz/115wangpan-0.7.6/CHANGELOG.rst
CHANGELOG.rst
from __future__ import print_function, absolute_import import humanize import inspect import json import logging import os import re import requests import time from hashlib import sha1 from bs4 import BeautifulSoup from requests.cookies import RequestsCookieJar from u115 import conf from u115.utils import (get_timest...
115wangpan
/115wangpan-0.7.6.tar.gz/115wangpan-0.7.6/u115/api.py
api.py
import functools import os import pickle import subprocess import re from collections import UserDict from typing import Callable from colorit import * from prompt_toolkit import prompt from prompt_toolkit.completion import WordCompleter from prompt_toolkit.shortcuts import yes_no_dialog from greeting import * from hel...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/Notepad.py
Notepad.py
import pickle import re from datetime import datetime, timedelta from colorit import * from prompt_toolkit import prompt from prompt_toolkit.completion import WordCompleter from prompt_toolkit.shortcuts import yes_no_dialog from Notepad import * from addressbook import * from greeting import greeting from help import...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/main.py
main.py
import pickle import re from collections import UserDict from datetime import datetime from colorit import * colorit.init_colorit() class Error(Exception): #власне виключення pass # def __str__(self) -> str: # return "\n \nSomething went wrong\n Try again!\n" class Field: def __init...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/addressbook.py
addressbook.py
greeting = """ @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ #@@@@ @@@@@@@@@@@@@@@@@@@@ ...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/greeting.py
greeting.py
from pathlib import Path import shutil import os from colorit import * import sys name_extensions = { "images": (".jpeg", ".png", ".jpg", ".svg"), "video": (".avi", ".mp4", ".mov", ".mkv"), "documents": (".doc", ".docx", ".pdf", ".xlsx", ".pptx", ".txt"), "music": (".mp3", ".ogg", ".wav", ".amr"), ...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/sort.py
sort.py
from colorit import * from prettytable import PrettyTable def pers_assistant_help(): pah_com_list = {"tel_book":"TELEPHONE BOOK", "note_book": "NOTE BOOK", "sorted": "SORTED"} all_commands = { "1":[ ["show all", "This command shows all contacts in your address book", "show all"], ...
11Team-AssistantBot
/11Team_AssistantBot-1.11.tar.gz/11Team_AssistantBot-1.11/11Team_AssistantBot/help.py
help.py
import sys, platform, os, re if not sys.version_info >= (3, 6): sys.exit('Python 3.6 or higher is required!') try: import eldf except ImportError: sys.exit("Module eldf is not installed!\nPlease install it using this command:\n" + (sys.platform == 'win32')*(os.path.dirname(sys.executable) + '\\Scripts\\')...
11l
/11l-2021.3-py3-none-any.whl/11l.py
11l.py
try: from python_to_11l.tokenizer import Token import python_to_11l.tokenizer as tokenizer except ImportError: from tokenizer import Token import tokenizer from typing import List, Tuple, Dict, Callable from enum import IntEnum import os, re, eldf class Scope: parent : 'Scope' class Var: ...
11l
/11l-2021.3-py3-none-any.whl/python_to_11l/parse.py
parse.py
from typing import List, Tuple Char = str from enum import IntEnum keywords = [ # https://docs.python.org/3/reference/lexical_analysis.html#keywords 'False', 'await', 'else', 'import', 'pass', 'None', 'break', 'except', 'in', 'raise', 'Tru...
11l
/11l-2021.3-py3-none-any.whl/python_to_11l/tokenizer.py
tokenizer.py
try: from tokenizer import Token import tokenizer except ImportError: from .tokenizer import Token from . import tokenizer from typing import List, Tuple, Dict, Callable, Set from enum import IntEnum import os, eldf class Error(Exception): def __init__(self, message, token): self.message =...
11l
/11l-2021.3-py3-none-any.whl/_11l_to_cpp/parse.py
parse.py
R""" После данной обработки отступы перестают играть роль — границу `scope` всегда определяют фигурные скобки. Также здесь выполняется склеивание строк, и таким образом границу statement\утверждения задаёт либо символ `;`, либо символ новой строки (при условии, что перед ним не стоит символ `…`!). ===================...
11l
/11l-2021.3-py3-none-any.whl/_11l_to_cpp/tokenizer.py
tokenizer.py
from io import BytesIO from django.core.files.images import ImageFile from faker.providers import BaseProvider from x11x_wagtail_blog.models import AboutTheAuthor class X11XWagtailBlogProvider(BaseProvider): """ Provider for the wonderful faker library. Add `X11XWagtailBlogProvider` to a standard faker to g...
11x-wagtail-blog
/11x_wagtail_blog-0.2.0-py3-none-any.whl/x11x_wagtail_blog/fakers.py
fakers.py
from django.conf import settings from django.db import models from django.utils import timezone from modelcluster.fields import ParentalKey from wagtail.admin.panels import FieldPanel, InlinePanel from wagtail.fields import StreamField, RichTextField from wagtail.models import Page from wagtail.snippets.blocks import S...
11x-wagtail-blog
/11x_wagtail_blog-0.2.0-py3-none-any.whl/x11x_wagtail_blog/models.py
models.py
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import modelcluster.fields import wagtail.fields import wagtail.snippets.blocks import x11x_wagtail_blog.models class Migration(migrations.Migration): initial = True depend...
11x-wagtail-blog
/11x_wagtail_blog-0.2.0-py3-none-any.whl/x11x_wagtail_blog/migrations/0001_initial.py
0001_initial.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
12-distributions
/12_distributions-0.1.tar.gz/12_distributions-0.1/12_distributions/Gaussiandistribution.py
Gaussiandistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution std...
12-distributions
/12_distributions-0.1.tar.gz/12_distributions-0.1/12_distributions/Binomialdistribution.py
Binomialdistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
12-test
/12@test-0.1.tar.gz/12@test-0.1/distributions/Gaussiandistribution.py
Gaussiandistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution std...
12-test
/12@test-0.1.tar.gz/12@test-0.1/distributions/Binomialdistribution.py
Binomialdistribution.py
![Logo](https://storage.googleapis.com/tf_model_garden/tf_model_garden_logo.png) # TensorFlow Research Models This directory contains code implementations and pre-trained models of published research papers. The research models are maintained by their respective authors. ## Table of Contents - [TensorFlow Research ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/README.md
README.md
"""Build and train mobilenet_v1 with options for quantization.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from tensorflow.contrib import quantize as contrib_quantize from datasets import dat...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet_v1_train.py
mobilenet_v1_train.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim def block35(net, scale=1.0, activation_fn=tf.nn.relu, scope=None, reuse=None): """Builds the 35x35 resnet block.""" with tf.variable_scope(scope, ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_resnet_v2.py
inception_resnet_v2.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import i3d_utils # pylint: disable=g-long-lambda trunc_normal = lambda stddev: tf.truncated_normal_initializer( 0.0, stddev) conv3d_spati...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/s3dg.py
s3dg.py
"""Utilities for building I3D network models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v1 as tf import tf_slim as slim add_arg_scope = slim.add_arg_scope layers = slim.layers def center_initializer():...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/i3d_utils.py
i3d_utils.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import tensorflow.compat.v1 as tf import tf_slim as slim def pix2pix_arg_scope(): """Returns a default argument scope for isola_net. Returns: An arg scope. """ ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/pix2pix.py
pix2pix.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow.compat.v1 as tf import tf_slim as slim class Block(collections.namedtuple('Block', ['scope', 'unit_fn', 'args'])): """A named tuple describing a ResNet block. Its par...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/resnet_utils.py
resnet_utils.py
"""Contains a factory for building various models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import tf_slim as slim from nets import alexnet from nets import cifarnet from nets import i3d from nets import inception from nets import...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/nets_factory.py
nets_factory.py
"""Contains the definition for inception v2 classification network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import inception_utils # pylint: disable=g-long-lambda trunc_normal =...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v2.py
inception_v2.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim def inception_arg_scope( weight_decay=0.00004, use_batch_norm=True, batch_norm_decay=0.9997, batch_norm_epsilon=0.001, activation_f...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_utils.py
inception_utils.py
"""Contains the definition for inception v1 classification network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import inception_utils # pylint: disable=g-long-lambda trunc_normal =...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v1.py
inception_v1.py
"""Validate mobilenet_v1 with options for quantization.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import tensorflow.compat.v1 as tf import tf_slim as slim from tensorflow.contrib import quantize as contrib_quantize from datasets impor...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet_v1_eval.py
mobilenet_v1_eval.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import inception_utils def block_inception_a(inputs, scope=None, reuse=None): """Builds Inception-A block for Inception v4 network.""" #...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v4.py
inception_v4.py
"""Export quantized tflite model from a trained checkpoint.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools from absl import app from absl import flags import tensorflow.compat.v1 as tf import tensorflow_datasets as tfds from nets import...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/post_training_quantization.py
post_training_quantization.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim # pylint: disable=g-long-lambda trunc_normal = lambda stddev: tf.truncated_normal_initializer( 0.0, stddev) def overfeat_arg_scope(weight_decay=0....
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/overfeat.py
overfeat.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import i3d_utils from nets import s3dg # pylint: disable=g-long-lambda trunc_normal = lambda stddev: tf.truncated_normal_initializer( 0.0...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/i3d.py
i3d.py
"""Contains a variant of the CIFAR-10 model definition.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim # pylint: disable=g-long-lambda trunc_normal = lambda stddev: tf.truncated_normal_initialize...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/cifarnet.py
cifarnet.py
"""Defines the CycleGAN generator and discriminator networks.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow.compat.v1 as tf import tf_slim as slim fro...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/cyclegan.py
cyclegan.py
"""Contains the definition for inception v3 classification network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import inception_utils # pylint: disable=g-long-lambda trunc_normal =...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v3.py
inception_v3.py
"""Contains a variant of the LeNet model definition.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim def lenet(images, num_classes=10, is_training=False, dropout_keep_prob=0.5, ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/lenet.py
lenet.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import resnet_utils resnet_arg_scope = resnet_utils.resnet_arg_scope class NoOpScope(object): """No-op context manager.""" def __ente...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/resnet_v1.py
resnet_v1.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim # pylint: disable=g-long-lambda trunc_normal = lambda stddev: tf.truncated_normal_initializer( 0.0, stddev) def alexnet_v2_arg_scope(weight_decay=...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/alexnet.py
alexnet.py
"""DCGAN generator and discriminator from https://arxiv.org/abs/1511.06434.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from math import log from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow.compat.v1 as tf import tf...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/dcgan.py
dcgan.py
# Tensorflow mandates these. from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import namedtuple import functools import tensorflow.compat.v1 as tf import tf_slim as slim # Conv and DepthSepConv namedtuple define layers of the MobileNet arch...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet_v1.py
mobilenet_v1.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim from nets import resnet_utils resnet_arg_scope = resnet_utils.resnet_arg_scope @slim.add_arg_scope def bottleneck(inputs, depth, depth_bottleneck, st...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/resnet_v2.py
resnet_v2.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim def vgg_arg_scope(weight_decay=0.0005): """Defines the VGG arg scope. Args: weight_decay: The l2 regularization coefficient. Returns: A...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/vgg.py
vgg.py
"""Convolution blocks for mobilenet.""" import contextlib import functools import tensorflow.compat.v1 as tf import tf_slim as slim def _fixed_padding(inputs, kernel_size, rate=1): """Pads the input along the spatial dimensions independently of input size. Pads the input such that if it was used in a convolutio...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet/conv_blocks.py
conv_blocks.py
"""Mobilenet Base Class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import contextlib import copy import os import tensorflow.compat.v1 as tf import tf_slim as slim @slim.add_arg_scope def apply_activation(x, name=None, activati...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet/mobilenet.py
mobilenet.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import functools import numpy as np import tensorflow.compat.v1 as tf import tf_slim as slim from nets.mobilenet import conv_blocks as ops from nets.mobilenet import mobilenet as lib op = lib.op ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet/mobilenet_v3.py
mobilenet_v3.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import functools import tensorflow.compat.v1 as tf import tf_slim as slim from nets.mobilenet import conv_blocks as ops from nets.mobilenet import mobilenet as lib op = lib.op expand_input = ops...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/mobilenet/mobilenet_v2.py
mobilenet_v2.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import tensorflow.compat.v1 as tf import tf_slim as slim from tensorflow.contrib import training as contrib_training from nets.nasnet import nasnet_utils arg_scope = slim.arg_scope # Notes for t...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/nasnet/nasnet.py
nasnet.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf import tf_slim as slim arg_scope = slim.arg_scope DATA_FORMAT_NCHW = 'NCHW' DATA_FORMAT_NHWC = 'NHWC' INVALID = 'null' # The cap for tf.clip_by_value, it's hinted from the ac...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/nasnet/nasnet_utils.py
nasnet_utils.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import tensorflow.compat.v1 as tf import tf_slim as slim from tensorflow.contrib import training as contrib_training from nets.nasnet import nasnet from nets.nasnet import nasnet_utils arg_scope =...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/nasnet/pnasnet.py
pnasnet.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf _PADDING = 4 def preprocess_for_train(image, output_height, output_width, padding=_PADDING, ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/preprocessing/cifarnet_preprocessing.py
cifarnet_preprocessing.py
"""Contains a factory for building various models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from preprocessing import cifarnet_preprocessing from preprocessing import inception_preprocessing from preprocessing import lenet_preprocessing from prepr...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/preprocessing/preprocessing_factory.py
preprocessing_factory.py
"""Provides utilities to preprocess images for the Inception networks.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf from tensorflow.python.ops import control_flow_ops def apply_with_random_selector(x, func, num_cas...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/preprocessing/inception_preprocessing.py
inception_preprocessing.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf _R_MEAN = 123.68 _G_MEAN = 116.78 _B_MEAN = 103.94 _RESIZE_SIDE_MIN = 256 _RESIZE_SIDE_MAX = 512 def _crop(image, offset_height, offset_width, crop_height, crop_width): ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/preprocessing/vgg_preprocessing.py
vgg_preprocessing.py
r"""Downloads and converts MNIST data to TFRecords of TF-Example protos. This module downloads the MNIST data, uncompresses it, reads the files that make up the MNIST data and creates two TFRecord datasets: one for train and one for test. Each TFRecord dataset is comprised of a set of TF-Example protocol buffers, each...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/download_and_convert_mnist.py
download_and_convert_mnist.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow.compat.v1 as tf import tf_slim as slim from datasets import dataset_utils _FILE_PATTERN = 'cifar10_%s.tfrecord' SPLITS_TO_SIZES = {'train': 50000, 'test': 10000} _NUM_CLASSES = 1...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/cifar10.py
cifar10.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from six.moves import urllib import tensorflow.compat.v1 as tf import tf_slim as slim from datasets import dataset_utils # TODO(nsilberman): Add tfrecord file type once the script is updated. _FILE_...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/imagenet.py
imagenet.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow.compat.v1 as tf import tf_slim as slim from datasets import dataset_utils _FILE_PATTERN = 'mnist_%s.tfrecord' _SPLITS_TO_SIZES = {'train': 60000, 'test': 10000} _NUM_CLASSES = 10...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/mnist.py
mnist.py
r"""Downloads and converts Flowers data to TFRecords of TF-Example protos. This module downloads the Flowers data, uncompresses it, reads the files that make up the Flowers data and creates two TFRecord datasets: one for train and one for test. Each TFRecord dataset is comprised of a set of TF-Example protocol buffers...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/download_and_convert_flowers.py
download_and_convert_flowers.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob import os.path import sys import xml.etree.ElementTree as ET from six.moves import xrange # pylint: disable=redefined-builtin class BoundingBox(object): pass def GetItem(name, root, index=0):...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/process_bounding_boxes.py
process_bounding_boxes.py
r"""Downloads and converts VisualWakewords data to TFRecords of TF-Example protos. This module downloads the COCO dataset, uncompresses it, derives the VisualWakeWords dataset to create two TFRecord datasets: one for train and one for test. Each TFRecord dataset is comprised of a set of TF-Example protocol buffers, ea...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/download_and_convert_visualwakewords.py
download_and_convert_visualwakewords.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow.compat.v1 as tf import tf_slim as slim from datasets import dataset_utils _FILE_PATTERN = '%s.record-*' _SPLITS_TO_SIZES = { 'train': 82783, 'val': 40504, } _ITEMS_TO_D...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/visualwakewords.py
visualwakewords.py
"""Contains utilities for downloading and converting datasets.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import tarfile import zipfile from six.moves import urllib import tensorflow.compat.v1 as tf LABELS_FILENAME = 'labels.tx...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/dataset_utils.py
dataset_utils.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow.compat.v1 as tf import tf_slim as slim from datasets import dataset_utils _FILE_PATTERN = 'flowers_%s_*.tfrecord' SPLITS_TO_SIZES = {'train': 3320, 'validation': 350} _NUM_CLASSE...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/flowers.py
flowers.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import os import random import sys import threading import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow.compat.v1 as tf tf.app...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/build_imagenet_data.py
build_imagenet_data.py
r"""Downloads and converts cifar10 data to TFRecords of TF-Example protos. This module downloads the cifar10 data, uncompresses it, reads the files that make up the cifar10 data and creates two TFRecord datasets: one for train and one for test. Each TFRecord dataset is comprised of a set of TF-Example protocol buffers...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/download_and_convert_cifar10.py
download_and_convert_cifar10.py
r"""Helper functions to generate the Visual WakeWords dataset. It filters raw COCO annotations file to Visual WakeWords Dataset annotations. The resulting annotations and COCO images are then converted to TF records. See download_and_convert_visualwakewords.py for the sample usage. """ from __future__ ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/download_and_convert_visualwakewords_lib.py
download_and_convert_visualwakewords_lib.py
r"""Process the ImageNet Challenge bounding boxes for TensorFlow model training. Associate the ImageNet 2012 Challenge validation data set with labels. The raw ImageNet validation data set is expected to reside in JPEG files located in the following directory structure. data_dir/ILSVRC2012_val_00000001.JPEG data_d...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/datasets/preprocess_imagenet_validation_data.py
preprocess_imagenet_validation_data.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow.compat.v1 as tf import tf_slim as slim __all__ = ['create_clones', 'deploy', 'optimize_clones', 'DeployedModel', 'DeploymentCo...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/deployment/model_deploy.py
model_deploy.py
r"""Creates and runs `Estimator` for object detection model on TPUs. This uses the TPUEstimator API to define and run a model in TRAIN/EVAL modes. """ # pylint: enable=line-too-long from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags imp...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/model_tpu_main.py
model_tpu_main.py
"""Common utility functions for evaluation.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import os import re import time import numpy as np from six.moves import range import tensorflow.compat.v1 as tf import tf_slim as slim from ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/eval_util.py
eval_util.py
"""Functions to export object detection inference graph.""" import os import tempfile import tensorflow.compat.v1 as tf import tf_slim as slim from tensorflow.core.protobuf import saver_pb2 from tensorflow.python.tools import freeze_graph # pylint: disable=g-direct-tensorflow-import from object_detection.builders imp...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/exporter.py
exporter.py
r"""Tool to export an object detection model for inference. Prepares an object detection tensorflow graph for inference using model configuration and a trained checkpoint. Outputs inference graph, associated checkpoint files, a frozen inference graph and a SavedModel (https://tensorflow.github.io/serving/serving_basi...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/export_inference_graph.py
export_inference_graph.py
r"""Tool to export an object detection model for inference. Prepares an object detection tensorflow graph for inference using model configuration and a trained checkpoint. Outputs associated checkpoint files, a SavedModel, and a copy of the model config. The inference graph contains one of three input nodes dependin...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/exporter_main_v2.py
exporter_main_v2.py
import os import tempfile import numpy as np import tensorflow.compat.v1 as tf from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework import types_pb2 from tensorflow.core.protobuf import saver_pb2 from object_detection import exporter from object_detection.builders import graph_rewriter_bu...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/export_tflite_ssd_graph_lib.py
export_tflite_ssd_graph_lib.py
"""Model input function for tf-learn object detection model.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import tensorflow.compat.v1 as tf from object_detection.builders import dataset_builder from object_detection.builders import i...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/inputs.py
inputs.py
r"""Constructs model, inputs, and training environment.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import functools import os import tensorflow.compat.v1 as tf import tensorflow.compat.v2 as tf2 import tf_slim as slim from object_detec...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/model_lib.py
model_lib.py
r"""Constructs model, inputs, and training environment.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import os import pprint import time import numpy as np import tensorflow.compat.v1 as tf from object_detection import eval_util from obj...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/model_lib_v2.py
model_lib_v2.py
r"""Creates and runs TF2 object detection models. For local training/evaluation run: PIPELINE_CONFIG_PATH=path/to/pipeline.config MODEL_DIR=/tmp/model_outputs NUM_TRAIN_STEPS=10000 SAMPLE_1_OF_N_EVAL_EXAMPLES=1 python model_main_tf2.py -- \ --model_dir=$MODEL_DIR --num_train_steps=$NUM_TRAIN_STEPS \ --sample_1_of...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/model_main_tf2.py
model_main_tf2.py
r"""Exports an SSD detection model to use with tf-lite. Outputs file: * A tflite compatible frozen graph - $output_directory/tflite_graph.pb The exported graph has the following input and output nodes. Inputs: 'normalized_input_image_tensor': a float32 tensor of shape [1, height, width, 3] containing the normalized ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/export_tflite_ssd_graph.py
export_tflite_ssd_graph.py
"""Library to export TFLite-compatible SavedModel from TF2 detection models.""" import os import numpy as np import tensorflow.compat.v1 as tf1 import tensorflow.compat.v2 as tf from object_detection.builders import model_builder from object_detection.builders import post_processing_builder from object_detection.core ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/export_tflite_graph_lib_tf2.py
export_tflite_graph_lib_tf2.py
"""Binary to run train and evaluation on object detection model.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags import tensorflow.compat.v1 as tf from object_detection import model_lib flags.DEFINE_string( 'model_dir', None...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/model_main.py
model_main.py
"""Functions to export object detection inference graph.""" import ast import os import tensorflow.compat.v2 as tf from object_detection.builders import model_builder from object_detection.core import standard_fields as fields from object_detection.data_decoders import tf_example_decoder from object_detection.utils i...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/exporter_lib_v2.py
exporter_lib_v2.py
r"""Exports TF2 detection SavedModel for conversion to TensorFlow Lite. Link to the TF2 Detection Zoo: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md The output folder will contain an intermediate SavedModel that can be used with the TfLite converter. NOTE: This ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/export_tflite_graph_tf2.py
export_tflite_graph_tf2.py
import tensorflow.compat.v1 as tf from object_detection.core import matcher from object_detection.utils import shape_utils class ArgMaxMatcher(matcher.Matcher): """Matcher based on highest value. This class computes matches from a similarity matrix. Each column is matched to a single row. To support object...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/matchers/argmax_matcher.py
argmax_matcher.py
import tensorflow.compat.v1 as tf from tensorflow.contrib.image.python.ops import image_ops from object_detection.core import matcher class GreedyBipartiteMatcher(matcher.Matcher): """Wraps a Tensorflow greedy bipartite matcher.""" def __init__(self, use_matmul_gather=False): """Constructs a Matcher. A...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/matchers/bipartite_matcher.py
bipartite_matcher.py
r"""Utilities for creating TFRecords of TF examples for the Open Images dataset. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import tensorflow.compat.v1 as tf from object_detection.core import standard_fields from object_detection.utils i...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/oid_tfrecord_creation.py
oid_tfrecord_creation.py
r"""Convert the Oxford pet dataset to TFRecord for object_detection. See: O. M. Parkhi, A. Vedaldi, A. Zisserman, C. V. Jawahar Cats and Dogs IEEE Conference on Computer Vision and Pattern Recognition, 2012 http://www.robots.ox.ac.uk/~vgg/data/pets/ Example usage: python object_detection/dataset_t...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_pet_tf_record.py
create_pet_tf_record.py
r"""Code to download and parse the AVA Actions dataset for TensorFlow models. The [AVA Actions data set]( https://research.google.com/ava/index.html) is a dataset for human action recognition. This script downloads the annotations and prepares data from similar annotations if local video files are available. The vid...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_ava_actions_tf_record.py
create_ava_actions_tf_record.py
r"""Convert raw KITTI detection dataset to TFRecord for object_detection. Converts KITTI detection dataset to TFRecords with a standard format allowing to use this dataset to train object detectors. The raw dataset can be downloaded from: http://kitti.is.tue.mpg.de/kitti/data_object_image_2.zip. http://kitti....
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_kitti_tf_record.py
create_kitti_tf_record.py
r"""Convert raw COCO dataset to TFRecord for object_detection. This tool supports data generation for object detection (boxes, masks), keypoint detection, and DensePose. Please note that this tool creates sharded output files. Example usage: python create_coco_tf_record.py --logtostderr \ --train_image_dir...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_coco_tf_record.py
create_coco_tf_record.py
r"""Creates TFRecords of Open Images dataset for object detection. Example usage: python object_detection/dataset_tools/create_oid_tf_record.py \ --input_box_annotations_csv=/path/to/input/annotations-human-bbox.csv \ --input_image_label_annotations_csv=/path/to/input/annotations-label.csv \ --input_imag...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_oid_tf_record.py
create_oid_tf_record.py
r"""Convert raw PASCAL dataset to TFRecord for object_detection. Example usage: python object_detection/dataset_tools/create_pascal_tf_record.py \ --data_dir=/home/user/VOCdevkit \ --year=VOC2012 \ --output_path=/home/user/pascal.record """ from __future__ import absolute_import from __fut...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/create_pascal_tf_record.py
create_pascal_tf_record.py
r"""An executable to expand image-level labels, boxes and segments. The expansion is performed using class hierarchy, provided in JSON file. The expected file formats are the following: - for box and segment files: CSV file is expected to have LabelName field - for image-level labels: CSV file is expected to have Lab...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py
oid_hierarchical_labels_expansion.py
"""Common utility for object detection tf.train.SequenceExamples.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v1 as tf def context_float_feature(ndarray): """Converts a numpy float array to a context flo...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/seq_example_util.py
seq_example_util.py
r"""A Beam job to generate detection data for camera trap images. This tools allows to run inference with an exported Object Detection model in `saved_model` format and produce raw detection boxes on images in tf.Examples, with the assumption that the bounding box class label will match the image-level class label in ...
123-object-detection
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/dataset_tools/context_rcnn/generate_detection_data.py
generate_detection_data.py