Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occur in ai-thermometer!! Please Guide me to resolve this problem #33

Open
Henery1 opened this issue Mar 13, 2021 · 9 comments
Open
Assignees

Comments

@Henery1
Copy link

Henery1 commented Mar 13, 2021

File "main.py", line 13, in
from rgb import RGBThread
File "/home/thermal/ai-thermometer/rgb/init.py", line 1, in
from .rgb_thread import *
File "/home/thermal/ai-thermometer/rgb/rgb_thread.py", line 8, in
from .retinaface import RetinaFaceDetector
File "/home/thermal/ai-thermometer/rgb/retinaface/init.py", line 1, in
from .detector import *
File "/home/thermal/ai-thermometer/rgb/retinaface/detector.py", line 10, in
from .models.retinaface import RetinaFace
File "/home/thermal/ai-thermometer/rgb/retinaface/models/retinaface.py", line 5, in
import torchvision.models.detection.backbone_utils as backbone_utils
ModuleNotFoundError: No module named 'torchvision.models.detection'

@tomasz-lewicki
Copy link
Owner

Hi @Henery1

This looks like a mismatch between torchvision versions.
It was likely caused by an issue in installation instructions.
I'll look into this!

@tomasz-lewicki
Copy link
Owner

@Henery1

What version of torch and torchvision are you using?
You can check that by inspecting the output of the following commands:

pip3 show torchvision
pip3 show torch

@tomasz-lewicki tomasz-lewicki self-assigned this Mar 13, 2021
@Henery1
Copy link
Author

Henery1 commented Mar 16, 2021

Hi @tomek-l ! First of all Thanks you very much for your kindly respond. I used for thermal-view with purethermal-2 break out board and FLIR Lepton 3.5 and pi-camera v-2.1 for RGB . Please Look at the torch and torchvision below:
For Torch
Name: torch
Version: 1.8.0
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: [email protected]
License: BSD-3
Location: /home/thermal/.local/lib/python3.6/site-packages
Requires: numpy, dataclasses, typing-extensions

For Torchvision
Name: torchvision
Version: 0.2.2.post3
Summary: image and video datasets and models for torch deep learning
Home-page: https://github.com/pytorch/vision
Author: PyTorch Core Team
Author-email: [email protected]
License: BSD
Location: /home/thermal/.local/lib/python3.6/site-packages
Requires: six, pillow, numpy, torch

                                                                                            yours sincerely
                                                                                                     Henery T

@Henery1
Copy link
Author

Henery1 commented Mar 22, 2021

Hi @tomek-l
I got that kind of error. Please guide me to get RGB and IR frame display.

(488) isPipelinePlaying OpenCV | GStreamer warning: unable to query pipeline state
[ WARN:1] global /tmp/build_opencv/opencv/modules/videoio/src/cap_gstreamer.cpp (1761) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module nvarguscamerasrc0 reported: TIMEOUT
GST_ARGUS: Cleaning up
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/thermal/ai-thermometer/rgb/rgb_thread.py", line 38, in run
frame_small = cv2.resize(self._frame, (400, 300))
cv2.error: OpenCV(4.4.0) /tmp/build_opencv/opencv/modules/imgproc/src/resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

(960, 0)
Waiting for RGB frames
Waiting for RGB frames
Waiting for RGB frames
Waiting for RGB frames
Waiting for RGB frames
Waiting for RGB frames

@tomasz-lewicki
Copy link
Owner

Hi @Henery1 ,
I'm glad you were able push it forward. Te second error is likely related to the gstreamer pipeline for RGB camera not having set up successfully.

  1. See if you can display camera 0 on the screen:
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e

(or camera 1):

gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! 'video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=720' ! nvvidconv ! nvegltransform ! nveglglessink -e
  1. If these commands don't succeed, give this a try:
sudo systemctl restart nvargus-daemon

@Henery1
Copy link
Author

Henery1 commented Mar 23, 2021

Hi @tomek-l Everything is fine now and trying to upgrade to your program. At first I got an error in camera and tried to check the camera with this command ls /dev/video0. Anything have changed and got an error again, then try to install the video 4 linux utils with this command (sudo apt-get install v4l-utils) and then check video list (v4l2-ctl --list-devices). The output was fine. Thanks a lot for your kindly respond.

@LXPWing
Copy link

LXPWing commented Mar 24, 2021

Hi @Henery1 What version of torch , torchvision and python are you using? I'm having a problem with the version

@Henery1
Copy link
Author

Henery1 commented Jun 2, 2021

Hi Tomek-I!!! I want to get the Tavg data. But I don't know how can i get this Tavg data in your program. Where can i find the data set in your program? Thanks a lot!!! Waiting for your kindly reply.

@Henery1
Copy link
Author

Henery1 commented Jun 2, 2021

Hi @Henery1 What version of torch , torchvision and python are you using? I'm having a problem with the version

I used Torch version 1.8.0 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants