Posts

Showing posts from December, 2022

DataBlock and the major 4 lines of code of FastAI

[Major 4 lines of code] path = untar_data(URLs.PETS) dls = ImageDataLoaders.from_name_func(path, get_image_files(path / "images" ), label_func, item_tfms = Resize( 224 )) learn = cnn_learner(dls, resnet34, metrics = error_rate) learn.fine_tune( 1 ) [DataBlock] The way we usually build the data block in one go is by answering a list of questions: what is the types of your inputs/targets? Here images and categories where is your data? Here in filenames in subfolders does something need to be applied to inputs? Here no does something need to be applied to the target? Here the  label_func  function how to split the data? Here randomly do we need to apply something on formed items? Here a resize do we need to apply something on formed batches? Here no This gives us this design: dblock = DataBlock(blocks = (ImageBlock, CategoryBlock), get_items = get_image_files, get_y = label_func, splitter = RandomS...

First Trial of NoteBook

  Once development environment has been setup (and with FastAI installed), can try below code to check whether it works or not. 1.      Execute IDE of Anacode, select options of "All application / minicoda" 2.     Execute Juypter Notebook ("Try_DL_Tutorial") 3.    Create a new notebook (or open an existing one), type and execute below                 from fastai.vision.all import *           path = untar_data(URLs.PETS)           path.ls()           files = get_image_files(path/"images")           len(files)           files[0], files[6]           def label_func(f):return f[0].isupp...

HoW to install and utilize Jupyter Notebook

Image
  To install Jupyter Notebook, you can follow these steps: 1. Ensure you have Python installed: Jupyter Notebook requires Python to be installed on your system. You can download Python from the official Python website (https://www.python.org) and follow the installation instructions specific to your operating system. 2. Open a terminal or command prompt: On Windows, you can open the Command Prompt or PowerShell. On macOS or Linux, you can use the Terminal. 3. Install Jupyter Notebook: In the terminal or command prompt, run the following command to install Jupyter Notebook using pip, which is a package manager for Python: pip install jupyter If you prefer to use the more recent pip version 19.3 or above, you can use the following command: pip install --upgrade pip pip install jupyter Alternative: download anf install Anaconda 4. Use Jupyter Notebook: In your web browser, you will see the Jupyter Notebook interface. You can create new notebooks, open existing ones, and exec...

"Deep Learning Analysis” for potential water leakage (Based on Noise Logger)

Image
  Objective To propose an in-house developed project which utilize “Deep Learning” to check “possibility of water leakage” by using audio file record by “Noise Logger” (or device with audio recording capability) Assumption 1.          Available of hardware (Noise logger or audio recording device) which can record audio file of pipeline on site 2.          Available training set of audio files (around 50 - 100 sample files): Around 50 samples from pipeline which has leakage, and 50 samples from pipeline which is normal   Work Flow 1.          Front-end staff (PPP, WS, AI) record audio file of pipeline on site (by using Noise Logger or audio recording device), assume audio file is in .WAV format. 2.          Through a simple Web UI: l    WSD staff (WS or AI) upload .WAV file to SFTP server of this ...

Use ML and DL to classify types of abnormality of logger data

Image