{"id":13586185,"url":"https://github.com/tomasz-lewicki/ai-thermometer","last_synced_at":"2025-04-28T11:08:26.843Z","repository":{"id":54072439,"uuid":"250175015","full_name":"tomasz-lewicki/ai-thermometer","owner":"tomasz-lewicki","description":"Fever screening with IR \u0026 RGB cameras and Deep CNNs","archived":false,"fork":false,"pushed_at":"2022-11-08T08:43:53.000Z","size":35633,"stargazers_count":147,"open_issues_count":28,"forks_count":39,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-30T01:09:39.317Z","etag":null,"topics":["cnn","flir","flir-lepton","flir-lepton-purethermal","jetson-nano","lepton","nvidia-jetson","opencv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasz-lewicki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-26T06:06:21.000Z","updated_at":"2024-03-25T05:56:13.000Z","dependencies_parsed_at":"2023-01-22T11:30:47.992Z","dependency_job_id":null,"html_url":"https://github.com/tomasz-lewicki/ai-thermometer","commit_stats":null,"previous_names":["tomasz-lewicki/ai-thermometer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fai-thermometer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fai-thermometer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fai-thermometer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasz-lewicki%2Fai-thermometer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasz-lewicki","download_url":"https://codeload.github.com/tomasz-lewicki/ai-thermometer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235388585,"owners_count":18981944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","flir","flir-lepton","flir-lepton-purethermal","jetson-nano","lepton","nvidia-jetson","opencv"],"created_at":"2024-08-01T15:05:22.575Z","updated_at":"2025-01-24T04:55:16.091Z","avatar_url":"https://github.com/tomasz-lewicki.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AI Thermometer\nContactless temperature mesurement using IR \u0026 RGB cameras and Deep CNN facial detection.\n\n### Normal temperature\n![](docs/images/retinaface/healthy.gif)\n### Elevated temperature\n![](docs/images/retinaface/elevated.gif)\n\n## What's new in v0.4\n* New facial detector (handles partial occlusion, e.g. with a mask)\n* Added IR camera drift compensation with an external blackbody\n\n## Hardware \nTo build this project you will need:\n|#|Part|link|Price (USD)|\n|-|-|-|-|\n|1|Jetson Nano Dev Kit|[link](https://www.sparkfun.com/products/16271)| 99 | \n|3|FLIR Lepton 3.5 IR Camera | [link](https://store.groupgets.com/products/flir-lepton-3-5)| 199 |\n|4|GroupGets Purethermal2 Module | [link](https://store.groupgets.com/products/purethermal-2)| 99 |\n|2|Raspberry Pi Camera Module V2.1 |[link](https://www.sparkfun.com/products/14028) | 25 |\n|5|Noctua cooling fan | [link](https://www.amazon.com/Noctua-NF-A4x10-PWM-4-Pin-Premium/dp/B07DXRNYNX/) | 14 |\n|6|3D printed enclosure | [https://a360.co/3nmDML3](https://a360.co/3nmDML3) | - |\n|total | | | 436 |\n\nEnclosure (live model available from [https://a360.co/3nmDML3](https://a360.co/3nmDML3) ): \n![wireframe image](docs/images/wireframe.png)\n\n## Quickstart \n\n1. Flash Nvidia Jetson Nano with the latest Nvidia JetPack. Update package manager\n\n```shell\nsudo apt update \u0026\u0026 sudo apt upgrade\n```\n\n2. Build OpenCV \u003e4.4. It is required for CUDA DNN support.\n```shell\nwget https://raw.githubusercontent.com/mdegans/nano_build_opencv/master/build_opencv.sh\nchmod +x build_opencv.sh\n./build_opencv.sh\n```\n3. Build pytorch (instructions [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-7-0-now-available/72048))\n\n4. Download AI Thermometer\n\n```shell\ngit clone --recursive https://github.com/tomek-l/ai-thermometer\ncd ai-thermometer\n```\n\n5. Run AI Thermometer\n\n```shell\npython3 main.py\n```\n\n6. Optionally, 3D print \u0026 assemble the enclosure from [https://a360.co/3nmDML3](https://a360.co/3nmDML3)\n\n## Limitations\n\n### IR and RGB camera alignment.\n\nThe current way of calculating the correspondence between IR and RGB cameras is not ideal.\nFactors, such as the non-rigid mount of the sensor on the Raspberry Pi CMV2.1 don't help.\nI'm actively working on calibration code that takes into account the intrinsic parameters of both cameras, which should allow for obtaining a pixel-level correspondence between the imags.\n\n## FAQ/common issues:\n\n1. `uvc_open error -3`\n\nReason: Your current user does not have r/w access to the PureThermal USB device. \n\nFor a quick and dirty fix you can do do:\n```shell\necho 'SUBSYSTEM==\"usb\",  ENV{DEVTYPE}==\"usb_device\", GROUP=\"plugdev\", MODE=\"0664\"' | sudo tee /etc/udev/rules.d/10-libuvc.rules \nsudo udevadm trigger\n```\n(this gives camera access to all users)\n\nFor a better, fine-grained permission setup, create a new group, give permissions to that group only and your user to the newly created group. You can read more [here](http://wiki.ros.org/libuvc_camera#Permissions).\n\n2. `Illegal instruction (core dumped)`\n\nReason: The provided  ```libuvc.so``` is compiled for AArch64.\nIt is a custom version of libuvc that supports Y16 video format. If you're using different architecture, you will need to build the library from source:\n\n```shell\ngit clone https://github.com/groupgets/libuvc\ncd libuvc\nmkdir build\ncd build\ncmake ..\nmake\ncp libuvc.so ~/ai-thermometer/ir/libuvc_wrapper\n```\n\n3. using sudo or getting `permission denied`\n\nYou don't need ```sudo``` to run the code in this repository 🙂\n\n## Previous versions\n\n## Version 0.2: Haar Cascade + FLIR Lepton 3.5 temp. measurement (~10FPS, CPU only)\nWatch full video: [https://www.youtube.com/watch?v=j9eo9Cs8J8I](https://www.youtube.com/watch?v=j9eo9Cs8J8I)\n\n![](docs/images/haar/combined_short.gif)\n\n\n## Version 0.1: SSD (COCO) + FLIR Lepton 3.5 temp. measurement (~12FPS w/ GPU accel.)\nWatch full video: [https://www.youtube.com/watch?v=i2XMtshdjn8](https://www.youtube.com/watch?v=i2XMtshdjn8)\n\n![](docs/images/ssd/ssd_short.gif)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasz-lewicki%2Fai-thermometer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasz-lewicki%2Fai-thermometer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasz-lewicki%2Fai-thermometer/lists"}