Coder Social home page Coder Social logo

Comments (5)

github-actions avatar github-actions commented on May 31, 2024

๐Ÿ‘‹ Hello @imdsafi09, thank you for your interest in YOLOv3 ๐Ÿš€! Please visit our โญ๏ธ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a ๐Ÿ› Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training โ“ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov3  # clone
cd yolov3
pip install -r requirements.txt  # install

Environments

YOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv3 CI

If this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

Introducing YOLOv8 ๐Ÿš€

We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 ๐Ÿš€!

Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.

Check out our YOLOv8 Docs for details and get started with:

pip install ultralytics

from yolov3.

glenn-jocher avatar glenn-jocher commented on May 31, 2024

@imdsafi09 hello!

It sounds like you're experiencing an issue with image encoding compatibility when using YOLOv3 with ROS and your Ouster lidar's mono16 images. YOLOv3 typically expects 8-bit images (mono8 or bgr8), so the warning indicates that ROS is trying to convert from mono16 to mono8 to match the expected input format.

To address this, you could manually convert your images to mono8 or bgr8 before passing them to YOLOv3. This conversion can be done within your ROS node that interfaces with the YOLOv3 model. You might need to adjust the image encoding in your subscriber callback function to ensure the images are in the correct format before they are processed by YOLOv3.

For more detailed guidance on working with different image encodings and YOLOv3, please refer to our documentation at https://docs.ultralytics.com.

Keep in mind that handling image data correctly is crucial for the performance of the model. If the issue persists after trying the suggested conversion, please provide more details about the error message following the warning, and we'll do our best to assist you further.

from yolov3.

imdsafi09 avatar imdsafi09 commented on May 31, 2024

@glenn-jocher Hello!
Thank you for your detailed answer. I tried to write a python script to convert mono-16 to mono-8, and after checking in ROS rqt it seems the coversion is working. However, the error remain persist. Below I attached the code please let me if there is any issue in that.

`#!/usr/bin/env python3

import rospy
from sensor_msgs.msg import Image
import cv2
from cv_bridge import CvBridge, CvBridgeError

class ImageConverter:
def init(self):
self.bridge = CvBridge()
self.image_sub = rospy.Subscriber("/ouster/signal_image", Image, self.callback)
self.image_pub = rospy.Publisher("ouster/rgb/image_raw", Image, queue_size=10)

def callback(self, data):
    try:
        # Convert the ROS image to a CV2 image
        cv_image = self.bridge.imgmsg_to_cv2(data, "mono16")
    except CvBridgeError as e:
        rospy.logerr(e)

    # Perform the conversion from Mono16 to Mono8
    # OpenCV automatically scales the pixel values to the 0-255 range
    cv_image_mono8 = cv2.convertScaleAbs(cv_image, alpha=(255.0/65535.0))

    try:
        # Convert the CV2 image back to a ROS image and publish
        self.image_pub.publish(self.bridge.cv2_to_imgmsg(cv_image_mono8, "mono8"))
    except CvBridgeError as e:
        rospy.logerr(e)

if name == 'main':
rospy.init_node('mono16_to_mono8_converter', anonymous=True)
ic = ImageConverter()
try:
rospy.spin()
except KeyboardInterrupt:
print("Shutting down")
`

from yolov3.

glenn-jocher avatar glenn-jocher commented on May 31, 2024

@imdsafi09, your script for converting mono16 to mono8 images looks correct at a glance. The conversion logic and the use of cv_bridge for ROS and OpenCV image conversions are appropriate.

If the error persists, it might not be related to the image conversion itself. Here are a few things to check:

  1. Ensure that the topic ouster/rgb/image_raw is correctly subscribed to by the YOLOv3 node.
  2. Verify that the images published on ouster/rgb/image_raw are visible and correctly formatted in rqt_image_view.
  3. Check if there are any additional error messages or logs from the YOLOv3 node that could provide more insight into the failure.
  4. Confirm that the YOLOv3 model is correctly loaded and configured to process mono8 images.

If everything seems to be in order with the image conversion and publishing, the issue might lie within the YOLOv3 ROS node's configuration or its handling of the incoming image messages. Double-check the YOLOv3 ROS node's documentation and ensure that all necessary parameters are set correctly.

If you continue to face difficulties, please provide the exact error message you're receiving from the YOLOv3 node after the conversion, and we'll try to troubleshoot further. Remember, the more specific the information you provide, the easier it will be to pinpoint the issue.

from yolov3.

github-actions avatar github-actions commented on May 31, 2024

๐Ÿ‘‹ Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO ๐Ÿš€ and Vision AI โญ

from yolov3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.