Skip to content

Commit

Permalink
remove object_detector (#157)
Browse files Browse the repository at this point in the history
* `Object_Detector` has been removed  from the project

---------

Co-authored-by: Inga Ulusoy <[email protected]>
  • Loading branch information
piterand and iulusoy authored Oct 19, 2023
1 parent 8118aa4 commit b0a6236
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 700 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
run: |
cd ammico
python -m pytest test/test_cropposts.py -svv --cov=. --cov-report=xml --cov-append
# - name: Run pytest test_display
# run: |
# cd ammico
# python -m pytest test/test_display.py -svv --cov=. --cov-report=xml --cov-append
- name: Run pytest test_display
run: |
cd ammico
python -m pytest test/test_display.py -svv --cov=. --cov-report=xml --cov-append
- name: Run pytest test_faces
run: |
cd ammico
Expand All @@ -48,19 +48,15 @@ jobs:
run: |
cd ammico
python -m pytest test/test_multimodal_search.py -m "not long" -svv --cov=. --cov-report=xml --cov-append
# - name: Run pytest test_objects
# run: |
# cd ammico
# python -m pytest test/test_objects.py -svv --cov=. --cov-report=xml --cov-append
- name: Clear cache ubuntu
- name: Clear cache ubuntu 1
if: matrix.os == 'ubuntu-22.04'
run: |
rm -rf ~/.cache/*
- name: Run pytest test_summary
run: |
cd ammico
python -m pytest test/test_summary.py -m "not long" -svv --cov=. --cov-report=xml --cov-append
- name: Clear cache2
- name: Clear cache ubuntu 2
if: matrix.os == 'ubuntu-22.04'
run: |
rm -rf ~/.cache/*
Expand Down
2 changes: 0 additions & 2 deletions ammico/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from ammico.display import AnalysisExplorer
from ammico.faces import EmotionDetector
from ammico.multimodal_search import MultimodalSearch
from ammico.objects import ObjectDetector
from ammico.summary import SummaryDetector
from ammico.text import TextDetector, PostprocessText
from ammico.utils import find_files, get_dataframe
Expand All @@ -22,7 +21,6 @@
"AnalysisExplorer",
"EmotionDetector",
"MultimodalSearch",
"ObjectDetector",
"SummaryDetector",
"TextDetector",
"PostprocessText",
Expand Down
3 changes: 0 additions & 3 deletions ammico/display.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ammico.faces as faces
import ammico.text as text
import ammico.objects as objects
import ammico.colors as colors
from ammico.utils import is_interactive
import ammico.summary as summary
Expand Down Expand Up @@ -332,7 +331,6 @@ def _right_output_json(self) -> html.Div:
dcc.Dropdown(
options=[
"TextDetector",
"ObjectDetector",
"EmotionDetector",
"SummaryDetector",
"ColorDetector",
Expand Down Expand Up @@ -465,7 +463,6 @@ def _right_output_analysis(
identify_dict = {
"EmotionDetector": faces.EmotionDetector,
"TextDetector": text.TextDetector,
"ObjectDetector": objects.ObjectDetector,
"SummaryDetector": summary.SummaryDetector,
"ColorDetector": colors.ColorDetector,
}
Expand Down
12 changes: 1 addition & 11 deletions ammico/notebooks/DemoNotebook_ammico.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,7 @@
"```\n",
"image_dict[\"image_id\"] = ammico.EmotionDetector(image_dict[\"image_id\"], emotion_threshold=50, race_threshold=50).analyse_image()\n",
"```\n",
"The thresholds can be adapted interactively in the notebook interface and the optimal value can then be used in a subsequent analysis of the whole data set.\n",
"\n",
"## Object detection\n",
"Certain specified objects on the image are detected with the cvlib library and YOLOv4 model. Of the 80 objects from the [yolov library](https://github.com/AlexeyAB/darknet/blob/master/data/coco.names), the detection is restricted to person, bicycle, car, motorcycle, airplane, bus, train, truck, boat, traffic light.\n",
"\n",
"The analysis returns a dictionary with \"yes\" or \"no\" answers for the detected items: `\"person\": \"yes\", \"bicycle\": \"no\", \"car\": \"no\", \"motorcycle\": \"no\", \"airplane\": \"no\", \"bus\": \"no\", \"train\": \"no\", \"truck\": \"no\", \"boat\": \"no\", \"traffic light\": \"no\", \"cell phone\": \"no\"`.\n",
"\n",
"The object detection is very straightforward with no further parameters, and is called using\n",
"```\n",
"image_dict[\"image_id\"] = ammico.ObjectDetector(image_dict[\"image_id\"]).analyse_image()\n",
"```"
"The thresholds can be adapted interactively in the notebook interface and the optimal value can then be used in a subsequent analysis of the whole data set."
]
},
{
Expand Down
203 changes: 0 additions & 203 deletions ammico/notebooks/objects_expression.ipynb

This file was deleted.

54 changes: 0 additions & 54 deletions ammico/objects.py

This file was deleted.

Loading

0 comments on commit b0a6236

Please sign in to comment.