Having Problem in TensorFlow-Tutorials-Image segmentation - image-segmentation

I'm using a jupyter notebook.
I followed the code below and entered it.
pip install git+https://github.com/tensorflow/examples.git
import tensorflow as tf
import tensorflow_datasets as tfds
from tensorflow_examples.models.pix2pix import pix2pix
from IPython.display import clear_output
import matplotlib.pyplot as plt
And I tried to "Download the Oxford-IIIT Pets dataset"
dataset, info = tfds.load('oxford_iiit_pet:3.*.*', with_info=True)
However, in the console, printed this
Downloading and preparing dataset Unknown size (download: Unknown size, generated: Unknown size, total: Unknown size) to ~\tensorflow_datasets\mnist\3.0.1...
and there was no data in the folder created.
Why isn't it working?
Tutorial link:https://www.tensorflow.org/tutorials/images/segmentation

Related

Whisper Open Ai Got Stuck

import whisper
import os
model = whisper.load_model("medium")
print("Sarted")
result = model.transcribe(os.path.join("samples","speech.mp3"),fp16=False)
print(result["text"])
You can find your API key on https://replicate.com
(Whisper_api) prasun#prasun-Latitude-5400:~/Documents/Projects/whisper-main$ python3 Api.py
Sarted
Getting stuck with no output

Unable to call Notebook when using scala code in Databricks

I am into a situation where I am able to successfully run the below snippet in azure Databricks from a separate CMD.
%run ./HSCModule
But running into issues when including that piece of code with other scala code which is importing below packages and getting following error.
import java.io.{File, FileInputStream}
import java.text.SimpleDateFormat
import java.util{Calendar, Properties}
import org.apache.spark.SparkException
import org.apache.spark.sql.SparkSession
import scala.collection.JavaConverters._
import scala.util._
ERROR = :168: error: ';' expected but '.' found. %run
./HSCModule
FYI - I have also used dbutils.notebook.run and still facing same issues.
You can't mix the magic commands, like, %run, %pip, etc. with the Scala/Python code in the same cell. Documentation says:
%run must be in a cell by itself, because it runs the entire notebook inline.
So you need to put this magic command into a separate cell.

UnicodeDecodeError on Import Packages statement in Jupyter Notebook

I'm simply trying to import libraries, e.g.:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
and getting this "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 3200: invalid start byte" error.
I'm new to Jupyter Notebooks and wondering if I didn't set something up correctly. I'm attaching the full error message I'm getting.
Any advice would be GREATLY appreciated.
Error Message Here

python image library PIL on heroku doesn't work

I'm really not sure it's PIL's problem or not. But guessing from it works on local and below error massages, I thought heroku or PIL make trouble.
2020-07-04T10:48:48.751781+00:00 app[web.1]: pytesseract.pytesseract.TesseractError: (127, 'tesseract: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory')
and this is my code
import pytesseract
import io
import requests
from PIL import Image
response = requests.get("https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Tesseract_v3.02.png/500px-Tesseract_v3.02.png")
image_bytes = io.BytesIO(response.content)
img = Image.open(image_bytes)
pytesseract.pytesseract.tesseract_cmd = 'tesseract'
t = pytesseract.image_to_string(img)
print(t)

FreeCAD CMD color lost after import

Whenenver I try to import a model via FreeCADCmd Script the objects loose all color information.
This can be checked within the GUI by running macros
import FreeCAD
import ImportGui
doc = FreeCAD.newDocument()
FreeCAD.setActiveDocument(doc.Name)
ImportGui.insert("file1.stp", doc.Name)
will preserve the colors -- but can not be run on commandline, because of ImportGui.
import FreeCAD
import Import
doc = FreeCAD.newDocument()
FreeCAD.setActiveDocument(doc.Name)
Import.insert("file1.stp", doc.Name)
will import the model without any color information.
Is there any way to import a step file into FreeCADCmd (commandline -- so no GUI) without the color information being dropped?
Or does anyone know a way to run FreeCAD (GUI Version) without running a xserver?