Fire/Smoke Detection-Server

This solutions demonstrates fire/smoke detection SDK which transforms your CCTV system into an early warning sensor for fire & smoke through docker image pre-built.

Fires often begin in quiet, low-traffic areas—electrical rooms, loading docks, storage areas—where nobody’s watching. KBY-AI's fire/smoke detection SDK turns your existing CCTV into smart fire sentries, instantly detecting smoke or flames before they spiral into a crisis. Perfect for warehouses, industrial sites, and logistics hubs.

Features

License

We offer lifetime license(perpetual license) based on machine ID for every server(Windows, Linux). The license is available for one-time payment. In other words, once you purchase license from me, you can use our SDK permanently.

To request a license, please contact us:

Email: [email protected]

1. Linux

  • CPU: 2 cores or more (Recommended: 2 cores)

  • RAM: 4 GB or more (Recommended: 8 GB)

  • HDD: 4 GB or more (Recommended: 8 GB)

  • OS: Windows 7 or later

  • Architecture: x64

2. Windows

  • CPU: 2 cores or more (Recommended: 2 cores)

  • RAM: 4 GB or more (Recommended: 8 GB)

  • HDD: 4 GB or more (Recommended: 8 GB)

  • OS: Ubuntu 20.04 or later

  • Architecture: x64

Setting up SDK & Test

  • Pull Dockerimage.

sudo docker pull kbyai/fire-smoke-detection:latest
  • Read machine code

sudo docker run -e LICENSE="xxxxx" kbyai/fire-smoke-detection:latest
  • Send us machine code obtained.

  • Create a license.txt file and write the license key that you received from KBY-AI team.

  • Run Docker container

sudo docker run -v ./license.txt:/home/openvino/kby-ai-fire/license.txt -p 8081:8080 -p 9001:9000 kbyai/fire-smoke-detection:latest
  • Here are the endpoints to test the API through Postman:

  • To test with an image file, send a POST request to http://{xx.xx.xx.xx}:8081/fire. To test with a base64-encoded image, send a POST request to http://{xx.xx.xx.xx}:8081/fire_base64.

APIs

1. Getting Machine Code

The SDK provides a single API to get machine code

machineCode = getMachineCode()
print("\nmachineCode: ", machineCode.decode('utf-8'))

2. Activate SDK

Read license.txt file and activate SDK with setActivation() function as follows.

try:
    with open(licensePath, 'r') as file:
        license = file.read().strip()
except IOError as exc:
    print("failed to open license.txt: ", exc.errno)

print("\nlicense: ", license)

ret = setActivation(license.encode('utf-8'))

3. Initialize SDK

ret = initSDK()
print("init: ", ret)

3. Get Detection Result

cnt = getFireDetection(img_byte, len(img_byte), label_array, box_array, score_array)

rectangles = [
(box_array[i * 4], box_array[i * 4 + 1], box_array[i * 4 + 2], box_array[i * 4 + 3])
for i in range(cnt)]
scores = [score_array[i] for i in range(cnt)]
labels = [label_array[i] for i in range(cnt)]

Last updated