Image Classification With Lazarus on Google Colab Ubuntu Linux
Image Classification With Lazarus on Google Colab Ubuntu Linux
Code Blog
Another fascinating option is to run the entire system as runtime virtualization with the help of a Jupyter notebook running on Ubuntu in the
cloud on Google Colab or Colab.research container.
1076_CAI_UVisualGAN2tester1.pas
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 1/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
https://www.academia.edu/53798878/maXbox_Starter87_Image_Classification_Lazarus
Lazarus is also being built in Colab and the deep learning network is compiled and trained too in a Jupiter notebook.
https://gitlab.ti.bfh.ch/knm4/python4delphi/-/blob/master/EKON24_SimpleImageClassificationCPU_2021.ipynb
The build of Free Pascal with Lazarus on a Ubuntu Linux is included, as can be seen under the following link:
https://github.com/maxkleiner/maXbox/blob/master/EKON24_SimpleImageClassificationCPU.ipynb
https://github.com/maxkleiner/python4delphi/blob/master/EKON24_SimpleImageClassificationCPU_2021.ipynb
bithit
!apt-get update
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 2/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
mtprocs/examples
A mtprocs/examples/parallelloop1.lpr
A mtprocs/examples/parallelloop_nested1.lpi
A mtprocs/examples/parallelloop_nested1.lpr
A mtprocs/examples/recursivemtp1.lpr
A mtprocs/examples/simplemtp1.lpr
A mtprocs/examples/parallelloop1.lpi
A mtprocs/examples/recursivemtp1.lpi
A mtprocs/examples/simplemtp1.lpi
A mtprocs/examples/testmtp1.lpi
A mtprocs/examples/testmtp1.lpr
A mtprocs/Readme.txt
A mtprocs/mtprocs.pas
A mtprocs/mtpcpu.pas
A mtprocs/multithreadprocslaz.lpk
A mtprocs/mtputils.pas
A mtprocs/multithreadprocslaz.pas
Checked out revision 8093.
5. !lazbuild mtprocs/multithreadprocslaz.lpk
6. !ls -l neural-api/examples/SimpleImageClassifier/SimpleImageClassifier.lpi
7. !lazbuild neural-api/examples/SimpleImageClassifier/SimpleImageClassifier.lpi
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 3/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
8. ls -l neural-api/bin/x86_64-linux/bin/SimpleImageClassifier
1 import os
2 import urllib.request
3 if not os.path.isfile('cifar-10-batches-bin/data_batch_1.bin'):
4 print("Downloading CIFAR-10 Files")
5 url = 'https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz'
6 urllib.request.urlretrieve(url, './file.tar')
7
8
9 Downloading CIFAR-10 Files
10. ls -l
total 166080
-rw-r--r-- 1 root root 170052171 Sep 23 08:46 file.tar
drwxr-xr-x 5 root root 4096 Sep 23 08:39 mtprocs/
drwxr-xr-x 7 root root 4096 Sep 23 08:42 neural-api/
drwxr-xr-x 1 root root 4096 Sep 16 13:40 sample_data/
cifar-10-batches-bin/
cifar-10-batches-bin/data_batch_1.bin
cifar-10-batches-bin/batches.meta.txt
cifar-10-batches-bin/data_batch_3.bin
cifar-10-batches-bin/data_batch_4.bin
cifar-10-batches-bin/test_batch.bin
cifar-10-batches-bin/readme.html
cifar-10-batches-bin/data_batch_5.bin
cifar-10-batches-bin/data_batch_2.bin
1 if not os.path.isfile('./data_batch_1.bin'):
2 print("Copying files to current folder")
3 !cp ./cifar-10-batches-bin/* ./
if os.path.isfile(‘./data_batch_1.bin’):
print(“RUNNING!”)
1 if os.path.isfile('./data_batch_1.bin'):
2 print("RUNNING!")
3
!neural-api/bin/x86_64-linux/bin/SimpleImageClassifier
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 4/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
RUNNING!
Creating Neural Network...
Layers: 12
Neurons:331
Weights:162498 Sum: -19.536575
File name is: SimpleImageClassifier-64
Learning rate:0.001000 L2 decay:0.000010 Inertia:0.900000 Batch size:64 Step size:64 Staircase ephocs:10
!ls -l
15. files.download('SimpleImageClassifier-64.nn')
16. files.download('SimpleImageClassifier-64.csv')
Summary
of the 16 Steps:
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 5/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 6/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 7/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 8/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
LIMA 8159LP
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 9/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
person : 20.328374207019806
landscape person integrate image detector compute ends…
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 10/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
person : 80.40134906768799
integrate image detector compute ends…
Shapes of EPFL
1 import numpy as np
2 np.ones([1,2,3,4,5])
import numpy as np
np.ones([1,2,3,4,5])
array([[[[[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1.]],
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 11/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
1 array
2 ([[[[[1., 1., 1., 1., 1.],
3 [1., 1., 1., 1., 1.],
4 [1., 1., 1., 1., 1.],
5 [1., 1., 1., 1., 1.]],
6
7 [[1., 1., 1., 1., 1.],
8 [1., 1., 1., 1., 1.],
9 [1., 1., 1., 1., 1.],
10 [1., 1., 1., 1., 1.]],
11
12 [[1., 1., 1., 1., 1.],
13 [1., 1., 1., 1., 1.],
14 [1., 1., 1., 1., 1.],
15 [1., 1., 1., 1., 1.]]],
16
17
18 [[[1., 1., 1., 1., 1.],
19 [1., 1., 1., 1., 1.],
20 [1., 1., 1., 1., 1.],
21 [1., 1., 1., 1., 1.]],
22
23 [[1., 1., 1., 1., 1.],
24 [1., 1., 1., 1., 1.],
25 [1., 1., 1., 1., 1.],
26 [1., 1., 1., 1., 1.]],
27
28 [[1., 1., 1., 1., 1.],
29 [1., 1., 1., 1., 1.],
30 [1., 1., 1., 1., 1.],
31 [1., 1., 1., 1., 1.]]]]])
>
There are 5 columns of 4 rows in 3 blocks times 2!
The 5th dimension, according to the Kaluza-Klein theory is a concept that unifies two of the four fundamental forces of nature in a 5th
dimension to explain how light (electromagnetism) interacts with gravity. Although the Kaluza-Klein theory was later deemed to be
inaccurate, it served as a good starting point for the development of string theory …
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 12/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
The Cosmical
maXbox and Python can show in a multidimensional matrix the 5th dimension
Topics
Security is Multi-Faceted
Security is a continuum requiring multiple angles and each of the items below can help:
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 13/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
the babblefish
Vincenty’s formulae are two related iterative methods used in geodesy to calculate the distance between two points on the surface of a spheroid,
developed by Thaddeus Vincenty (1975a) They are based on the assumption that the figure of the Earth is an oblate spheroid, and hence are
more accurate than methods such as great-circle distance which assume a spherical Earth.
Calculate the geographical distance (in kilometers or miles) between 2 points with extreme accuracy. Between 2 algorithms we have
6339254.547 metres and 6339255.227 metres, difference: 680 meters!
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 14/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
>>>
Distance met: 6339254.546711418
Distance mil: 3939.0301555860137
Distance circ: 6322355.530084518
This library implements Vincenty’s solution to the inverse geodetic problem. It is based on the WGS 84 reference ellipsoid and is accurate to
within 1 mm (!) or better.
This formula is widely used in geographic information systems (GIS) and is much more accurate than methods for computing the great-circle
distance (which assume a spherical Earth).
781u_LatLonDistanceTestmX22.pas
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 15/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
XMLHTTP.6.0 /gzp
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 16/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Borkum
And it turns out that QR codes are a great tool for managing your art. It is able to do so because a QR code has a maximum symbol size of
177×177 modules. So, it can have as much as 31,329 squares which can encode 3KB of data.
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 17/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Mondrian
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 18/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
TEE Arbalete
TEE Mistral
BB 15015
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 19/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 20/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Remake : http://www.softwareschule.ch/examples/cdplayer.txt
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 21/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Der Magdalensberg (slow.: Štalenska gora; 1059 m ü. A.) in Kärnten (früher Helenenberg).
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 22/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Advertisements
maxbox4 September 23, 2021 Lazarus, Machine Learning CAI, maXbox4 Edit
Published by maxbox4
Code till the End View more posts
maxbox4
September 23, 2021 at 6:33 pm
Data Parallelism has been implemented. Experiments have been made with up to 40 parallel threads in virtual machines with up to 32 virtual
cores.
Data Parallelism is implemented at TNNetDataParallelism. As per example, you can create and run 40 parallel neural networks with:
Instead of reporting new features (there are plenty of new neuronal layer types), I’ll report here a test. For the past 2 years, I’ve probably spent
more time testing than coding. The test is simple: using a DenseNet like architecture with 1M trainable parameters, normalization, L2, cyclical
learning rate and weight averaging, how precise can be the CIFAR-10 image classification accuracy?
https://forum.lazarus.freepascal.org/index.php?topic=39049.0
Like
Reply
maxbox4
March 4, 2022 at 7:54 am
In this tutorial, you discovered One-vs-Rest and One-vs-One strategies for multi-class classification.
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 23/24
1/21/25, 1:47 PM Image Classification with Lazarus – Code Blog
Binary classification models like logistic regression and SVM do not support multi-class classification natively and require meta-strategies.
The One-vs-Rest strategy splits a multi-class classification into one binary classification problem per class.
The One-vs-One strategy splits a multi-class classification into one binary classification problem per each pair of classes.
Like
Reply
Leave a comment
https://softwareschule.code.blog/2021/09/23/image-classification-with-lazarus/ 24/24