Git Product home page Git Product logo

Comments (9)

thptai avatar thptai commented on June 16, 2024 2

torch.device("cpu") or device=torch.device("cuda:0")

from yolo_tracking.

J4BEZ avatar J4BEZ commented on June 16, 2024 1

@thptai maybe you could be a contributor for this project,
if you modify the README with your solution and make a pull request!!

like below way
(e.g.)

import cv2
**import torch**
import numpy as np
from pathlib import Path

from boxmot import DeepOCSORT


tracker = DeepOCSORT(
    model_weights=Path('osnet_x0_25_msmt17.pt'), # which ReID model to use
    **device=torch.device('cuda:0'),**
    fp16=False,
)

vid = cv2.VideoCapture(0)
...

Thank you for sharing your idea
hope you have a peaceful dayπŸ˜†

from yolo_tracking.

mikel-brostrom avatar mikel-brostrom commented on June 16, 2024 1

I will fix this at tracker level instead. Thx for pointing this bug out!

from yolo_tracking.

mikel-brostrom avatar mikel-brostrom commented on June 16, 2024 1

Should have been fixed. Let me know @J4BEZ , @thptai, @programmeddeath1 if it works now

from yolo_tracking.

J4BEZ avatar J4BEZ commented on June 16, 2024 1

@mikel-brostrom Sorry for late reply and very appreciate for your hard workπŸ™‡β€β™‚οΈ

In my case, I caught an error like below.

...
    with open(ROOT / "pyproject.toml", "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\J4BEZ\\Anaconda\\envs\\sample\\Lib\\site-packages\\pyproject.toml'

when I download poetry.lock and pyproject.toml to the root of my env where I install boxmot
(in this case, under D:\\J4BEZ\\Anaconda\\envs\\sample\\Lib\\site-packages\\)

and run the sample code ,
it works perfectly as we expected!

from yolo_tracking.

J4BEZ avatar J4BEZ commented on June 16, 2024 1

@mikel-brostrom

In my case, I install boxmot not git clone https://github.com/mikel-brostrom/yolo_tracking.git but pip install -U boxmot.
so the poetry.lock and pyproject.toml which exist outside of 'boxmot' folder have left when I install boxmot

if we copy poetry.lock and pyproject.toml to boxmot folder and change the path in torch_utils.py line 66

    with open(ROOT / "pyproject.toml", "r") as file:

We would be able to solve the issue!

Very appreciate for your hard work and hope you have a peaceful day😊

from yolo_tracking.

mikel-brostrom avatar mikel-brostrom commented on June 16, 2024 1

I see. On it. I have a solution for it πŸ˜„

from yolo_tracking.

mikel-brostrom avatar mikel-brostrom commented on June 16, 2024 1

I was fetching the version from pyproject.toml. Should be from __init__.py under the boxmot pkg folder. This is now fixed. Thanks for pointing this bug out as well πŸš€

from yolo_tracking.

J4BEZ avatar J4BEZ commented on June 16, 2024

the solution of @thptai would be the bestπŸ‘πŸ‘

another way, you(@programmeddeath1 ) can modify the line 18 of boxmot/appearance/backends/base_backend.py
from
self.cuda = torch.cuda.is_available() and self.device.type != "cpu"
to
self.cuda = torch.cuda.is_available() and self.device != "cpu"

but I recommend the solution of @thptai , that modify "code of Custom tracking examples",
because mine could be affect other.

from yolo_tracking.

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.