HassanBinHaroon / YOLOER_V2

YOLOER stands for You Only Look Once and Estimate Range. The project is about REAL-TIME Object Detection and Distance/Depth Estimation using YOLOv7 as object detector.
7 stars 0 forks source link

Error #3

Open hesamira opened 1 year ago

hesamira commented 1 year ago

Hi, Thanks for your code. When I ran your code I got this error. Please, help me. Thanks

sami@sami:~/YOLOER_V2/REAL-TIME_Distance_Estimation_with_YOLOV7$ python3 detect.py --save-txt --weights yolov7.pt --conf 0.4 --source 0 --model_dist model@1535470106.json --weights_dist model@1535470106.h5 Illegal instruction (core dumped)

HassanBinHaroon commented 1 year ago

Illegal instruction (core dumped) often means that you tried to run a command that your system lacked resources to complete (i.e. not enough RAM, CPUs etc.).

HassanBinHaroon commented 1 year ago

@hesamira Reference

hesamira commented 1 year ago

Hi, In which part of your code did you measure the distance between the obstacle and the camera? What was this measurement based on and what formulas did you use? please guide me. thank you.

HassanBinHaroon commented 1 year ago

The detect.py script contains the distance measurement code.

I uses a simple neural network for distance measurement.

On Wed, 10 May 2023, 11:05 am hesamira, @.***> wrote:

Hi, In which part of your code did you measure the distance between the obstacle and the camera? What was this measurement based on and what formulas did you use? please guide me. thank you.

— Reply to this email directly, view it on GitHub https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-1541402358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GYVQABJWAIQJ66IP6D2DXFMVZ7ANCNFSM6AAAAAAXZYYCVY . You are receiving this because you commented.Message ID: @.***>

HassanBinHaroon commented 1 year ago

It requires a simple coding script.

But first you need to elaborate, why do you want to do it?

Because something like that is algorithm already doing.

On Sat, 27 May 2023, 5:46 pm hesamira, @.***> wrote:

Hi,

How can I count the number of pixels inside bounding boxes and find the largest bounding box? I mean, in which part of the code should I make changes?

Please, help me. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-1565396735, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GYVWELOFM4GCTAJHKLFDXIHZR7ANCNFSM6AAAAAAXZYYCVY . You are receiving this because you commented.Message ID: @.***>

hesamira commented 1 year ago

I wrote the code but it doesn't work for thermal images.

HassanBinHaroon commented 1 year ago

Use pred variable (present inside the script) for your pixel counting.

On Sat, 27 May 2023, 7:13 pm hesamira, @.***> wrote:

I wrote the code but it doesn't work for thermal images.

— Reply to this email directly, view it on GitHub https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-1565443930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GYVVURIEYUAUE4O6QWQ3XIIDZLANCNFSM6AAAAAAXZYYCVY . You are receiving this because you commented.Message ID: @.***>

hesamira commented 1 year ago

Can you help me if I send you my code? My code doesn't work for thermal camera videos and works for day and night cameras videos?

On Sat, May 27, 2023 at 11:39 PM Hassan Bin Haroon @.***> wrote:

Use pred variable (present inside the script) for your pixel counting.

On Sat, 27 May 2023, 7:13 pm hesamira, @.***> wrote:

I wrote the code but it doesn't work for thermal images.

— Reply to this email directly, view it on GitHub < https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-1565443930 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AY2GYVVURIEYUAUE4O6QWQ3XIIDZLANCNFSM6AAAAAAXZYYCVY

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-1565663872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIM7G3UI4ROLH4AKR232BFTXIJNQXANCNFSM6AAAAAAXZYYCVY . You are receiving this because you were mentioned.Message ID: @.***>

HassanBinHaroon commented 1 year ago

Would that be helpful If I guide you the pseudo code?

HassanBinHaroon commented 1 year ago

In order to calculate the number of pixels inside the bounding box, you simply need to multiply the 2 elements of output array.

e.g. pred = model(image) count_pix = pred[2] * pred [3]

All the best!

HassanBinHaroon commented 5 months ago

Please search for "Speed Estimation and Vehicle Tracking"

On Fri, Jul 5, 2024 at 1:01 AM Abdulghani Mawlood A.ghani Abdulghani < @.***> wrote:

Hi, thank you for this code. I am interested in the distance prediction model. How can I build one? Do you have any resources for that?

car.jpg (view on web) https://github.com/HassanBinHaroon/YOLOER_V2/assets/52427956/d5677967-f8de-4036-9d1b-010888fc6f8a

I have tried your distance pred model, but some predictions are wrong.

— Reply to this email directly, view it on GitHub https://github.com/HassanBinHaroon/YOLOER_V2/issues/3#issuecomment-2209513449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GYVSXWZ5AMN3AWTW5AJLZKWS23AVCNFSM6AAAAABKMBWFDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGUYTGNBUHE . You are receiving this because you commented.Message ID: @.***>