Angela  Dickens

Angela Dickens


Understanding Fast R-CNN and Faster R-CNN for Object Detection.

I’ve discussed Object Detection and R-CNN in detail in my previous article. You can read it here to get a better intuition.

One needs to know about these state-of-the-art models for Object Detection which were evolved over time and are now considered as a strong foundation to much more powerful networks existing today.

Let’s dive into the topic.

So, there are some drawbacks to using the R-CNN version for Object Detection. They are:

  1. It consumes a huge amount of time, storage, and computation power.
  2. It has a complex multi-stage training pipeline(3 stage — Log loss, SVM, and BBox Regressor’s L2 loss).

Fast R-CNN, which was developed a year later after R-CNN, solves these issues very efficiently and is about **146 times faster **than the R-CNN during the test time.

Fast R-CNN

The Selective Search used in R-CNN generates around 2000 region proposals for each image and each region proposal is fed to the underlying network architecture. This means, for a single image, there’d be 2000 forward passes. Consider training the network with a dataset of 1000 images. That would be a total of 2M(2000 * 1000) forward passes which is huge!

So, Fast R-CNN was based on an idea that,

Why not consider running the CNN just once per image and then find a way to share that computation across the ~2000 proposals?

In Fast R-CNN, the image is fed to the underlying CNN just once and the selective search is run on the other hand as usual. These region proposals generated by Selective Search are then projected on to the feature maps generated by the CNN. This process is called ROI Projection(Region Of Interest).

Before starting with ROI Projection, one needs to know about the Sub-Sampling Ratio.It is the ratio of the feature map size to the original size of the image. For example,

Image for post

Designed using Canva

The idea of ROI projection is that we get the coordinates of the bounding box from the ROI proposal and we need to project them onto the feature maps by projecting the ROI proposal with respect to the subsampling ratio.

Image for post

Designed using Canva

The above diagram looks a bit complex but it isn’t as it looks. Consider an image of size 688 x 920 is fed to a CNN whose subsampling ratio is 1/16. The resulting feature map’s size then leads to 43 x 58 (688/16 x 920/16). Similarly, the size of the ROI Proposal 320 x 128, after subsampling leads to 20 x 8. Generally, the coordinates of bounding boxes are represented in 2 ways.

  1. Coordinates of mid-point of the box (X, Y), Width, Height. [X, Y, W, H]
  2. Opposite side coordinates of the bounding box. [X1, Y1, X2, Y2]

Here, we consider the first notation. From the diagram, the mid-point of the ROI Proposal is **(340,450) **which leads to **(21,28) **in the feature map. In this way, the ROI Proposal is projected on to the feature map.

The main reason behind the usage of fixed size images for the network is because of the Fully Connected Layers. These expect fixed size vectors as there are fixed weights allocated. This is the main reason why variable sized images aren’t accepted by the network. To solve this, the authors of Fast R-CNN came up with an idea of ROI Pooling where the ROI Projection on the feature map is divided into fixed dimensions.

Image for post

Designed using Canva

As shown above, consider the red box as the ROI Projection onto the 8 x 8 feature map. Let’s assume that we need a 2 x 2 dimensioned output. Then dividing them equally may not be possible if there is an odd-numbered dimension. In such cases, we’ll round off to the nearest value. As shown, assume we get a 5 x 4 sized proposal. To convert it into a fixed dimensional box, we divide the height and width to that of the required ones i.e., 5/2 x 4/2 = 2.5 x 2. Rounding it on them, either way gives 2 x 2 and 3 x 2. Then each block is max-pooled and the output is calculated. In this way, we get a fixed dimensional output for any variable-sized region proposal. So now, there’s no restriction on the size of the input.

Image for post

Designed using Canva

As there’s also the third dimension involved which is depth in the feature maps, you can imagine in this way like poking a hole through a deck of cards. You have to apply ROI Pool in the same way to every slice as discussed above.

#deep-learning #object-detection #machine-learning #deep learning

What is GEEK

Buddha Community

Understanding Fast R-CNN and Faster R-CNN for Object Detection.
Arvel  Parker

Arvel Parker


How to Find Ulimit For user on Linux

How can I find the correct ulimit values for a user account or process on Linux systems?

For proper operation, we must ensure that the correct ulimit values set after installing various software. The Linux system provides means of restricting the number of resources that can be used. Limits set for each Linux user account. However, system limits are applied separately to each process that is running for that user too. For example, if certain thresholds are too low, the system might not be able to server web pages using Nginx/Apache or PHP/Python app. System resource limits viewed or set with the NA command. Let us see how to use the ulimit that provides control over the resources available to the shell and processes.

#[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object]

MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS

We are going to build a full stack Todo App using the MEAN (MongoDB, ExpressJS, AngularJS and NodeJS). This is the last part of three-post series tutorial.

MEAN Stack tutorial series:

AngularJS tutorial for beginners (Part I)
Creating RESTful APIs with NodeJS and MongoDB Tutorial (Part II)
MEAN Stack Tutorial: MongoDB, ExpressJS, AngularJS and NodeJS (Part III) 👈 you are here
Before completing the app, let’s cover some background about the this stack. If you rather jump to the hands-on part click here to get started.

#[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object]

Tyrique  Littel

Tyrique Littel



When I install s3cmd package on my FreeBSD system and try to use the s3cmd command I get the following error:

_ERROR: Test failed: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (ssl.c:1091)

How do I fix this problem on FreeBSD Unix system?

Amazon Simple Storage Service (s3 ) is object storage through a web service interface or API. You can store all sorts of files. FreeBSD is free and open-source operating systems. s3cmd is a command-line utility for the Unix-like system to upload, download files to AWS S3 service from the command line.

ERROR: Test failed: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed error and solution

This error indicates that you don’t have packages correctly installed, especially SSL certificates. Let us see how to fix this problem and install s3cmd correctly on FreeBSD to get rid of the problem.

How to install s3cmd on FreeBSD

Search for s3cmd package:

$ pkg search s3cmd

Execute the following command and make sure you install Python 3.x package as Python 2 will be removed after 2020:

$ sudo pkg install py37-s3cmd-2.1.0

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	libffi: 3.2.1_3
	py37-dateutil: 2.8.1
	py37-magic: 5.38
	py37-s3cmd: 2.1.0
	py37-setuptools: 44.0.0
	py37-six: 1.14.0
	python37: 3.7.8
	readline: 8.0.4

Number of packages to be installed: 8

The process will require 118 MiB more space.

Proceed with this action? [y/N]: y
[rsnapshot] [1/8] Installing readline-8.0.4...
[rsnapshot] [1/8] Extracting readline-8.0.4: 100%
[rsnapshot] [2/8] Installing libffi-3.2.1_3...
[rsnapshot] [8/8] Extracting py37-s3cmd-2.1.0: 100%
Message from python37-3.7.8:

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

py37-gdbm       databases/py-gdbm@py37
py37-sqlite3    databases/py-sqlite3@py37
py37-tkinter    x11-toolkits/py-tkinter@py37

#[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object]

Brain  Crist

Brain Crist


Docker Applikationen mit Visual Studio Code debuggen

Mit dem integrierten Debugger von Visual Studio Code lassen sich ASP.NET Core bzw. .NET Core Applikationen einfach und problemlos debuggen. Der Debugger unterstützt auch Remote Debugging, somit lassen sich zum Beispiel .NET Core Programme, die in einem Docker-Container laufen, debuggen.

Als Beispiel Applikation reicht das Default-Template für MVC Applikationen dotnet new mvc

$ md docker-core-debugger
$ cd docker-core-debugger
$ dotnet new mvc

Mit dotnet run prüfen wir kurz, ob die Applikation läuft und unter der Adresse http://localhost:5000 erreichbar ist.

$ dotnet run
$ Hosting environment: Production
$ Content root path: D:\Temp\docker-aspnetcore
$ Now listening on: http://localhost:5000

Die .NET Core Applikation builden wir mit dotnet build und publishen alles mit Hilfe von dotnet publish

$ dotnet build
$ dotnet publish -c Debug -o out --runtime linux-x64

Dabei gilt es zu beachten, dass die Build Configuration mit -c Debug gesetzt ist und das Output Directory auf -o out. Sonst findet Docker die nötigen Binaries nicht. Für den Docker Container brauchen wir nun ein Dockerfile, dass beim Start vorgängig den .NET Core command line debugger (VSDBG) installiert. Das Installations-Script für VSDBG ist unter abfrufbar.

FROM microsoft/aspnetcore:latest

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       unzip procps \
    && rm -rf /var/lib/apt/lists/* \
    && curl -sSL | bash /dev/stdin -v latest -l /vsdbg

COPY ./out .
ENTRYPOINT ["dotnet", "docker-core-debugger.dll"]

Den Docker Container erstellen wir mit dem docker build Kommando

$ docker build -t coreapp .

und starten die Applikation mit docker run.

$ docker run -d -p 8080:80 --name coreapp coreapp

Jetzt muss Visual Studio Code nur noch wissen, wo unsere Applikation läuft. Dazu definieren wir eine launch.json vom Typ attach und konfigurieren die nötigen Parameter für den Debugger.

    "version": "0.2.0",
    "configurations": [
            "name": ".NET Core Remote Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickRemoteProcess}",
            "pipeTransport": {
                "pipeProgram": "docker",
                "pipeArgs": ["exec", "-i coreapp ${debuggerCommand}"],
                "quoteArgs": false,
                "debuggerPath": "/vsdbg/vsdbg",
                "pipeCwd": "${workspaceRoot}"

            "logging": {
                "engineLogging": true,
                "exceptions": true,
                "moduleLoad": true,
                "programOutput": true

Mit F5 starten wir den Debugger. Wenn alles klappt, sollte eine Auswahl der Prozesse des Docker-Containers sichtbar sein.


Nun muss der dotnet Prozess ausgewählt werden. Der Visual Studio Code Debugger verbindet sich darauf mit VSDBG und wir können wie gewohnt unseren Code debuggen. Dazu setzen wir einen Breakpoint in der Index-Action des HomeControllers und rufen mit dem Browser die URL http://localhost:8080/ auf.


#[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object]

Yoshiko  Jones

Yoshiko Jones


How to configure AWS SES with Postfix MTA

How do I configure Amazon SES With Postfix mail server to send email under a CentOS/RHEL/Fedora/Ubuntu/Debian Linux server?

Amazon Simple Email Service (SES) is a hosted email service for you to send and receive email using your email addresses and domains. Typically SES used for sending bulk email or routing emails without hosting MTA. We can use Perl/Python/PHP APIs to send an email via SES. Another option is to configure Linux or Unix box running Postfix to route all outgoing emails via SES.

  • » Remove sendmail
  • » Install postfix
  • » Configuring postfix for SES
  • » Test postfix

Procedure to configure AWS SES with Postfix

Before getting started with Amazon SES and Postfix, you need to sign up for AWS, including SES. You need to verify your email address and other settings. Make sure you create a user for SES access and download credentials too.

Step 1 – Uninstall Sendmail if installed

If sendmail installed remove it. Debian/Ubuntu Linux user type the following apt command/apt-get command:

$`` sudo apt --purge remove sendmail

CentOS/RHEL user type the following yum command or dnf command on Fedora/CentOS/RHEL 8.x:

$`` sudo yum remove sendmail

$`` sudo dnf remove sendmail

Sample outputs from CentOS 8 server:

Dependencies resolved.
 Package           Architecture  Version               Repository         Size
 sendmail          x86_64        8.15.2-32.el8         @AppStream        2.4 M
Removing unused dependencies:
 cyrus-sasl        x86_64        2.1.27-1.el8          @BaseOS           160 k
 procmail          x86_64        3.22-47.el8           @AppStream        369 k

Transaction Summary
Remove  3 Packages

Freed space: 2.9 M
Is this ok [y/N]: y

#[object object] #[object object] #[object object] #[object object] #[object object] #[object object] #[object object]