Skip to content

Commit

Permalink
Add object detection demo
Browse files Browse the repository at this point in the history
  • Loading branch information
wtffqbpl committed Feb 8, 2025
1 parent d9b353c commit 13e0a7d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Binary file added computer_vision/catdog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions computer_vision/object_detection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! coding: utf-8


import os
import unittest
import torch
import torchvision
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent))
from utils.plot import ImageUtils


class IntegrationTest(unittest.TestCase):
def setUp(self) -> None:
self.img_path = os.path.join(str(Path(__file__).resolve().parent), 'catdog.png')
pass

def test_simple(self):
img = ImageUtils.open(self.img_path)
ImageUtils.imshow(img)
pass


if __name__ == "__main__":
unittest.main(verbosity=True)

0 comments on commit 13e0a7d

Please sign in to comment.