Saravanan666/pypi-org huggingface dataset:
Package: tf-centernet
tf-centernetCenterNetimplementation with Tensorflow 2.Installpipinstaltf-centernetExampleObject detectionimportnumpyasnpimportPIL.Imageimportcenternet# Default: num_classes=80obj=centernet.ObjectDetection(num_classes=80)# Default: weights_path=None# num_classes=80 and weights_path=None: Pre-trained COCO model will be loaded.# Otherwise: User-defined weight file will be loaded.obj.load_weights(weights_path=None)img=np.array(PIL.Image.open('./data/sf.jpg'))[...,::-1]# The image with predicted bounding-boxes is created if `debug=True`boxes,classes,scores=obj.predict(img,debug=True)Pose estimationimportnumpyasnpimportPIL.Imageimportcenternet# Default: num_joints=17pe=centernet.PoseEstimation(num_joints=17)# Default: weights_path=None# num_joints=17 and weights_path=None: Pre-trained COCO model will be loaded.# Otherwise: User-defined weight file will be loaded.pe.load_weights(weights_path=None)# Adjust this for the better predictionpe.score_threshold=0.1img=np.array(PIL.Image.open('./data/chi.jpg'))[...,::-1]# The image with predicted keypoints is created if `debug=True`boxes,keypoints,scores=pe.predict(img,debug=True)TODOObject detectionPre-trained model for object detection with Hourglass-104Pose estimationPre-trained model for pose estimation with Hourglass-104DLA-34 backbone and pre-trained modelsTraining function and Loss definitionTraining data augmentation
Package: tfcg
tf_conceptual_graphCreate tensorflow(1.x) conceptual graph. Conceputual graph is not aimed to reconstruct a neural network. The main purpose of this conceputual graph is for treating a neural network as a heterogeneous graph. Once we can treat neural networks as heterogeneous graphs, we can apply graph neural network methods for them to predict inference results from trained neural networks. From the view point, we can optimize neural network structures.Installtion$pipinstalltfcgUsageread a graph_def object from object api(sess.graph_def)importnumpyasnpimporttensorflowastfimporttfcgwithtf.Graph().as_default()asgraph:model=tf.keras.Sequential()x=np.random.rand(128,28,28,3)model.add(tf.keras.layers.Conv2D(16,3,input_shape=[28,28,3],name='conv1'))model.add(tf.keras.layers.Conv2D(32,1,name='conv2'))model.add(tf.keras.layers.Conv2D(64,2,name='conv3'))model.add(tf.keras.layers.Conv2D(128,2,name='conv4'))model.add(tf.keras.layers.Flatten())model.add(tf.keras.layers.Dense(32,name='dense1'))model.add(tf.keras.layers.ReLU())model.add(tf.keras.layers.Dense(16,name='dense2'))x_p=tf.placeholder(tf.float32,[None,28,28,3],name='input')out_p=model(x_p)withtf.Session()assess:sess.run(tf.global_variables_initializer())o=sess.run(out_p,feed_dict={x_p:x})_=tf.identity(o,name="output")tf.io.write_graph(sess.graph,'./','train.pbtxt')parser=tfcg.from_graph_def(sess.graph_def)parser.dump_json("conceptual_graph.json")parser.dump_img("output.png")read a graph from a file, After dumpping a tensorflow graph file.importtfcgparser=tfcg.from_file("./train.pbtxt")parser.dump_json("conceptual_graph.json")mparser.dump_img("output.png")Examples
Package: tf-clahe
Tensorflow CLAHEContrast-limited adaptive histogram equalization implemented in tensorflow ops.Setuppipinstalltf_claheUseimporttensorflowastfimporttf_claheimg=tf.io.decode_image(tf.io.read_file('./path/to/your/img'))img_clahe=tf_clahe.clahe(img)Optimizing for GPU with XLAA considerable performance improvement can be achieved by using thegpu_optimizedflag
in combination with XLA compilation. For example:importtf_claheimporttensorflowastf@tf.function(experimental_compile=True)# Enable XLAdeffast_clahe(img):returntf_clahe.clahe(img,gpu_optimized=True)ReferencesS. M. Pizer, E. P. Amburn, J. D. Austin, et al.: Adaptive Histogram Equalization and Its Variations. Computer Vision, Graphics, and Image Processing 39 (1987) 355-368.Wikipedia: Adaptive Histogram Equalization
Package: tfclassify
TFClassify~~~~~~~~~~TFClassify is a document classification algorithm implementation.It uses word-hypervectors where each component is computed with a modifiedtf-idf weighting for a group of documents.* It is fast, faster then edit-distance or bayesian algorithms* It is reliable and refuses to guess on data it where the certainty is too low.* Very little data is required to start classification:copyright: 2006 by Florian Boesch.:license: GNU LGPL, see LICENSE for more details.
Package: tf-cli
Terraform CLI: KISS StyleSummaryThis is the design and implementation of providing simple and reliable terraform (tf) commands for devs ops that build, commit and push.tffiles. Terraform has hidden functionalities that devs may not be familar with. It shouldn't be the dev's responsibility to remember multiple commands every time they make a commit to terraform servers. That's why I decided to create a bash program orchestrated by python for devs to only remember a few commands.Usage: tf [OPTIONS]

Options:
  -b, --build   Test and fmt .tf code.
  -c, --commit  Make commits to local repo.
  -p, --push    Push tf data to server.
  --clean       Clean unnecessary tf files.
  --help        Show this message and exit.File InformationThe main directory that requires attention is thesrc/tfdirectory:api_methods.py- This files provides the users to see incoming messages by creating a global logger variable.cli_utils.py- Creates essential utilities forcli.pythat performs the system commands of the program.cli.py- Bootstrap function forcli_utils.py. This file mainly interacts with the user by running the commandtfand providing them[OPTIONS] -b -c -pin a pretty interface.How do I run the Program?NOTE : This code has only been tested on the latest Ubuntu operating system. Run on macOS at your own risk, but this program is not operational in Windows.Running on Virtual Env (venv)NOTE: You must have python3 installed to run these
commands. Infomation about python can be foundhere.Follow these instructions if you want to run the files using venv./build.sh

# run venv 
source tf_env/bin/activate 

# use the program as intended
tf [OPTIONS]Cleaning Virtual Env (venv) & Dependencies./clean.sh

# exit the virtual environment 
deactivateWho do I talk to?Name- Rooklyn KlineEmail-rkline2@umbc.edu
Package: tf-cloud-cli
TF Cloud CLIA simple CLI for interacting with the Terraform Cloud API.Currently only supports listing organizations, workspaces and updating the run mode for workspacesInstallpip install tf-cloud-cliToken SetupGet an API token from the Terraform cloud app.Token can either be set in an environment variable calledTF_TOKENor in a file named.credentials.confUsagetf_cloud_cli --help                                                                                                                                                                                         <aws:sensurance>
Usage: tf_cloud_cli [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  list-organizations
  organizationList Organizationstf_cloud_cli list-organizationsList Workspacestf_cloud_cli organization -o MyOrganization list-workspacesShow workspace detailstf_cloud_cli organization -o MyOrganization workspace -w my-workspace showSet local execution for workspacetf_cloud_cli organization -o MyOrganization workspace -w my-workspace set-local-execution
Package: tf-complex
tf-complexThis package was inspired by the work of Elizabeth Cole et al.:Image Reconstruction using an Unrolled DL Architecture including Complex-Valued Convolution and Activation Functions.
Please cite their work appropriately if you use this package.
The code for their work is availablehere.InstallationYou can installtf-complexusing pypi:pip install tf-complexExample useYou can define a complex convolution in the following way to use in one of your models:fromtf_complex.convolutionsimportComplexConv2Dconv=ComplexConv2D(16,3,padding='same',activation='crelu',)
Package: tf-complex-channels
TF Complex ChannelsTF complex channels contains a set of utility tools for working with complex numbers in a channel oriented way.This approach is proposed and described inthis blog post.The primary purpose of this library and approach is to allow the community to push forward with academic research on complex number neural networks without waiting on ml library development.Request for contributionsIf an operation you want is not supported, please submit an issue or open a pull requestBasic Usageimporttf_complex_channelsprint(x.dtype)# > tf.complex64print(x.shape)# > (1, 2, 3)x=complex_to_channels(x)print(x.dtype)# > tf.float64print(x.shape)# > (1, 2, 3, 2)DocumentationExamples
Package: tf-convex-polygon-iou-atuleu
tf-convex-polygon-iouConvex Polygons Intersection over Union (IoU) computation for tensorflow.This repository is a a generalization ofhttps://github.com/lilanxiao/Rotated_IoUto convex polygons, and ported to tensorflow 2.ApproachThe algorithm here may not be optimal, but only uses available tensorflow operations.The most complex parts are to compute the intersection of two convex polygon.As for the original work, it is based onLivermore, Califf, 1977. which remarks:Intersection of two convex polygons is a convex polygonA vertex from a polygon that is contained in the other polygon is a vertex of the intersection shape.An edge from a polygon that is contained in the other polygon is an edge in the intersection shape.Edge intersections between two polygons are vertices in the intersection shape.Therefore the algorithm here:Finds all vertices in a polygon that lies within the other, by computing thewinding number.Finds all intersection between edge other edges of the two polygons.Sorts all vertices in trigonometric order arround a point inside the polygon (die to duplicates, it cannot be ensured that it is the centroid of the polygon).To compute the IoU, one must finally compute the area of the intersection. The used formula is robust to duplicate vertices, if the order of vertices is right.Requirementstensorflow >= 2.8.0 # it may be lower, but it is not tested
Package: tf-core
# TextFlows Core Module #A [TextFlows](https://github.com/xflows/textflows/) package, which contains the core classes for representing an annotated document corpus, as well as text mining widgets (UI components) based on [NLTK](http://www.nltk.org/). The package can also be used with [ClowdFlows](https://github.com/xflows/clowdflows/) 2.0.[![Documentation Status](https://readthedocs.org/projects/rdm/badge/?version=latest)](http://docs.textflows.org/)Currently, the project contains several components for text preprocessing: tokenization, stop word removal, lemmatization, part-of-speech tagging, etc.## Installation, documentation ##Please find installation instructions, examples and API reference on [Read the Docs](http://docs.textflows.org/).## Note ##Please note that this is a research project and that drastic changes can be (and are) made pretty regularly. Changes are documented in the [CHANGELOG](CHANGELOG.md).Pull requests and issues are welcome.## Contributors to the tf_core package code ##Matic Perovšek (@mperice), Matej Martinc (@matejMartinc), Roman Orač (@romanorac)[Knowldge Technologies Department](http://kt.ijs.si), Jožef Stefan Institute, Ljubljana
Package: tfcoreml
tfcoremlis a python package for converting TensorFlow 1 graphs to the Core ML .mlmodel format when deployment target is either iOS12 or earlier.
Source code is available on Github:tf-coreml.InstallationThe method for installingtfcoremlfollows thestandard python package installation steps.
Once you have set up a python environment, run:pip install tfcoreml --upgradeMore Informationtf-coreml GitHub repositoryCore ML framework documentationcoremltools documentationMachine Learning at AppleTensorFlowLicense[Apache License 2.0](LICENSE)
Package: tf-core-p3
# TextFlows Core Module #A [TextFlows](https://github.com/xflows/textflows/) package, which contains the core classes for representing an annotated document corpus, as well as text mining widgets (UI components) based on [NLTK](http://www.nltk.org/). The package can also be used with [ClowdFlows](https://github.com/xflows/clowdflows/) 2.0.[![Documentation Status](https://readthedocs.org/projects/rdm/badge/?version=latest)](http://docs.textflows.org/)Currently, the project contains several components for text preprocessing: tokenization, stop word removal, lemmatization, part-of-speech tagging, etc.## Installation, documentation ##Please find installation instructions, examples and API reference on [Read the Docs](http://docs.textflows.org/).## Note ##Please note that this is a research project and that drastic changes can be (and are) made pretty regularly. Changes are documented in the [CHANGELOG](CHANGELOG.md).Pull requests and issues are welcome.## Contributors to the tf_core package code ##Matic Perovšek (@mperice), Matej Martinc (@matejMartinc), Roman Orač (@romanorac)[Knowldge Technologies Department](http://kt.ijs.si), Jožef Stefan Institute, Ljubljana
Package: tfd
## Introductiontfdis a python package containing a variety of modules that do not seem to
warrant their own distribution or package.  It provides a convenient namespace
to avoid conflicts with other modules and packages out there.This package is _alpha_ and its API is not stable.## ContributeFeel free to make a pull request on github.## RequirementsProbably Python 2.7 (since that is the only version it has been tested with.)## Installation### Install from pypi.python.orgDownload and install using pip:pip install tfd### Install from github.comUsing github, one can clone and install a specific version of the package:cd ~
git clonegit@github.com:todddeluca/tfd.git
cd tfd
python setup.py install## UsageAn example of usage from within a python module:import tfd.go
tfd.go.download()Please see the individual modules for more uses.
Package: tf-data-athena
Tensorflow Data for AWS AthenaAn AWS athena library fortensorflow.data.Dataset. If you don't knowtf.data, take a look atdocumentationand thisexample.How to useUse is almost as simple as another tf.Dataset implementation. You just need to create a dataset using the funcitoncreate_athena_datasetno (it followsaws authentication chain in boto3).# importsfromtf_data_athenaimportcreate_athena_dataset# connector parameterss3_output_location="s3://my-bucket/my-folder/athena-outputs"# Athena output bucket folderwaiting_interval=0.1# Time (in seconds) to wait before asking for query state# queryquery="select * from my_namespace.my_table"# create datasetdataset=create_athena_dataset(query,s3_output_location)Now,datasetis an instance oftf.data.Datasetcontaining query results.ParametersThen factory funcioncreate_athena_datasethas the following parameters:query: The query to be ran in athenas3_output_location: An s3 path with write access for the current account where the query results file will be savedwaiting_interval: A float number representing the number of seconds between to wait before ask for query status on athenanum_parallel_calls: Argument fortf.data.Dataset.map(see documentation) while parsing result rowsother named arguments: Any other named argument will be used ontf.data.TextLineDatasetconstructor, please, see documentation.AWS AuthorizationThis library usesboto3behind the scenes, then, it follows the same authentication/authorization chain.
Authorized user or service needs permission tocreate and execute athena queriesandcreate and read s3 objectsin the folder defined bys3_output_location.
Package: tf-datachain
tf-datachaintf-datachainis a local dataset loader based ontf.datainput pipeline. It handles the job of reading and encoding data direct in your disk and simplify the processing by providing several predefined methods.Object Detectionfromtf_datachainimportObjectDetectionasodBefore usingObjectDetectionfunctions, you have to define some basic information, like folder path and class name list.od.imageFolder="data/images"# hard-code class namesod.classNames=["class1","class2","class3"]# or read them from csv fileimportpandasaspdod.classNames=pd.read_csv("class.csv",header=None).iloc[:,0].values.tolist()Then, a ready-to-usetf.datainput pipeline can be built within 3 steps:Preparation: prepare the list to process without reading content.Data Loading: load data from prepared list viatf.data.Augmentation: shuffle, batch, and resize.The best practices to load dataset with different format are shown below.Pascal VOC XML Formatfromtf_datachain.utilsimportsplitBATCH_SIZE=4# read .xml file within data/annotaions folder# then split them with the ratio of 6:2:2trainDataset,validationDataset,testDataset=split(od.prepareAnnotation("data/annotations",".xml"),6,2,2)trainDataset=tf.data.Dataset.from_tensor_slices(trainDataset)trainDataset=trainDataset.map(lambdadata:od.loadData(data,"Pascal VOC XML","xyxy"),num_parallel_calls=tf.data.AUTOTUNE)# shuffle, ragged batch, and jittered resizetrainDataset=od.datasetProcessing(trainDataset,BATCH_SIZE,"Jittered Resize",(960,960),"xyxy")trainDataset=trainDataset.prefetch(tf.data.AUTOTUNE)Visualize Dataset# visualize single datafordataindataset.take(1):visualizeData(data,"xyxy")# visualize dataset shown in 2x2 gridvisualizeDataset(dataset,"xyxy",rows=2,cols=2)
Package: tfdbnet
TFDBNetA TensorFlow 2 reimplementation ofReal-time Scene Text Detection with Differentiable Binarizationavailable as a Python package and usingTedEvalas evaluation metrics.Data PreparationStore images inimgsfolder and groundtruths ingtsfolder. Then, prepare text files for training and validate data in the following format with '\t' as a separator:Example for ICDAR 2015train.txt:./datasets/train/train_imgs/img_1.jpg	./datasets/train/train_gts/gt_img_1.txt
./datasets/train/train_imgs/img_2.jpg	./datasets/train/train_gts/gt_img_2.txtExample for ICDAR 2015validate.txt:./datasets/validate/validate_imgs/img_1.jpg	./datasets/validate/validate_gts/gt_img_1.txt
./datasets/validate/validate_imgs/img_2.jpg	./datasets/validate/validate_gts/gt_img_2.txtYou can customize the script indir2paths.shto generate the abovetrain.txtandvalidate.txtfor your own dataset. And the groundtruths can be.txtfiles, with the following format:x1, y1, x2, y2, x3, y3, x4, y4, annotationBelow is the content of./datasets/train/train_gts/gt_img_1.txt:377,117,463,117,465,130,378,130,Genaxis Theatre
493,115,519,115,519,131,493,131,[06]
374,155,409,155,409,170,374,170,###
492,151,551,151,551,170,492,170,62-03
376,198,422,198,422,212,376,212,Carpark
494,190,539,189,539,205,494,206,###
374,1,494,0,492,85,372,86,###Quick Startpip install tfdbnetAfter above installation, see thedemoon ICDAR 2015 dataset to know how to useReferencehttps://github.com/MhLiao/DBhttps://github.com/zonasw/DBNethttps://github.com/WenmuZhou/DBNet.pytorchhttps://github.com/xuannianz/DifferentiableBinarizationhttps://github.com/clovaai/TedEval
Package: tfdbonas
Tensorflow(1.x) Deep Bayes Optimization for Neural Network Architecture Search (tfDBONAS)Installation$# Not yet provided.$pipinstalltfdbonasRequirementstnng >= 0.3.0tfcgstellargraphReferenceshttps://arxiv.org/abs/1502.05700https://arxiv.org/abs/1905.13403https://arxiv.org/abs/1905.06159
Package: tfdevops
tfdevopsTerraform support for Amazon DevOps Guru. The service natively only supports AWS CloudFormation stacks.https://aws.amazon.com/devops-guru/features/This project provides support for terraform users by automatically
converting terraform state to an imported CloudFormation stack
and optionally enabling it with DevOps guru.Note Amazon DevOps Guru only supports roughly 25 resources.https://aws.amazon.com/devops-guru/pricing/How it worksTranslates terraform state into a CloudFormation template with a retain deletion policyCreates a CloudFormation stack with imported resourcesEnrolls the stack into Amazon DevOps GuruUsageInstall it.pip install tfdevopsYou've got a deployed terraform root module extant, let's generate a CloudFormation template and a set of importable resources for ittfdevops cfn -d ~/path/to/terraform/module --template mycfn.json --resources importable-ids.jsonAnd now we can go ahead and create a CloudFormation stack, import resources, and activate DevOps Guru on our stack.tfdevops deploy --template mycfn.json --resources importable-ids.json
...
INFO:tfdevops:Found existing stack, state:IMPORT_COMPLETE
INFO:tfdevops:Creating import change set, 8 resources to import
INFO:tfdevops:Executing change set to import resources
INFO:tfdevops:Waiting for import to complete
INFO:tfdevops:Cloudformation Stack Deployed - Terraform resources importedYou can now visit the stack in the DevOps Guru dashboard.Depending on the level activity of the resources it can take DevOps Guru a few hours to generate any actionable insight.As a bonus, we can validate the generated template (or any other pure CloudFormation template, aka sans intrinsics funcs or vars ), with the following
command, which will download the jsonschema for the various resource types and validate each template resource against its schema.tfdevops validate --template mycfn.jsonLarge Resource/TemplatesAWS CloudFormation has various size limitations (50k api upload, 500k s3 upload) on the resource size it supports, both thegenanddeploysubcommands support passing
in an s3 path for the template and some resources which have larger configuration (step function workflows, etc). Note the s3 path for deploy is the actual template
path.FAQIs this a generic terraform to CloudFormation converter?No, while it has some facilities that resemble that, its very targeted at simply producing enough cfn to make Amazon DevOps Guru work.Supported resourcesAt the moment tfdevops supports the following resourcesAWS::StepFunctions::StateMachineAWS::ECS::ServiceAWS::SQS::QueueAWS::SNS::TopicAWS::RDS::DBInstanceAWS::Lambda::FunctionAWS::Events::RuleAWS::DynamoDB::Table